The current implementation of load_state_dict is in Python 42, and basically it parses the weights dictionary and copies them into the model’s parameters 57.
So I guess you’ll need to do the same in CPP.