Skip to content

Commit

Permalink
Add input norm
Browse files Browse the repository at this point in the history
  • Loading branch information
nmhkahn committed Nov 5, 2018
1 parent 7e745f5 commit f5a8319
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions carnpp/model/carnpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def forward(self, x):
class Net(nn.Module):
def __init__(self, scale=2, multi_scale=True, group=1):
super().__init__()

self.sub_mean = ops.MeanShift((0.4488, 0.4371, 0.4040), sub=True)
self.add_mean = ops.MeanShift((0.4488, 0.4371, 0.4040), sub=False)

self.entry_x2 = nn.Conv2d(3, 64, 3, 1, 1)
self.entry_x3 = nn.Conv2d(3, 64, 3, 1, 1)
Expand Down

0 comments on commit f5a8319

Please sign in to comment.