self.register_buffer
accomplishes the following: - If we move the module to the GPU, anything that is registered as buffer will be moved to the GPU.
- If we save the module, whatever we put in the buffers will be saved along with everything else.
nn.Module
, what does self.register_buffer
do?
Answer
self.register_buffer
accomplishes the following: Relevant part of lecture