Skip to content

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

Description

@SherlockHua1995

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions