I want to multiply the input to forward by a large constant. Would it be ok to save the constant in the __init__ function?

Would this break the autograd? And what is the difference between doing this and using self.register_buffer


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().