When you do a = conv(a), what happens is that you give the Tensor contained in the python variable a to the convolution, get a new Tensor as output and use the python variable a to refer to it.
This is not an in-place change of a, here you change what the python variable a refers to.