You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/xueying/enter/envs/vil3dref3/lib/python3.8/site-packages/torch/nn/parallel/_functions.py:68: 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 '
Traceback (most recent call last):
File "train.py", line 355, in
main(args)
File "train.py", line 199, in main
val_log = validate(model, model_cfg, val_dataloader)
File "/home/xueying/enter/envs/vil3dref3/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "train.py", line 286, in validate
loss_dict = {'loss/%s'%lk: lv.data.item() for lk, lv in losses.items()}
File "train.py", line 286, in
loss_dict = {'loss/%s'%lk: lv.data.item() for lk, lv in losses.items()}
ValueError: only one element tensors can be converted to Python scalars
When training the teacher model with groundtruth object labels, the error occurred.
The text was updated successfully, but these errors were encountered:
I solved by disabling the "DataParallel", by just adding and False to the condition. elif torch.cuda.device_count() > 1 and False: in line 53 in utils/misc.py
/home/xueying/enter/envs/vil3dref3/lib/python3.8/site-packages/torch/nn/parallel/_functions.py:68: 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 '
Traceback (most recent call last):
File "train.py", line 355, in
main(args)
File "train.py", line 199, in main
val_log = validate(model, model_cfg, val_dataloader)
File "/home/xueying/enter/envs/vil3dref3/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "train.py", line 286, in validate
loss_dict = {'loss/%s'%lk: lv.data.item() for lk, lv in losses.items()}
File "train.py", line 286, in
loss_dict = {'loss/%s'%lk: lv.data.item() for lk, lv in losses.items()}
ValueError: only one element tensors can be converted to Python scalars
When training the teacher model with groundtruth object labels, the error occurred.
The text was updated successfully, but these errors were encountered: