Closed junzlovegood closed 5 months ago
You can use the following args in cfg file to load from ckpt. federate.restore_from | (string) '' | The checkpoint file to restore the model. | - |
---|---|---|---|
federate.save_to | (string) '' | The path to save the model. | - |
Thanks. I want to obtain the model's predicted output results for each input data (eval result). How should I modify the code?
Duplicated #764
I want to use my saving model , but i get error:
Traceback (most recent call last): File "ause_model.py", line 82, in <module> model = load_model('./client_1_main_global_model.pth') File "ause_model.py", line 78, in load_model model.load_state_dict(torch.load(model_path)) File "//site-packages/torch/nn/modules/module.py", line 1482, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for MyLSTM: Missing key(s) in state_dict: "rnn.weight_ih_l0", "rnn.weight_hh_l0", "rnn.bias_ih_l0", "rnn.bias_hh_l0", "rnn.weight_ih_l0_reverse", "rnn.weight_hh_l0_reverse", "rnn.bias_ih_l0_reverse", "rnn.bias_hh_l0_reverse", "output_layer.weight", "output_layer.bias". Unexpected key(s) in state_dict: "cur_round", "model".