DRL总结

参考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。

  • 5
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值