mlperf_minigo_tensorflow强化学习模型

MiniGo

论文

Mastering the game of Go without human knowledge

模型结构

Minogo是一个基于深度强化学习的围棋程序,模型灵感来源于Google DeepMind开发的AlphaGo算法。

算法原理

该程序基于Tensorflow框架实现。Minigo的核心是AlphaZero论文中描述的强化学习循环。简单地说,使用当前一代网络权重的selfplay被用来生成游戏,这些游戏被用作训练数据来生成下一代网络权重。

环境配置

Docker (方法一)

提供光源拉取的训练的docker镜像:

docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:mlperf-minigo-latest
# <Image ID>用上面拉取docker镜像的ID替换
# <Host Path>主机端路径
# <Container Path>容器映射路径
docker run -it --name mlperf_minigo --shm-size=32G  --device=/dev/kfd --device=/dev/dri/ --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ulimit memlock=-1:-1 --ipc=host --network host --group-add video -v <Host Path>:<Container Path> <Image ID> /bin/bash

Dockerfile (方法二)

docker build --no-cache -t mlperf_minigo:latest .
docker run -it --name mlperf_minigo --shm-size=32G  --device=/dev/kfd --device=/dev/dri/ --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ulimit memlock=-1:-1 --ipc=host --network host --group-add video -v <Host Path>:<Container Path> <Image ID> /bin/bash
# <Image ID>用上面拉取docker镜像的ID替换
# <Host Path>主机端路径
# <Container Path>容器映射路径

镜像版本依赖:

  • DTK驱动:dtk22.04.2
  • python: python3.8.2

测试目录:

/root/minigo

数据集

训练数据:所有的训练数据都是在强化学习循环的selfplay阶段生成的。 唯一需要下载的数据是checkpoint以及target model,下载数据可按照下述进行:

# Download & extract bootstrap checkpoint.
    gsutil cp gs://minigo-pub/ml_perf/0.7/checkpoint.tar.gz .
    tar xfz checkpoint.tar.gz -C ml_perf/
# Download and freeze the target model.
mkdir -p ml_perf/target/
    gsutil cp gs://minigo-pub/ml_perf/0.7/target.* ml_perf/target/

训练

单机多卡

单机8卡进行性能&&精度测试

cd /root
source env.sh
cd /root/minigo
bash sbatch.sh >& log.txt &

result

精度

采用上述输入数据,加速卡采用Z100L * 8,可最终达到官方收敛要求,即达到目标精度50% win rate vs. checkpoint;

卡数类型进程数达到精度
8FP32850% win rate vs. checkpoint

应用场景

算法类别

强化学习

热点应用行业

广媒,科研,金融

源码仓库及问题反馈

参考资料

  • 10
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
您好,以下是 30 个比较好的 NLP 意图识别 GitHub 源码地址: 1. https://github.com/huggingface/transformers 2. https://github.com/google-research/bert 3. https://github.com/allenai/allennlp 4. https://github.com/tensorflow/tensor2tensor 5. https://github.com/tensorflow/models/tree/master/official/nlp 6. https://github.com/salesforce/davinci 7. https://github.com/tensorflow/tfds/tree/master/tfds/structures/slices 8. https://github.com/neuralmind-ai/language-modeling 9. https://github.com/openai/gpt-3 10. https://github.com/openai/language-model-zoo 11. https://github.com/huggingface/nlp 12. https://github.com/huggingface/transfer-learning-conv-ai 13. https://github.com/google-research/language 14. https://github.com/clovaai/kogpt2 15. https://github.com/cyberzhg/keras-bert 16. https://github.com/kyzhouhzau/BERT-NER 17. https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples/nlp 18. https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples/nlp/intent_classification 19. https://github.com/huggingface/nlp-tfds 20. https://github.com/tensorflow/tfjs-models/tree/master/nlp 21. https://github.com/tensorflow/models/tree/master/experimental/nlp 22. https://github.com/tensorflow/minigo/tree/master/nlp 23. https://github.com/tensorflow/tfjs-examples/tree/master/nlp 24. https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python/ops/nlp 25. https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python/ops/nlp_ops 26. https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python/ops/nlp_ops/lib 27. https://github.com/tensorflow/tfjs/tree/master/tfjs-core/src/ops/nlp 28. https://github.com/tensorflow/tfjs/tree/master/tfjs-core/src/ops/nlp_ops 29. https://github.com/tensorflow/tfjs/tree/master/tfjs-core/src/ops/nlp_utils 30. https://github.com/tensorflow/tfjs/tree/master/tfjs-examples/nlp 希望这些地
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

技术瘾君子1573

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值