Skip to content

Dimension Error in Inference #10

Description

@Mrs-Hudson

Hi

I was trying to run ' python a3c_main.py --evaluate 2 --load saved/pretrained_model' to run inference using the pre-trained model. However, I faced the following dimension error without changing the code:

File "/home/rparik/Downloads/Documents/CMU/Fall18/multi-modal/project/baselines/DeepRL-Grounding/models.py", line 88, in forward
  _, encoder_hidden = self.gru(word_embedding, encoder_hidden)
File "/home/rparik/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
  result = self.forward(*input, **kwargs)
File "/home/rparik/anaconda3/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 178, in forward
  self.check_forward_args(input, hx, batch_sizes)
File "/home/rparik/anaconda3/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 126, in check_forward_args
  expected_input_dim, input.dim()))
RuntimeError: input must have 3 dimensions, got 2

Any leads would be appreciated

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