hy-struggle / PRGC

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

evaluate时gather_map 收集不同GPU数据时zip报错 #17

Open Hou-Hou opened 1 year ago

Hou-Hou commented 1 year ago

Epoch 1/20 0%| | 0/1266 [00:00<?, ?it/s]Epoch=20 /home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/_functions.py:61: UserWarning: Was asked to gather along dimension 0, but all input tensors were scalars; will instead unsqueeze and return a vector. warnings.warn('Was asked to gather along dimension 0, but all ' 0%| | 0/1266 [01:55<?, ?it/s, loss=2.482, loss_mat=0.665, loss_rel=0.692, loss_seq=1.125] 0%| | 0/209 [01:11<?, ?Batch/s] 0%| | 0/1266 [03:06<?, ?it/s, loss=2.482, loss_mat=0.665, loss_rel=0.692, loss_seq=1.125] Traceback (most recent call last): File "/data00/home/hjj/code/RelationExtract/Joint_Extraction/PRGCLocal/evaluate.py", line 92, in evaluate ex_params=ex_params) File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, *kwargs) File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 156, in forward return self.gather(outputs, self.output_device) File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 168, in gather return gather(outputs, output_device, dim=self.dim) File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 68, in gather res = gather_map(outputs) File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map return type(out)(map(gather_map, zip(outputs))) File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map return type(out)(map(gather_map, zip(outputs))) File "/home/root1/anaconda3/envs/prgc/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map return type(out)(map(gather_map, zip(outputs))) TypeError: zip argument #1 must support iteration

Process finished with exit code 1

image