If you want output_toeplitz to change when you update self.convtest.weight, then you have to make sure that you only use ops that are views to get from to the other.
Here you create a Tensor full of zeros that has brand new memory. So this one can’t be a view of kernel.
You might want to use the Unfold class we provide to do that to get a view properly: Unfold — PyTorch 1.7.0 documentation 2