Spaces:
Runtime error
Runtime error
Update Time_TravelRephotography/model.py
Browse files
Time_TravelRephotography/model.py
CHANGED
@@ -9,9 +9,9 @@ from torch import nn
|
|
9 |
from torch.nn import functional as F
|
10 |
from torch.autograd import Function
|
11 |
|
12 |
-
from op import FusedLeakyReLU, fused_leaky_relu#, upfirdn2d
|
13 |
-
from torch_utils.ops.bias_act import bias_act
|
14 |
-
from torch_utils.ops.upfirdn2d import
|
15 |
|
16 |
|
17 |
class PixelNorm(nn.Module):
|
@@ -333,7 +333,7 @@ class StyledConv(nn.Module):
|
|
333 |
self.noise = NoiseInjection()
|
334 |
# self.bias = nn.Parameter(torch.zeros(1, out_channel, 1, 1))
|
335 |
# self.activate = ScaledLeakyReLU(0.2)
|
336 |
-
self.activate =
|
337 |
|
338 |
def forward(self, input, style, noise=None):
|
339 |
out = self.conv(input, style)
|
|
|
9 |
from torch.nn import functional as F
|
10 |
from torch.autograd import Function
|
11 |
|
12 |
+
#from op import FusedLeakyReLU, fused_leaky_relu#, upfirdn2d
|
13 |
+
from torch_utils.ops.bias_act import bias_act,bias_act_relu
|
14 |
+
from torch_utils.ops.upfirdn2d import upfirdn2d
|
15 |
|
16 |
|
17 |
class PixelNorm(nn.Module):
|
|
|
333 |
self.noise = NoiseInjection()
|
334 |
# self.bias = nn.Parameter(torch.zeros(1, out_channel, 1, 1))
|
335 |
# self.activate = ScaledLeakyReLU(0.2)
|
336 |
+
self.activate =bias_act_relu(out_channel)
|
337 |
|
338 |
def forward(self, input, style, noise=None):
|
339 |
out = self.conv(input, style)
|