ERROR 삽질
[Pytorch error]IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
capaca
2023. 3. 18. 04:06
https://github.com/NVIDIA/flownet2-pytorch/issues/113#issuecomment-450802359
invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number · Issue #113 · NVIDIA/flownet2
pytorch 1.0 python3 main.py --inference --model FlowNet2 --save_flow --inference_dataset ImagesFromFolder --inference_dataset_root ~/fs24_512/ --resume mycheckpoints/FlowNet2_checkpoint.pth.tar Ini...
github.com
Pytorch > = 0.5 인 곳에서는 [0] dim tensor가 불가능하다
그래서 변수.data[0] --> 변수.data로 변경이 필요함