Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: shape '[1, 3, 160000]' is invalid for input of size 0 #91

Open
jiangyijin opened this issue Apr 6, 2024 · 0 comments
Open

Comments

@jiangyijin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant