Solved by albanD in post #4 
              
              
                Ho my bad actually, you have to call it explicitly: 
self.register_buffer('eye', torch.eye(4, requires_grad=False)) (instead of self.eye = xxx).