[RuntimeError] Shape not matching: the Program requires a parameter with a shape of ((30, 3)), while the loaded parameter (namely [ fc.w_9 ]) has a shape of ((33, 1)).
Created by: zbp-xxxp
[07-11 17:40:44 MainThread @machine_info.py:88] Cannot find available GPU devices, using CPU now. [07-11 17:40:44 MainThread @machine_info.py:88] Cannot find available GPU devices, using CPU now. [07-11 17:40:44 MainThread @machine_info.py:88] Cannot find available GPU devices, using CPU now. ---------------------------------------------------------------------------RuntimeError Traceback (most recent call last) in 108 109 if name == 'main': --> 110 main() in main() 83 agent = Agent(algorithm, obs_dim, act_dim) 84 ---> 85 agent.restore(r'model/pre_training/model_number_60.ckpt') 86 print("已成功加载模型!") 87 /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/parl/core/fluid/agent.py in restore(self, save_path, program) 194 dirname=dirname, 195 main_program=program, --> 196 filename=filename) /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/io.py in load_params(executor, dirname, main_program, filename) 796 main_program=main_program, 797 predicate=is_parameter, --> 798 filename=filename) 799 800 /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/io.py in load_vars(executor, dirname, main_program, vars, predicate, filename) 680 main_program=main_program, 681 vars=list(filter(predicate, main_program.list_vars())), --> 682 filename=filename) 683 else: 684 load_prog = Program() /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/io.py in load_vars(executor, dirname, main_program, vars, predicate, filename) 739 "Shape not matching: the Program requires a parameter with a shape of ({}), " 740 "while the loaded parameter (namely [ {} ]) has a shape of ({}).". --> 741 format(orig_shape, each_var.name, new_shape)) 742 743 RuntimeError: Shape not matching: the Program requires a parameter with a shape of ((30, 3)), while the loaded parameter (namely [ fc.w_9 ]) has a shape of ((33, 1)).
I cound't load program when i want to train a RL program. It doesn't matter when i load it in my PC. Could you give me some solution? Thanks~