Would this break the autograd? And what is the difference between doing this and using self.register_buffer
Hi,
In the init of the nn.Module
? No that won’t change anything from the point of view of the autograd.
The benefit of having it being a buffer is that it will be moved around when you do things like model.cuda()
.