RuntimeError:尝试使用封闭的会话。在tensorforce中还原模型

时间:2019-06-14 17:53:37

标签: reinforcement-learning

runner.run(episodes=episodes,max_episode_timesteps=200,episode_finished=episode_finished)

agent.save_model(directory='savefile/ppo')

saved_agent = agent.restore_model(directory="savefile/ppo")
env = gym.make("CartPole-v0")
s = env.reset()
done = False
while not done:
    env.render()
    action = saved_agent.act(s)
    s, r, done, _ = env.step(action)    

还原模型时发生错误:

  

RuntimeError:尝试使用封闭会话。

0 个答案:

没有答案