Skip to content

Commit 09ef4ad

Browse files
cypherixamdegroot
authored andcommitted
Update l2norm.py (#304)
Updating to nn.init.constant_
1 parent 2df19fd commit 09ef4ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layers/modules/l2norm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def __init__(self,n_channels, scale):
1414
self.reset_parameters()
1515

1616
def reset_parameters(self):
17-
init.constant(self.weight,self.gamma)
17+
init.constant_(self.weight,self.gamma)
1818

1919
def forward(self, x):
2020
norm = x.pow(2).sum(dim=1, keepdim=True).sqrt()+self.eps

0 commit comments

Comments
 (0)