【发布时间】:2021-08-20 19:53:01
【问题描述】:
所以我希望使用 GPU/TPU 在 colab 上训练一个模型,因为我的本地机器没有。我不介意将培训可视化,我只想让 colab 完成大部分工作。
将我的 .ipynb 导入 colab 并在我尝试使用任何 atari 游戏创建环境时立即运行时,我收到错误:
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-21-8d6f8581e7f9> in <module>()
----> 1 env = gym.make('SpaceInvaders-v0')
2 height, width, channels = env.observation_space.shape
3 actions = env.action_space.n
4
5 model = build_model(height,width, channels,actions)
4 frames
/usr/local/lib/python3.7/dist-packages/atari_py/games.py in get_game_path(game_name)
18 path = os.path.join(_games_dir, game_name) + ".bin"
19 if not os.path.exists(path):
---> 20 raise Exception('ROM is missing for %s, see https://github.com/openai/atari-py#roms for instructions' % (game_name,))
21 return path
22
Exception: ROM is missing for space_invaders, see https://github.com/openai/atari-py#roms for instructions
在本地我遇到了这个问题,并通过 github 上的步骤来修复它,但我似乎无法让 colab 做类似的事情。我在网上找到了大量的教程,它们都可以正常工作,当我运行他们的 colabs 时,我遇到了同样的问题,所以我不知道该怎么做。
提前致谢
【问题讨论】:
标签: python google-colaboratory reinforcement-learning