Skip to content

Commit 4bf015c

Browse files
committed
Upgrade PyTorch 0.4.0+ compatible initialization API
1 parent 43ce2ab commit 4bf015c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layers/modules/l2norm.py

+1-1
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)