You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to embed this non-local code in my framework, but when I run my code, the following error will occur:
File "/home/Global/models/non_local_embeded_gaussian.py", line 102, in init
super(NONLocalBlock2D, self).init(in_channels,
File "/home/Global/models/non_local_embeded_gaussian.py", line 54, in init
nn.init.constant_(self.W[1].weight, 0)
File "/home/anaconda3/envs/torch/lib/python3.8/site-packages/torch/nn/init.py", line 176, in constant_
return no_grad_fill(tensor, val)
File "/home/anaconda3/envs/torch/lib/python3.8/site-packages/torch/nn/init.py", line 59, in no_grad_fill
return tensor.fill_(val)
AttributeError: 'NoneType' object has no attribute 'fill_'
In my envirnoment, the pyhton version: 3.8, torch version: 1.8.0, cuda:11.2
The text was updated successfully, but these errors were encountered:
I want to embed this non-local code in my framework, but when I run my code, the following error will occur:
In my envirnoment, the pyhton version: 3.8, torch version: 1.8.0, cuda:11.2
The text was updated successfully, but these errors were encountered: