Closed Zwewang closed 2 years ago
Hi there, I'm not sure what part of the code you have modified, since "/home/user/py_geo/yread.py" is not the original file in this repository. It seems that the problem is because of the dimension mismatch, but I have no idea why there is tensor of dimension 97. Could you please print out the size of these tensors (mask, dist, etc)? Thanks!
Hi there, I'm not sure what part of the code you have modified, since "/home/user/py_geo/yread.py" is not the original file in this repository. It seems that the problem is because of the dimension mismatch, but I have no idea why there is tensor of dimension 97. Could you please print out the size of these tensors (mask, dist, etc)? Thanks!
Thank you for your reply, this problem appeared on batch, it has been solved, thank you!
Traceback (most recent call last): File "/home/user/py_geo/yread.py", line 62, in
loss = calculate_loss(reactant_embeddings, product_embeddings, args)
File "/home/user/py_geo/yread.py", line 22, in calculate_loss
neg = (1 - mask) dist + mask args.margin
RuntimeError: The size of tensor a (1024) must match the size of tensor b (97) at non-singleton dimension 1
This happens when running the code, how to solve it?