chengxuxin/extreme-parkour

KeyError: 'depth_actor_state_dict'

XanderWangXY opened this issue · 4 comments

When I use command "python save_jit.py --exptid xxx-xx" I meet this error.

Traceback (most recent call last):
File "/home/adc/pycharm-community-2023.3.2/plugins/python-ce/helpers/pydev/pydevd.py", line 1534, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/adc/pycharm-community-2023.3.2/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/adc/extreme-parkour/legged_gym/legged_gym/scripts/save_jit.py", line 123, in
play(args)
File "/home/adc/extreme-parkour/legged_gym/legged_gym/scripts/save_jit.py", line 91, in play
policy.actor.load_state_dict(ac_state_dict['depth_actor_state_dict'], strict=True)
KeyError: 'depth_actor_state_dict'

How can I solve it?

I have solved it..

I am getting the same error. Can you share how you solved it?

I am getting the same error. Can you share how you solved it?

change "--exptid" value to the same file name as the trained distill model file
python save_jit.py --exptid yyy-yy

Have you deploy the model into real robot?