It seems you are manually appending some “weights” to g_global_weights and try to treat it as a state_dict, which is causing the issue.
You would have to use the workflow posted previously, i.e. create the state_dict via:
sd = model.state_dict()

and load it via:
model.load_state_dict(sd)

afterwards.
Currently you are replacing the initial state_dict with an empty list and append the (unknown) values.
PS: you can post code snippets by wrapping them into three backticks ```, which would make debugging easier.