-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inplace Operations Error #4
Comments
Hey, I am also trying to run with pytorch 1.0.0 and getting the same error. Trying to resolve this. Will let you know if i will find any solution. Thanks. |
Just solved it. The error is in class L2Norm(nn.Module):
def __init__(self,n_channels, scale=20):
super(L2Norm,self).__init__()
self.weight = nn.Parameter(torch.Tensor(n_channels))
nn.init.constant_(self.weight, scale)
def forward(self, x):
norm = x.pow(2).sum(dim=1, keepdim=True).sqrt()+1e-10
x = torch.div(x,norm)
out = self.weight.unsqueeze(0).unsqueeze(2).unsqueeze(3).expand_as(x) * x
return out |
Hi guys. Are you able to achieve the same reported accuracy training from scratch using this repo code? Thanks! |
Hey,
I am trying to run this with pytorch 1.0.0 and get the following error
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
Any suggestions?
Thanks!
The text was updated successfully, but these errors were encountered: