Deep-Compression-PyTorch icon indicating copy to clipboard operation
Deep-Compression-PyTorch copied to clipboard

AttributeError: 'ReLU' object has no attribute 'weight'

Open SherlockHua1995 opened this issue 5 years ago • 0 comments

Hello, mightydeveloper. When I use 'weight_share.py' to compress the trained model, the error occured: AttributeError: 'ReLU' object has no attribute 'weight' . File "weight_share.py", line 32, in apply_weight_sharing(model) File "/net/quantization.py", line 16, in apply_weight_sharing dev = module.weight.device File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 539, in getattr type(self).name, name)) AttributeError: 'ReLU' object has no attribute 'weight' How to jump over the ReLU module? THANKS.

SherlockHua1995 avatar Nov 24 '19 12:11 SherlockHua1995