Skip to content

TypeError: 'tuple' object is not callable #4

@cdcseacave

Description

@cdcseacave

I get the following error when running bash run.sh:

Setting up PyTorch plugin "gridsample_grad2"... /home/dan/miniconda3/envs/petneus/lib/python3.8/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
/home/dan/miniconda3/envs/petneus/lib/python3.8/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
/home/dan/miniconda3/envs/petneus/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=VGG16_Weights.IMAGENET1K_V1`. You can also use `weights=VGG16_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)

  0%|          | 0/100000 [00:00<?, ?it/s]
  0%|          | 0/100000 [00:00<?, ?it/s]
Done.
Hello Wooden
Load data: Begin
Load data: End
Setting up [LPIPS] perceptual loss: trunk [vgg], v[0.1], spatial [off]
Loading model from: /home/dan/miniconda3/envs/petneus/lib/python3.8/site-packages/lpips/weights/v0.1/vgg.pth
Traceback (most recent call last):
  File "exp_runner_pet.py", line 497, in <module>
    runner.train()
  File "exp_runner_pet.py", line 167, in train
    render_out = self.renderer.render(rays_o, rays_d, near, far,
  File "/mnt/d/apps/PET-NeuS/models/renderer_pet.py", line 364, in render
    gradient = self.sdf_network.gradient(pts.reshape(-1, 3)).squeeze().detach()
  File "/mnt/d/apps/PET-NeuS/models/triplane_pet.py", line 159, in gradient
    gradients = torch.autograd.grad(
  File "/home/dan/miniconda3/envs/petneus/lib/python3.8/site-packages/torch/autograd/__init__.py", line 303, in grad
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
  File "/home/dan/miniconda3/envs/petneus/lib/python3.8/site-packages/torch/autograd/function.py", line 274, in apply
    return user_fn(self, *args)
  File "/mnt/d/apps/PET-NeuS/third_party/ops/grid_sample.py", line 59, in backward
    grad_input, grad_grid = _GridSample2dBackward.apply(grad_output, input, grid, ctx.padding_mode, ctx.align_corners)
  File "/home/dan/miniconda3/envs/petneus/lib/python3.8/site-packages/torch/autograd/function.py", line 506, in apply
    return super().apply(*args, **kwargs)  # type: ignore[misc]
  File "/mnt/d/apps/PET-NeuS/third_party/ops/grid_sample.py", line 68, in forward
    grad_input, grad_grid = op(grad_output, input, grid, 0, padding_mode, align_corners, output_mask)
TypeError: 'tuple' object is not callable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions