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

Error training MD-rnn #25

Open
waiyc opened this issue May 16, 2019 · 3 comments
Open

Error training MD-rnn #25

waiyc opened this issue May 16, 2019 · 3 comments

Comments

@waiyc
Copy link

waiyc commented May 16, 2019

Hi,

I am facing this invalid input size error when training dmrnn.

File "trainmdrnn.py", line 205, in
test_loss = test(e)
File "trainmdrnn.py", line 170, in data_pass
latent_obs, latent_next_obs = to_latent(obs, next_obs)
File "trainmdrnn.py", line 108, in to_latent
[(obs_mu, obs_logsigma), (next_obs_mu, next_obs_logsigma)]]
File "trainmdrnn.py", line 107, in
for x_mu, x_logsigma in
RuntimeError: shape '[16, 32, 32]' is invalid for input of size 11264

@megsano
Copy link

megsano commented May 23, 2019

Hi, we're also experiencing this issue (but with a different size):

  File "trainmdrnn.py", line 202, in <module>
    train(e)
  File "trainmdrnn.py", line 168, in data_pass
    latent_obs, latent_next_obs = to_latent(obs, next_obs)
  File "trainmdrnn.py", line 106, in to_latent
    [(obs_mu, obs_logsigma), (next_obs_mu, next_obs_logsigma)]]
  File "trainmdrnn.py", line 105, in <listcomp>
    for x_mu, x_logsigma in
RuntimeError: shape '[16, 32, 32]' is invalid for input of size 36864```

@megsano
Copy link

megsano commented May 23, 2019

Never mind, we just solved the problem by changing the SIZE in utils/misc.py to 96 instead of 64.

@wildermuthn
Copy link

@waiyc, you'll want to add drop_last=True as an argument to the DataLoader. This resolved the problem for me, as the difference in batch sizes caused the error.

https://github.com/ctallec/world-models/blob/master/trainmdrnn.py#L79

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

No branches or pull requests

3 participants