1 Star 1 Fork 0

shan.li / DQN

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
PyTorch官网:https://pytorch.org/
Gym官网:https://gym.openai.com/docs/



搭建PyTorch + Gym运行环境(CPU、GPU二选一)

--------------------------------------------------------------------------------------------
CPU版本:
前提:
安装Python,版本3.9以下(本项目使用3.8.8)
安装conda(本项目使用4.9.2)

正式搭建环境:
安装pytorch-cpu版本(本项目为1.8.1)
conda install pytorch torchvision torchaudio cpuonly -c pytorch

安装OpenCv(本项目使用4.5.1.48)
pip install opencv-python  -i https://pypi.douban.com/simple/

安装atari
pip install --no-index -f https://github.com/Kojoley/atari-py/releases atari_py

安装gym
pip install gym
--------------------------------------------------------------------------------------------


--------------------------------------------------------------------------------------------
GPU版本:
前提:
搭载显卡:支持cuda(本项目使用显卡为GTX 1080Ti)
安装Python,版本3.9以下(本项目使用3.8.8)
安装conda(本项目使用4.9.2)
安装cuda(本项目使用11.0)
安装cudnn(本项目使用8.0.3)

正式搭建环境:
安装pytorch-gpu版本(本项目为1.7.1),注意需和电脑已经安装的cuda版本匹配
conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch

安装OpenCv(本项目使用4.5.1.48)
pip install opencv-python  -i https://pypi.douban.com/simple/

安装atari
pip install --no-index -f https://github.com/Kojoley/atari-py/releases atari_py

安装gym
pip install gym
--------------------------------------------------------------------------------------------



附录1: cuda下载链接(用迅雷下载比较快)
    https://developer.nvidia.com/cuda-toolkit-archive
附录2: cuDNN下载链接(需要注册账号登录)
    https://developer.nvidia.com/rdp/cudnn-download
附录3:本项目PyTorch GPU安装信息
    package                    |            build
    ---------------------------|-----------------
    cudatoolkit-11.0.3         |       h3f58a73_8       942.7 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    pillow-8.2.0               |   py38h4fa10fc_0         671 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    pytorch-1.7.1              |py3.8_cuda110_cudnn8_0      1007.0 MB  pytorch
    torchaudio-0.7.2           |             py38         2.7 MB  pytorch
    torchvision-0.8.2          |       py38_cu110         7.3 MB  pytorch
    ------------------------------------------------------------
                                           Total:        1.91 GB

附录4:手动下载文件安装附录3的 PyTorch GPU (pytorch-1.7.1、torchaudio-0.7.2、torchvision-0.8.2)
在官网手动下载文件 https://download.pytorch.org/whl/torch_stable.html

[cu110/torch-1.7.1%2Bcu110-cp38-cp38-win_amd64.whl](https://download.pytorch.org/whl/cu110/torch-1.7.1%2Bcu110-cp38-cp38-win_amd64.whl)

[torchaudio-0.7.2-cp38-none-win_amd64.whl](https://download.pytorch.org/whl/torchaudio-0.7.2-cp38-none-win_amd64.whl)

[cu110/torchvision-0.8.2%2Bcu110-cp38-cp38-win_amd64.whl](https://download.pytorch.org/whl/cu110/torchvision-0.8.2%2Bcu110-cp38-cp38-win_amd64.whl)

pip install "torch-1.7.1+cu110-cp38-cp38-win_amd64.whl"
pip install "torchaudio-0.7.2-cp38-none-win_amd64.whl"
pip install "torchvision-0.8.2+cu110-cp38-cp38-win_amd64.whl"

参考博客:
https://www.cnblogs.com/emanlee/p/14332287.html
https://blog.csdn.net/qq_29831163/article/details/108402722

空文件

简介

深度强化学习算法学习 展开 收起
Python
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/lishan666/dqn.git
git@gitee.com:lishan666/dqn.git
lishan666
dqn
DQN
master

搜索帮助