When you do operations on Variables, PyTorch keeps track of the computation graph in order to be able to backpropagate.
Inplace operations are non-differentiable. That is why var.zero_() gives an error.
For a variable var, the underlying data is stored in a tensor that is accessible via var.data. If you do an operation on var.data PyTorch does not add the operation to the computation graph.
I think what happened in your case is that the forward method of nn.Conv2d saved some partial results to be used in the backward pass. I think that is why it didn’t use the updated value of input_var.