-
Notifications
You must be signed in to change notification settings - Fork 234
Description
Hello!
When I get to the line
model = ResNetUNet(6)
I receive the following error message:
Traceback (most recent call last):
File "", line 1, in
File "", line 4, in init
File "/home/paulr/Programming/anaconda3/lib/python3.7/site-packages/torchvision/models/resnet.py", line 237, in resnet18
**kwargs)
File "/home/paulr/Programming/anaconda3/lib/python3.7/site-packages/torchvision/models/resnet.py", line 220, in resnet
model = ResNet(block, layers, **kwargs)
File "/home/paulr/Programming/anaconda3/lib/python3.7/site-packages/torchvision/models/resnet.py", line 142, in init
bias=False)
File "/home/paulr/Programming/anaconda3/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 332, in init
False, pair(0), groups, bias, padding_mode)
File "/home/paulr/Programming/anaconda3/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 46, in init
self.reset_parameters()
File "/home/paulr/Programming/anaconda3/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 49, in reset_parameters
init.kaiming_uniform(self.weight, a=math.sqrt(5))
File "/home/paulr/Programming/anaconda3/lib/python3.7/site-packages/torch/nn/init.py", line 315, in kaiming_uniform
return tensor.uniform_(-bound, bound)
RuntimeError: a leaf Variable that requires grad has been used in an in-place operation.
This looks likeit might be a bug in pytorch (or maybe just how I'm using it), but if you have any pointers I'd be greatful.
Thanks,
P