Kaixhin / NoisyNet-A3C

Noisy Networks for Exploration
MIT License
184 stars 26 forks source link

AttributeError: 'NoisyLinear' object has no attribute 'sigma_weight' #1

Closed tigerneil closed 7 years ago

tigerneil commented 7 years ago

I run the code with python main.py, here comes this error.

torch/nn/modules/linear.py", line 42, in __init__
    self.reset_parameters()
  File "/Users/Tiger/projects/NoisyNet-A3C/model.py", line 23, in reset_parameters
    init.constant(self.sigma_weight, 0.0017)
  File "/Users/Tiger/anaconda/envs/pytorch3/lib/python3.5/site-packages/torch/nn/modules/module.py", line 238, in __getattr__
    type(self).__name__, name))
AttributeError: 'NoisyLinear' object has no attribute 'sigma_weight'

Any suggestion? Maybe you can show the version of pytorch. :) Mine is 0.1.12_2.


Maybe this is useful to solve this problem. It has been merged.

https://github.com/pytorch/pytorch/issues/1126

Kaixhin commented 7 years ago

Sorry, just fixed it! Make sure to pull the latest commit.