feng2022 commited on
Commit
a5ea32b
1 Parent(s): c09f77e

Update Time_TravelRephotography/torch_utils/ops/bias_act.py

Browse files
Time_TravelRephotography/torch_utils/ops/bias_act.py CHANGED
@@ -89,9 +89,9 @@ def bias_act(x, b=None, dim=1, act='linear', alpha=None, gain=None, clamp=None,
89
  return _bias_act_ref(x=x, b=b, dim=dim, act=act, alpha=alpha, gain=gain, clamp=clamp)
90
 
91
  class bias_act_relu(nn.Module):
92
- def __init__(self, dim, negative_slope=0.2, scale=2 ** 0.5):
93
  super().__init__()
94
- self.dim = nn.Parameter(torch.zeros(dim))
95
  self.negative_slope = negative_slope
96
  self.scale = scale
97
 
 
89
  return _bias_act_ref(x=x, b=b, dim=dim, act=act, alpha=alpha, gain=gain, clamp=clamp)
90
 
91
  class bias_act_relu(nn.Module):
92
+ def __init__(self, bias, negative_slope=0.2, scale=2 ** 0.5):
93
  super().__init__()
94
+ self.bias = nn.Parameter(torch.zeros(bias))
95
  self.negative_slope = negative_slope
96
  self.scale = scale
97