Yeah so in my model, I have code that detaches the gradients for res2, ie:
        with torch.no_grad():
            out = self.mod1(img)
            out = self.mod2(self.pool2(out))
            out = self.mod3(self.pool3(out)).detach()
        res2 = out

And since checkpoint has the behaviour that it makes all outputs require a gradient, when it tries to do it here I think it gets conflicted. Since in the model definition a gradient is not required but then the flag requires_grad is true. Hence it outputs the error [4]<stderr>:RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn. Or so I think is the case…