Skip to content

Runtime Error: The size of tensor a (1100) must match the size of tensor b (695) at non-singleton dimension 0 #7

@tanvidadu

Description

@tanvidadu

Hey @DoodleJZ
I came across this error while running your parser. Could please look into this and fix this ?

Traceback (most recent call last):
File "/content/drive/My Drive/Hd/DependencyParser/src_joint/main.py", line 746, in
main()
File "/content/drive/My Drive/Hd/DependencyParser/src_joint/main.py", line 742, in main
args.callback(args)
File "/content/drive/My Drive/Hd/DependencyParser/src_joint/main.py", line 672, in run_parse
syntree, _ = parser.parse_batch(subbatch_sentences)
File "/content/drive/My Drive/Hd/DependencyParser/src_joint/Zparser.py", line 1364, in parse_batch
extra_content_annotations=extra_content_annotations)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/content/drive/My Drive/Hd/DependencyParser/src_joint/Zparser.py", line 822, in forward
res, current_attns = attn(res, batch_idxs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/content/drive/My Drive/Hd/DependencyParser/src_joint/Zparser.py", line 344, in forward
return self.layer_norm(outputs + residual), attns_padded
RuntimeError: The size of tensor a (1100) must match the size of tensor b (695) at non-singleton dimension 0

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