create web directory ./checkpoints/target/web... End of epoch 1 / 40 Time Taken: 898 sec Traceback (most recent call last): File "train_pose2vid.py", line 127, in <module> main() File "train_pose2vid.py", line 84, in main errors = {k: v.data[0] if not isinstance(v, int) else v for k, v in loss_dict.items()} File "train_pose2vid.py", line 84, in <dictcomp> errors = {k: v.data[0] if not isinstance(v, int) else v for k, v in loss_dict.items()} IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
create web directory ./checkpoints/target/web...
End of epoch 1 / 40 Time Taken: 898 sec
Traceback (most recent call last):
File "train_pose2vid.py", line 127, in
Did anybody find the quick-fix for this? Having the same error
Ait so aparantly, batch_size is set to 1 in src/config/train_opt.py, therefore v.data[0] does not work and you have to:
- Either set the batch_size to a value different from 1
- or use v.item()