-
Notifications
You must be signed in to change notification settings - Fork 216
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
vgg_prune.py #17
Comments
Are you using Pytorch 0.3.1? |
No, i use Pytorch 1.0.1, Is it because of this reason? |
Maybe. The code is developed based on Pytorch 0.3.1. |
OK, Thank you very much |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey Eric. i got this error during pruning , can you suggest me how should i handle it. Thanks
Traceback (most recent call last):
File "vggprune.py", line 123, in
newmodel = vgg(dataset=args.dataset, cfg=cfg)
File "/data/hzm/network-slimming-master/models/vgg.py", line 22, in init
self.feature = self.make_layers(cfg, True)
File "/data/hzm/network-slimming-master/models/vgg.py", line 39, in make_layers
conv2d = nn.Conv2d(in_channels, v, kernel_size=3, padding=1, bias=False)
File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/conv.py", line 315, in init
False, pair(0), groups, bias)
File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/conv.py", line 43, in init
self.reset_parameters()
File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/conv.py", line 47, in reset_parameters
init.kaiming_uniform(self.weight, a=math.sqrt(5))
File "/usr/local/lib/python3.5/dist-packages/torch/nn/init.py", line 288, in kaiming_uniform_
fan = _calculate_correct_fan(tensor, mode)
File "/usr/local/lib/python3.5/dist-packages/torch/nn/init.py", line 257, in _calculate_correct_fan
fan_in, fan_out = _calculate_fan_in_and_fan_out(tensor)
File "/usr/local/lib/python3.5/dist-packages/torch/nn/init.py", line 191, in _calculate_fan_in_and_fan_out
receptive_field_size = tensor[0][0].numel()
IndexError: index 0 is out of bounds for dimension 0 with size 0
The text was updated successfully, but these errors were encountered: