pierotofy / OpenSplat

Production-grade 3D gaussian splatting with CPU/GPU support for Windows, Mac and Linux 🚀
https://antimatter15.com/splat/?url=https://splat.uav4geo.com/banana.splat
GNU Affero General Public License v3.0
924 stars 87 forks source link

element 0 of tensors does not require grad and does not have a grad_fn #135

Closed eloquentarduino closed 1 month ago

eloquentarduino commented 1 month ago

On some COLMAP datasets I created, I get this error message:

element 0 of tensors does not require grad and does not have a grad_fn
Exception raised from run_backward at ../torch/csrc/autograd/autograd.cpp:105 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0xb0 (0x7ea4ecc6f7f0 in /libtorch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0xfa (0x7ea4ecc17f7e in /libtorch/lib/libc10.so)
frame #2: <unknown function> + 0x5827c92 (0x7ea4d8e27c92 in /libtorch/lib/libtorch_cpu.so)
frame #3: torch::autograd::backward(std::vector<at::Tensor, std::allocator<at::Tensor> > const&, std::vector<at::Tensor, std::allocator<at::Tensor> > const&, std::optional<bool>, bool, std::vector<at::Tensor, std::allocator<at::Tensor> > const&) + 0x6a (0x7ea4d8e2ac6a in /libtorch/lib/libtorch_cpu.so)
frame #4: <unknown function> + 0x5896b2d (0x7ea4d8e96b2d in /libtorch/lib/libtorch_cpu.so)
frame #5: at::Tensor::_backward(c10::ArrayRef<at::Tensor>, std::optional<at::Tensor> const&, std::optional<bool>, bool) const + 0x4c (0x7ea4d51d7d3c in /libtorch/lib/libtorch_cpu.so)
frame #6: <unknown function> + 0x35c52 (0x55bc75826c52 in /OpenSplat/build/opensplat)
frame #7: <unknown function> + 0x29d90 (0x7ea474829d90 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #8: __libc_start_main + 0x80 (0x7ea474829e40 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #9: <unknown function> + 0x38055 (0x55bc75829055 in /OpenSplat/build/opensplat)

Any hint?

eloquentarduino commented 1 month ago

Looks like it happens when Glomap fails. If I use Colmap, it works on the same set of images.