opened
avr248
username_0
tnanks!!
please if you can: update "memnn" for pytorch 0.4
issue
created
alexholdenmiller
username_1
#781
comment
created
avr248
username_0
thank you for the quick reply!

now I get error:

parlai/agents/memnn/modules.py", line 99, in forward
    raise RuntimeError(lengths.shape)
RuntimeError: torch.Size([1])
comment
created
alexholdenmiller
username_1
@username_0 do you mean you updated to that branch and it's failing? we haven't merged it yet.

if so, please post the full command that you used and the full stack trace and I'll fix that as well!
comment
created
avr248
username_0
I clone branch "memnn_p4" 
and i run command: "python examples/train_model.py -m memnn -t babi:Task10k:1"

the full error msg:

Traceback (most recent call last):
  File "examples/train_model.py", line 28, in <module>
    TrainLoop(opt).train()
  File "ParlAI-memnn_p4/parlai/scripts/train_model.py", line 242, in train
    world.parley()
  File "ParlAI-memnn_p4/parlai/core/worlds.py", line 240, in parley
    acts[1] = agents[1].act()
  File "ParlAI-memnn_p4/parlai/agents/memnn/memnn.py", line 351, in act
    return self.batch_act([self.observation])[0]
  File "ParlAI-memnn_p4/parlai/agents/memnn/memnn.py", line 342, in batch_act
    predictions = self.predict(xs, cands, ys)
  File "ParlAI-memnn_p4/parlai/agents/memnn/memnn.py", line 180, in predict
    output_embeddings = self.model(*xs)
  File "/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "ParlAI-memnn_p4/parlai/agents/memnn/modules.py", line 73, in forward
    query_embeddings = self.query_embedder(query_lengths, queries)
  File "/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "ParlAI-memnn_p4/parlai/agents/memnn/modules.py", line 99, in forward
    raise RuntimeError(lengths.shape)
RuntimeError: torch.Size([1])
comment
created
alexholdenmiller
username_1
ah, thanks for catching! squeeze() is dangerous in pytorch 0.4... #783 fixes that
comment
created
alexholdenmiller
username_1
closing for now, reopen if you have any more issues!
comment
closed
alexholdenmiller
username_1
issue
created
avr248
username_0
work!!
thanks.
comment