hy-struggle / PRGC

PRGC: Potential Relation and Global Correspondence Based Joint Relational Triple Extraction
107 stars 16 forks source link

help #11

Open zzyybtxl opened 2 years ago

zzyybtxl commented 2 years ago

When I use multi_gpu to run train script,It shows 'zip argument #1 must support iteration',and I have already transferred the type of function evaluate's return to tensor.Can you tell me how to fix the issue?

suexin27 commented 2 years ago

HI,When I use multi_gpu to run train script,It shows 'ValueError: only one element tensors can be converted to Python scalars', Traceback (most recent call last): File "/PRGC-main/train.py", line 229, in train_and_evaluate(model, params, ex_params, args.restore_file) File "/PRGC-main/train.py", line 150, in train_and_evaluate train(model, train_loader, optimizer, params, ex_params) File "/PRGC-main/train.py", line 84, in train loss_avg_seq.update(loss_seq.item()) Had you meet the issue,and can you tell me how to fix that?thanks!