I’m using this model: GitHub - mit-han-lab/pvcnn: [NeurIPS 2019, Spotlight] Point-Voxel CNN for Efficient 3D Deep Learning, pretrained on ShapeNet
I checked my code and it seems that the problem arises whenever I call model.eval() or model.train(mode=False)
Here is a snippet of my code that should be runnable when instantiated with some custom model:
import torch
import torch.nn as nn

model = ...
(maybe load state dict)
model.eval()
for p in model.parameters():
    p.requires_grad = False

a_= (create random tensor)
c = a_.clone()
c = nn.Parameter(c)

for _, v in model(c).items():
    v.sum().backward()