We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /home/k/nerf2mesh/main.py:224 in │ │ │ │ 221 │ │ │ valid_loader = NeRFDataset(opt, device=device, type='val') │ │ 222 │ │ │ │ │ 223 │ │ │ trainer.metrics = [PSNRMeter(),] │ │ ❱ 224 │ │ │ trainer.train(train_loader, valid_loader, max_epoch) │ │ 225 │ │ │ │ │ 226 │ │ │ # last validation │ │ 227 │ │ │ trainer.metrics = [PSNRMeter(), SSIMMeter(), LPIPSMeter(de │ │ │ │ /home/k/nerf2mesh/nerf/utils.py:902 in train │ │ │ │ 899 │ │ for epoch in range(self.epoch + 1, max_epochs + 1): │ │ 900 │ │ │ self.epoch = epoch │ │ 901 │ │ │ │ │ ❱ 902 │ │ │ self.train_one_epoch(train_loader) │ │ 903 │ │ │ │ │ 904 │ │ │ if (self.epoch % self.save_interval == 0 or self.epoch == │ │ 905 │ │ │ │ self.save_checkpoint(full=True, best=False) │ │ │ │ /home/k/nerf2mesh/nerf/utils.py:1127 in train_one_epoch │ │ │ │ 1124 │ │ │ │ │ 1125 │ │ │ # update grid every 16 steps │ │ 1126 │ │ │ if self.model.cuda_ray and self.global_step % self.opt.up │ │ ❱ 1127 │ │ │ │ loss_grid = self.model.update_extra_state() │ │ 1128 │ │ │ else: │ │ 1129 │ │ │ │ loss_grid = None │ │ 1130 │ │ │ │ /home/k/nerf2mesh/nerf/renderer.py:972 in update_extra_state │ │ │ │ 969 │ │ │ │ │ │ │ │ cas_xyzs += (torch.rand_like(cas_xyzs │ │ 970 │ │ │ │ │ │ │ │ # query density │ │ 971 │ │ │ │ │ │ │ │ with torch.cuda.amp.autocast(enabled= │ │ ❱ 972 │ │ │ │ │ │ │ │ │ sigmas = self.density(cas_xyzs)[' │ │ 973 │ │ │ │ │ │ │ │ # assign │ │ 974 │ │ │ │ │ │ │ │ tmp_grid[cas, indices] = sigmas │ │ 975 │ │ │ │ /home/k/nerf2mesh/nerf/network.py:65 in density │ │ │ │ 62 │ def density(self, x): │ │ 63 │ │ │ │ 64 │ │ # sigma │ │ ❱ 65 │ │ h = self.encoder(x, bound=self.bound) │ │ 66 │ │ h = self.sigma_net(h) │ │ 67 │ │ │ │ 68 │ │ sigma = trunc_exp(h[..., 0]) │ │ │ │ /home/k/.local/lib/python3.10/site-packages/torch/nn/modules/module.py:1501 │ │ in _call_impl │ │ │ │ 1498 │ │ if not (self._backward_hooks or self._backward_pre_hooks or s │ │ 1499 │ │ │ │ or _global_backward_pre_hooks or _global_backward_hoo │ │ 1500 │ │ │ │ or _global_forward_hooks or _global_forward_pre_hooks │ │ ❱ 1501 │ │ │ return forward_call(*args, **kwargs) │ │ 1502 │ │ # Do not call functions when jit is used │ │ 1503 │ │ full_backward_hooks, non_full_backward_hooks = [], [] │ │ 1504 │ │ backward_pre_hooks = [] │ │ │ │ /home/k/nerf2mesh/gridencoder/grid.py:156 in forward │ │ │ │ 153 │ │ prefix_shape = list(inputs.shape[:-1]) │ │ 154 │ │ inputs = inputs.view(-1, self.input_dim) │ │ 155 │ │ │ │ ❱ 156 │ │ outputs = grid_encode(inputs, self.embeddings, self.offsets, s │ │ 157 │ │ outputs = outputs.view(prefix_shape + [self.output_dim]) │ │ 158 │ │ │ │ 159 │ │ #print('outputs', outputs.shape, outputs.dtype, outputs.min(). │ │ │ │ /home/k/.local/lib/python3.10/site-packages/torch/autograd/function.py:506 │ │ in apply │ │ │ │ 503 │ │ if not torch._C._are_functorch_transforms_active(): │ │ 504 │ │ │ # See NOTE: [functorch vjp and autograd interaction] │ │ 505 │ │ │ args = _functorch.utils.unwrap_dead_wrappers(args) │ │ ❱ 506 │ │ │ return super().apply(*args, **kwargs) # type: ignore[misc │ │ 507 │ │ │ │ 508 │ │ if cls.setup_context == _SingleLevelFunction.setup_context: │ │ 509 │ │ │ raise RuntimeError( │ │ │ │ /home/k/.local/lib/python3.10/site-packages/torch/cuda/amp/autocast_mode.py: │ │ 98 in decorate_fwd │ │ │ │ 95 │ │ args[0]._dtype = torch.get_autocast_gpu_dtype() │ │ 96 │ │ if cast_inputs is None: │ │ 97 │ │ │ args[0]._fwd_used_autocast = torch.is_autocast_enabled() │ │ ❱ 98 │ │ │ return fwd(*args, **kwargs) │ │ 99 │ │ else: │ │ 100 │ │ │ autocast_context = torch.is_autocast_enabled() │ │ 101 │ │ │ args[0]._fwd_used_autocast = False │ │ │ │ /home/k/nerf2mesh/gridencoder/grid.py:54 in forward │ │ │ │ 51 │ │ else: │ │ 52 │ │ │ dy_dx = None │ │ 53 │ │ │ │ ❱ 54 │ │ _backend.grid_encode_forward(inputs, embeddings, offsets, outp │ │ 55 │ │ │ │ 56 │ │ # permute back to [B, L * C] │ │ 57 │ │ outputs = outputs.permute(1, 0, 2).reshape(B, L * C) │ ╰──────────────────────────────────────────────────────────────────────────────╯ TypeError: grid_encode_forward(): incompatible function arguments. The following argument types are supported: 1. (arg0: torch.Tensor, arg1: torch.Tensor, arg2: torch.Tensor, arg3: torch.Tensor, arg4: int, arg5: int, arg6: int, arg7: int, arg8: int, arg9: float, arg10: int, arg11: Optional[torch.Tensor], arg12: int, arg13: bool, arg14: int) -> None
please, help ..
The text was updated successfully, but these errors were encountered:
No branches or pull requests
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/k/nerf2mesh/main.py:224 in │
│ │
│ 221 │ │ │ valid_loader = NeRFDataset(opt, device=device, type='val') │
│ 222 │ │ │ │
│ 223 │ │ │ trainer.metrics = [PSNRMeter(),] │
│ ❱ 224 │ │ │ trainer.train(train_loader, valid_loader, max_epoch) │
│ 225 │ │ │ │
│ 226 │ │ │ # last validation │
│ 227 │ │ │ trainer.metrics = [PSNRMeter(), SSIMMeter(), LPIPSMeter(de │
│ │
│ /home/k/nerf2mesh/nerf/utils.py:902 in train │
│ │
│ 899 │ │ for epoch in range(self.epoch + 1, max_epochs + 1): │
│ 900 │ │ │ self.epoch = epoch │
│ 901 │ │ │ │
│ ❱ 902 │ │ │ self.train_one_epoch(train_loader) │
│ 903 │ │ │ │
│ 904 │ │ │ if (self.epoch % self.save_interval == 0 or self.epoch == │
│ 905 │ │ │ │ self.save_checkpoint(full=True, best=False) │
│ │
│ /home/k/nerf2mesh/nerf/utils.py:1127 in train_one_epoch │
│ │
│ 1124 │ │ │ │
│ 1125 │ │ │ # update grid every 16 steps │
│ 1126 │ │ │ if self.model.cuda_ray and self.global_step % self.opt.up │
│ ❱ 1127 │ │ │ │ loss_grid = self.model.update_extra_state() │
│ 1128 │ │ │ else: │
│ 1129 │ │ │ │ loss_grid = None │
│ 1130 │
│ │
│ /home/k/nerf2mesh/nerf/renderer.py:972 in update_extra_state │
│ │
│ 969 │ │ │ │ │ │ │ │ cas_xyzs += (torch.rand_like(cas_xyzs │
│ 970 │ │ │ │ │ │ │ │ # query density │
│ 971 │ │ │ │ │ │ │ │ with torch.cuda.amp.autocast(enabled= │
│ ❱ 972 │ │ │ │ │ │ │ │ │ sigmas = self.density(cas_xyzs)[' │
│ 973 │ │ │ │ │ │ │ │ # assign │
│ 974 │ │ │ │ │ │ │ │ tmp_grid[cas, indices] = sigmas │
│ 975 │
│ │
│ /home/k/nerf2mesh/nerf/network.py:65 in density │
│ │
│ 62 │ def density(self, x): │
│ 63 │ │ │
│ 64 │ │ # sigma │
│ ❱ 65 │ │ h = self.encoder(x, bound=self.bound) │
│ 66 │ │ h = self.sigma_net(h) │
│ 67 │ │ │
│ 68 │ │ sigma = trunc_exp(h[..., 0]) │
│ │
│ /home/k/.local/lib/python3.10/site-packages/torch/nn/modules/module.py:1501 │
│ in _call_impl │
│ │
│ 1498 │ │ if not (self._backward_hooks or self._backward_pre_hooks or s │
│ 1499 │ │ │ │ or _global_backward_pre_hooks or _global_backward_hoo │
│ 1500 │ │ │ │ or _global_forward_hooks or _global_forward_pre_hooks │
│ ❱ 1501 │ │ │ return forward_call(*args, **kwargs) │
│ 1502 │ │ # Do not call functions when jit is used │
│ 1503 │ │ full_backward_hooks, non_full_backward_hooks = [], [] │
│ 1504 │ │ backward_pre_hooks = [] │
│ │
│ /home/k/nerf2mesh/gridencoder/grid.py:156 in forward │
│ │
│ 153 │ │ prefix_shape = list(inputs.shape[:-1]) │
│ 154 │ │ inputs = inputs.view(-1, self.input_dim) │
│ 155 │ │ │
│ ❱ 156 │ │ outputs = grid_encode(inputs, self.embeddings, self.offsets, s │
│ 157 │ │ outputs = outputs.view(prefix_shape + [self.output_dim]) │
│ 158 │ │ │
│ 159 │ │ #print('outputs', outputs.shape, outputs.dtype, outputs.min(). │
│ │
│ /home/k/.local/lib/python3.10/site-packages/torch/autograd/function.py:506 │
│ in apply │
│ │
│ 503 │ │ if not torch._C._are_functorch_transforms_active(): │
│ 504 │ │ │ # See NOTE: [functorch vjp and autograd interaction] │
│ 505 │ │ │ args = _functorch.utils.unwrap_dead_wrappers(args) │
│ ❱ 506 │ │ │ return super().apply(*args, **kwargs) # type: ignore[misc │
│ 507 │ │ │
│ 508 │ │ if cls.setup_context == _SingleLevelFunction.setup_context: │
│ 509 │ │ │ raise RuntimeError( │
│ │
│ /home/k/.local/lib/python3.10/site-packages/torch/cuda/amp/autocast_mode.py: │
│ 98 in decorate_fwd │
│ │
│ 95 │ │ args[0]._dtype = torch.get_autocast_gpu_dtype() │
│ 96 │ │ if cast_inputs is None: │
│ 97 │ │ │ args[0]._fwd_used_autocast = torch.is_autocast_enabled() │
│ ❱ 98 │ │ │ return fwd(*args, **kwargs) │
│ 99 │ │ else: │
│ 100 │ │ │ autocast_context = torch.is_autocast_enabled() │
│ 101 │ │ │ args[0]._fwd_used_autocast = False │
│ │
│ /home/k/nerf2mesh/gridencoder/grid.py:54 in forward │
│ │
│ 51 │ │ else: │
│ 52 │ │ │ dy_dx = None │
│ 53 │ │ │
│ ❱ 54 │ │ _backend.grid_encode_forward(inputs, embeddings, offsets, outp │
│ 55 │ │ │
│ 56 │ │ # permute back to [B, L * C] │
│ 57 │ │ outputs = outputs.permute(1, 0, 2).reshape(B, L * C) │
╰──────────────────────────────────────────────────────────────────────────────╯
TypeError: grid_encode_forward(): incompatible function arguments. The following
argument types are supported:
1. (arg0: torch.Tensor, arg1: torch.Tensor, arg2: torch.Tensor, arg3:
torch.Tensor, arg4: int, arg5: int, arg6: int, arg7: int, arg8: int, arg9:
float, arg10: int, arg11: Optional[torch.Tensor], arg12: int, arg13: bool,
arg14: int) -> None
please, help ..
The text was updated successfully, but these errors were encountered: