参考csdn博客:
安装PyTorch详细过程_pytorch安装-CSDN博客
(能踩坑全踩了的总结)从零开始用miniconda配置pytorch环境以适用pycharm_miniconda和anaconda哪个好-CSDN博客
安装numpy
conda install numpy
安装matplotlib
conda install matplotlib
安装gym
conda install gym
运行需要gym的python程序时候,已经下载了gym后仍然报:AttributeError: module ‘gym.envs.box2d’ has no attribute ‘LunarLander’
安装box2d
conda install conda-forge::box2d-py
在这个地方查找:Search :: Anaconda.org
box2d
DRQN github
GitHub - keep9oing/DRQN-Pytorch-CartPole-v1: Deep recurrent Q learning on CartPole-v1 environment
安装Tensorboard
conda install Tensorboard
参考:DRQN学习——代码解读_drqn伪代码-CSDN博客
WTF-DeepRL/08_DRQN/readme.md at master · AmazingAng/WTF-DeepRL · GitHub
GitHub - AmazingAng/WTF-DeepRL: Deep RL algorithm in pytorch
在此篇文章[问题解决] 将demo.ipynb转为demo.py中,我们将demo.ipynb文件转为demo.py文件方便我们在命令行下执行,在执行过程中发现报如标题的错误。
我们只需要打开demo.py文件,注释如下内容即可
ModuleNotFoundError: No module named 'atari_wrappers'
把atari_wrappers.py放到文件夹下
安装opencv
conda install fastai::opencv-python-headless
ImportError: No module named IPython
conda install ipython
gym.error.DependencyNotInstalled: No module named 'atari_py'. (HINT: you can install Atari dependencies by running 'pip install gym[atari]'.)
pip install gym[atari] -i https://pypi.tuna.tsinghua.edu.cn/simple
使用了国内源,安装更快
Jupyter notebook切换运行环境,并使用该环境
Jupyter notebook切换运行环境,并使用该环境_本地创建的notebook是在用本地的环境吗-CSDN博客
python运行报错RuntimeError: view size is not compatible with input tensor‘s size and stride (at least..)
出现这个原因主要就是因为view()需要Tensor中的元素地址是连续的,因为可能出现Tensor不连续的情况,所以修改方法为:
在.view前加.contiguous(),使其变为连续就ok。