Solved by anantguptadbl in post #4 
              
              
                In case you want to do something more elaborate, you can directly access the underlying dict. But @albanD 's solution is the best 
import torch
model.register_buffer("_variable", torch.FloatTensor([0]))    
model.register_parameter("_parameter", torch.nn.Parameter(torch.FloatTensor([1])))
model._buf…