Spaces:
Paused
Paused
Update commons.py
Browse files- commons.py +2 -13
commons.py
CHANGED
|
@@ -1,19 +1,8 @@
|
|
| 1 |
import math
|
|
|
|
| 2 |
import torch
|
|
|
|
| 3 |
from torch.nn import functional as F
|
| 4 |
-
import torch.jit
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
def script_method(fn, _rcb=None):
|
| 8 |
-
return fn
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
def script(obj, optimize=True, _frames_up=0, _rcb=None):
|
| 12 |
-
return obj
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
torch.jit.script_method = script_method
|
| 16 |
-
torch.jit.script = script
|
| 17 |
|
| 18 |
|
| 19 |
def init_weights(m, mean=0.0, std=0.01):
|
|
|
|
| 1 |
import math
|
| 2 |
+
import numpy as np
|
| 3 |
import torch
|
| 4 |
+
from torch import nn
|
| 5 |
from torch.nn import functional as F
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
|
| 8 |
def init_weights(m, mean=0.0, std=0.01):
|