Solved by ptrblck in post #4 
              
              
                In your code snippet you are loading the state_dict into model, while I assume you want to load it into model_loaded, which will raise a RuntimeError, since no x buffer was registered: 
import torch 
from typing import Optional

class Model(torch.nn.Module):
    def __init__(self,x: Optional[list] =…