You could call backward() on intermediate tensors, but since x is created as an nn.Parameter I don’t know which “other input tensor” would be connected to it. Could you describe your use case a bit more?