文件最后提交记录最后更新时间
init 4 年前
!4671 【fix】批量修改模型python版本,兼容环境上的python3.8版本 * fix python version 3 年前
init 4 年前
init 4 年前
init 4 年前
init 4 年前
!5789 Network address of models to be rectified: 19 Merge pull request !5789 from Yss/network_declaration_19 2 年前
init 4 年前
init 4 年前
init 4 年前
fix link validity Co-authored-by: frozenleaves<914814442@qq.com> # message auto-generated for no-merge-commit merge: !7517 merge master into master fix link validity Created-by: frozenn Commit-by: frozenleaves Merged-by: ascend-robot Description: ## Motivation Please describe the motivation of this PR and the goal you want to achieve through this PR. ## Modification Please briefly describe what modification is made in this PR. ## Self-test (Optional) If modifications to this PR may cause/fix function/accuracy/performance DTSs/issues, a self-inspection record needs to be attached. ## BC-breaking (Optional) If there are compatibility issues, such as dependencies on cann/torch_npu versions, they need to be explained in the PR. ## Checklist **Before PR**: - [ ] The new code needs to comply with the Clean Code specification. - [ ] The PR content is self-checked, and the expression can be clear and the writing standardized **After PR**: - [ ] CLA has been signed and all committers have signed the CLA in this PR. - [ ] The ci-pipeline is passed, Code Check is passed. See merge request: Ascend/ModelZoo-PyTorch!75171 个月前
[众智][PyTorch]整改模型中的requirements.txt文件,删除torch,apex Signed-off-by: bailang <bailang12@h-partners.com> 3 年前
init 4 年前
init 4 年前
README.md

DQN

This implements training of DQN on the game BreakoutNoFrameskip-v4, mainly modified from pytorch/examples.

DQN Detail

Deep Q-Learning (DQN) combines the method of neural network and Q learning.

Requirements

  • Install PyTorch and torchvision(pytorch.org)

  • 安装requirements.txt里面要求的依赖

  • 配置mujoco

    从https://www.roboti.us/license.html上点击Activation key下载mjkey.txt

    从https://www.roboti.us/download/mjpro150_linux.zip下载mjpro150_linux.zip

    在root目录下创建隐藏文件夹.mujoco(不要忘记带.),并将mjpro150_linux.zip安装包解压到这个文件夹下

    将mjkey.txt移动到~/.mujoco 和 ~/.mujoco/mjpro150/bin下

    添加环境变量, 打开~/.bashrc文件,添加以下指令

    export LD_LIBRARY_PATH=~/.mujoco/mjpro150/bin${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

    export MUJOCO_KEY_PATH=~/.mujoco${MUJOCO_KEY_PATH}

  • baselines安装

    git clone https://github.com/openai/baselines.git

    cd baselines

    pip install -e .

Training

To train a model, run train_dqn.py with the desired model architecture:

# training 1p accuracy
bash test/train_full_1p.sh 

# training 1p performance
bash test/train_performance_1p.sh

# training 1p eval
bash test/train_eval_1p.sh --pth_path=data/DQNAgent-train_full_1p-xx.model ---status_path=data/DQNAgent-train_full_1p-xx.stats

Log path:

test/output/{device_id}/train_full_1p_{device_id}.txt

test/output/{device_id}/train_performance_1p_{device_id}.txt

test/output/{device_id}/train_eval_1p_{device_id}.txt

DQN training result

Acc@1 FPS Npu_nums steps AMP_Type
- 62.9 step/s 1 80000 O1
99.3 - 1 5000000 O1

Statement

For details about the public address of the code in this repository, you can get from the file public_address_statement.md