Skip to content
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

RuntimeError in wob_click_play.py #28

Open
hemanthsavasere opened this issue Jan 31, 2019 · 1 comment
Open

RuntimeError in wob_click_play.py #28

hemanthsavasere opened this issue Jan 31, 2019 · 1 comment
Assignees

Comments

@hemanthsavasere
Copy link

Hi @Shmuma ,
I am getting this error,

Traceback (most recent call last):
File "./wob_click_play.py", line 64, in
logits_v = net(obs_v)[0]
File "/home/hemanth_savasere/.conda/envs/rl_book_ch13/lib/python3.6/site-package
s/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/hemanth_savasere/Deep-Reinforcement-Learning-Hands-On/Chapter13/lib/
model_vnc.py", line 45, in forward
conv_out = self.conv(fx).view(fx.size()[0], -1)
File "/home/hemanth_savasere/.conda/envs/rl_book_ch13/lib/python3.6/site-package
s/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/hemanth_savasere/.conda/envs/rl_book_ch13/lib/python3.6/site-package
s/torch/nn/modules/container.py", line 91, in forward
input = module(input)
File "/home/hemanth_savasere/.conda/envs/rl_book_ch13/lib/python3.6/site-package
s/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/hemanth_savasere/.conda/envs/rl_book_ch13/lib/python3.6/site-package
s/torch/nn/modules/conv.py", line 301, in forward
self.padding, self.dilation, self.groups)
RuntimeError: expected stride to be a single integer value or a list of 1 values t
o match the convolution dimensions, but got stride=[5, 5]

@vkm0cherla
Copy link

this fixed it for me, in model_vnc.py#L44

    def forward(self, x):
        fx = x.unsqueeze_(0).float() / 256  # originally x.float() / 256
        conv_out = self.conv(fx).view(fx.size()[0], -1)
        return self.policy(conv_out), self.value(conv_out)

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

No branches or pull requests

3 participants