moyashi_gashi
@moyashi_gashi (TKB もやし)

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

keras-rlで自前環境での学習

OpenAiGymで行動空間、観測空間がどちらも(5,2)の環境を作りkeras-rlで学習させたのですが
以下のようなエラーが出て実行できません

Traceback (most recent call last):
  File "train.py", line 71, in <module>
    run()
  File "train.py", line 67, in run
    agent.fit(env, nb_steps=50000, visualize=False, verbose=1, nb_max_episode_steps=200)
  File "/Users/myname/.pyenv/versions/3.7.1/lib/python3.7/site-packages/rl/core.py", line 170, in fit
    action = self.forward(observation)
  File "/Users/myname/.pyenv/versions/3.7.1/lib/python3.7/site-packages/rl/agents/ddpg.py", line 198, in forward
    action = self.select_action(state)  # TODO: move this into policy
  File "/Users/myname/.pyenv/versions/3.7.1/lib/python3.7/site-packages/rl/agents/ddpg.py", line 185, in select_action
    assert action.shape == (self.nb_actions,)
AssertionError

どうすればいいのかご存知の方、よろしくお願いします

0

1Answer

Comments

  1. @moyashi_gashi

    Questioner

    そちらで類似の質問を探した結果、keras-rl2に切り替える記事がありました。
    試してみます
    ありがとうございます

Your answer might help someone💌