Hello, thank you very much for your work. I encountered this issue when reconstructing my dataset. I used single-channel black and white images.
TRAINING START
validating: 0%| | 0/4 [00:00<?, ?it/s]C:\ProgramData\anaconda3\envs\barf-env\Lib\site-packages\torch\functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\cb\pytorch_1000000000000\work\aten\src\ATen\native\TensorShape.cpp:3550.)
return _VF.meshgrid(tensors, kwargs) # type: ignore[attr-defined]
Traceback (most recent call last):
File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\train.py", line 33, in
main()
File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\train.py", line 30, in main
m.train(opt)
File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\model\nerf.py", line 54, in train
if self.iter_start==0: self.validate(opt,0)
^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\barf-env\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\model\barf.py", line 66, in validate
super().validate(opt,ep=ep)
File "C:\ProgramData\anaconda3\envs\barf-env\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\model\base.py", line 153, in validate
loss = self.graph.compute_loss(opt,var,mode="val")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\model\nerf.py", line 218, in compute_loss
image = var.image.view(batch_size,3,opt.H*opt.W).permute(0,2,1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: shape '[1, 3, 160000]' is invalid for input of size 0
Hello, thank you very much for your work. I encountered this issue when reconstructing my dataset. I used single-channel black and white images. TRAINING START validating: 0%| | 0/4 [00:00<?, ?it/s]C:\ProgramData\anaconda3\envs\barf-env\Lib\site-packages\torch\functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\cb\pytorch_1000000000000\work\aten\src\ATen\native\TensorShape.cpp:3550.) return _VF.meshgrid(tensors, kwargs) # type: ignore[attr-defined] Traceback (most recent call last): File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\train.py", line 33, in
main()
File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\train.py", line 30, in main
m.train(opt)
File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\model\nerf.py", line 54, in train
if self.iter_start==0: self.validate(opt,0)
^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\barf-env\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\model\barf.py", line 66, in validate
super().validate(opt,ep=ep)
File "C:\ProgramData\anaconda3\envs\barf-env\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\model\base.py", line 153, in validate
loss = self.graph.compute_loss(opt,var,mode="val")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\3dgs\gaosi\bundle-adjusting-NeRF-main\bundle-adjusting-NeRF-main\model\nerf.py", line 218, in compute_loss
image = var.image.view(batch_size,3,opt.H*opt.W).permute(0,2,1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: shape '[1, 3, 160000]' is invalid for input of size 0