kentsommer / pytorch-value-iteration-networks

Pytorch implementation of Value Iteration Networks (NIPS 2016 best paper)
BSD 3-Clause "New" or "Revised" License
318 stars 62 forks source link

Problem of running the test script #4

Closed YantianZha closed 6 years ago

YantianZha commented 6 years ago

Hello,

I downloaded the data with the .sh downloading script you provided, I also got an nps weights file after training. When I ran the testing command I got the following error: Traceback (most recent call last): File "/home/research/DL/VIN/pytorch-value-iteration-networks/test.py", line 158, in main(config) File "/home/research/DL/VIN/pytorch-value-iteration-networks/test.py", line 85, in main _, predictions = vin(X_in, S1_in, S2_in, config) File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 357, in call result = self.forward(*input, **kwargs) File "/home/research/DL/VIN/pytorch-value-iteration-networks/model.py", line 64, in forward return logits, self.sm(logits) File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 352, in call for hook in self._forward_pre_hooks.values(): File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 398, in getattr type(self).name, name)) AttributeError: 'Softmax' object has no attribute '_forward_pre_hooks'

Thanks for helping!

kentsommer commented 6 years ago

Hi @YantianZha

I'm aware of this bug and will fix it as soon as I can set aside some time (likely not until this weekend).

It is due to softmax no longer providing a default dimension. Due to how I am currently saving the weights, fixing this will require retraining. Along with the fix to this bug, I will also be updating how the weights are saved so that this type of issue can be fixed more quickly in the future.

YantianZha commented 6 years ago

Hi Kent,

Thanks!

Best,

Yantian


From: Kent Sommer notifications@github.com Sent: Tuesday, April 10, 2018 5:26 PM To: kentsommer/pytorch-value-iteration-networks Cc: YantianZha; Mention Subject: Re: [kentsommer/pytorch-value-iteration-networks] Problem of running the test script (#4)

Hi @YantianZhahttps://github.com/YantianZha

I'm aware of this bug and will fix it as soon as I can set aside some time (likely not until this weekend).

It is due to softmax no longer providing a default dimension. Due to how I am currently saving the weights, fixing this will require retraining. Along with the fix to this bug, I will also be updating how the weights are saved so that this type of issue can be fixed more quickly in the future.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/kentsommer/pytorch-value-iteration-networks/issues/4#issuecomment-380288246, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AImZ71AnyBseB3vvt0WmZTxtNXTGgRs5ks5tnU21gaJpZM4TPL4j.

kentsommer commented 6 years ago

Fixed with https://github.com/kentsommer/pytorch-value-iteration-networks/commit/15fefd5bb645f990cdad452f14208a115789edba