Open Weiyi-Zhang258 opened 4 years ago
me, too. It told me the string I give is a directory. Should I give path of one of these three?
Hello, I also have this problem. Could you tell me how you solved it?
Hello, I also have this problem. Could you tell me how you solved it?
parser.add_argument('--load_model_path', help='if provided, load the model', type=str, default='./baselines/checkpoint/BC.commonroad.trajlimitation-1.seed_1')
ob_space = env.observation_space ac_space = env.action_space pi = policy_func("pi", ob_space, ac_space, reuse=reuse) variables = tf.contrib.framework.get_variables_to_restore() variables_to_restore = [v for v in variables if v.name.split('/')[0]=='pi'] saver = tf.train.Saver(variables_to_restore) saver.restore(tf.get_default_session(), tf.train.latest_checkpoint(load_model_path))
Thanks for your tips. It solved this problem well.
I understand that the reason for the problem is that the saved model is a collection of files generated by tensorflow, but when loading the model in U.load_variables(load_model_path)
, joblib.load
is used
I've finished training and get a model like this: When I set the args like this: parser.add_argument('--load_model_path', help='if provided, load the model', type=str, default='G:/Anaconda/envs/zwy/Lib/site-packages/baselines-master/baselines-master/baselines/gail/checkpoint/trpo_gail.transitionlimitation-1.Hopper/trpo_gail.transitionlimitation-1.Hopper') It does not work. What args should I write to load it?