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

Trouble initializing bidirectional model #8

Open
masht18 opened this issue Oct 14, 2021 · 0 comments
Open

Trouble initializing bidirectional model #8

masht18 opened this issue Oct 14, 2021 · 0 comments

Comments

@masht18
Copy link

masht18 commented Oct 14, 2021

Hello! I've been trying to use the layered, bidirectional RIM, and it throws an error when it's initializing the layers for training. It seems to be having trouble with the size of the newly created hidden state value?

Here's the traceback:

File "/home/mila/m/mashbayar.tugsbayar/Recurrent-Independent-Mechanisms/main_bidirectional.py", line 159, in
train_model(model, args['epochs'], data)
File "/home/mila/m/mashbayar.tugsbayar/Recurrent-Independent-Mechanisms/main_bidirectional.py", line 114, in train_model
output, l = model(inp_x, inp_y)
File "/home/mila/m/mashbayar.tugsbayar/.conda/envs/brim/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/mila/m/mashbayar.tugsbayar/Recurrent-Independent-Mechanisms/RIM.py", line 336, in forward
x_fw, hs[idx] = self.layer(self.rimcell[idx], x, hs[idx], c = None)
File "/home/mila/m/mashbayar.tugsbayar/Recurrent-Independent-Mechanisms/RIM.py", line 297, in layer
hs = h.squeeze(0).view(batch_size, self.num_units, -1)

Thank you!

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

1 participant