← 开源
MorvanZhou

pytorch-A3C

Simple A3C implementation with pytorch + multiprocessing

Model DevelopmentReinforcement LearningPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
659
Star
142
Fork
+0
本周
2
贡献者
创建于 2018-01-18 · 更新于 2026-07-12 · 今日第 15365 名
主要开发者
MorvanZhouJbwasse2

MorvanZhou/pytorch-A3C 排名第 15,365,有 659 个星标。

同类别比较

MorvanZhou/pytorch-A3C 排名第 15,365,此处有 8 个同类条目;NVIDIA-AI-IOT/CUDA-PointPillars 排名第 15,366。

同类别比较
名称排名指标
arnoweng/CheXNet15,345
语言:
Python
星标数:
661
分叉数:
237
简介:
A pytorch reimplementation of CheXNet
bbaaii/DreamDiffusion15,356
语言:
Python
星标数:
660
分叉数:
80
简介:
Implementation of “DreamDiffusion: Generating High-Quality Images from Brain EEG Signals”
v-iashin/video_features15,360
语言:
Python
星标数:
660
分叉数:
112
简介:
Extract video features from raw videos using multiple GPUs. We support RAFT flow frames as well as S3D, I3D, R(2+1)D, VGGish, CLIP, and TIMM models.
yzhao062/combo15,361
语言:
Python
星标数:
660
分叉数:
105
简介:
(AAAI' 20) A Python Toolbox for Machine Learning Model Combination
NVIDIA-AI-IOT/CUDA-PointPillars15,366
语言:
Python
星标数:
659
分叉数:
185
简介:
A project demonstrating how to use CUDA-PointPillars to deal with cloud points data from lidar.
cpnota/autonomous-learning-library15,370
语言:
Python
星标数:
659
分叉数:
72
简介:
A PyTorch library for building deep reinforcement learning agents.
motiwari/BanditPAM15,373
语言:
C++
星标数:
659
分叉数:
52
简介:
BanditPAM C++ implementation and Python package
reservoirpy/reservoirpy15,376
语言:
Python
星标数:
659
分叉数:
156
简介:
A simple and flexible code for Reservoir Computing architectures like Echo State Networks
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Reinforcement Learning
关键词RL
星标数659
分叉数142
贡献者2
创建日期2018-01-18
更新日期2026-07-12
1 天星标数0
7 天星标数0
排名15,365
上次排名15,179
排名变化-186
7 天星标排名14,957
上次 7 天星标排名14,962
7 天星标排名变化5
总星标排名15,578
上次总星标排名15,551
总星标排名变化-27
国家China
README 摘录

Simple implementation of Reinforcement Learning (A3C) using Pytorch This is a toy example of using multiprocessing in Python to asynchronously train a neural network to play discrete action CartPole and continuous action Pendulum games. The asynchronous algorithm I used is called Asynchronous Advantage Actor-Critic or A3C. I believe it would be the simplest toy implementation you can find at the moment (2018-01). What are the main focuses in this implementation? Pytorch + multiprocessing (NOT threading) for parallel training Both

discrete and continuous action environments To be simple and easy to dig into the code (less than 200 lines) Reason of using Pytorch instead of Tensorflow Both of them are great for building your customized neural network. But to work with multiprocessing, Tensorflow is not that great due to its low compatibility with multiprocessing. I have an implementation of Tensorflow A3C build on threading. I even tried to implement distributed Tensorflow. However, the distributed version is for cluster computing which

I don't have. When using only one machine, it is slower than threading version I wrote. Fortunately, Pytorch gets the multiprocessing compatibility. I went through many Pytorch A3C examples (there, there and there). They are great but too complicated to dig into the code. Therefore, this is my motivation to write my simple example codes. BTW, if you are interested to learn Pytorch, there is my simple tutorial code with many visualizations. I also made the tensorflow tutorial (same as

pytorch) available in here. py: optimizer that shares its parameters in parallel utils. py: useful function that can be used more than once discrete_A3C. py: CartPole, neural net and training for discrete action space continuous_A3C. py: Pendulum, neural net and training for continuous action space CartPole result Pendulum result Dependencies pytorch >= 0.

常见问题

记录了多少星标和分叉?

MorvanZhou/pytorch-A3C 有 659 个星标和 142 个分叉。

仓库排名是多少?

MorvanZhou/pytorch-A3C 排名第 15,365。

记录的语言和类别是什么?

MorvanZhou/pytorch-A3C 有 659 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

MorvanZhou/pytorch-A3C 与 NVIDIA-AI-IOT/CUDA-PointPillars 比较,后者排名第 15,366,有 659 个星标。

README

Simple implementation of Reinforcement Learning (A3C) using Pytorch

This is a toy example of using multiprocessing in Python to asynchronously train a neural network to play discrete action CartPole and continuous action Pendulum games. The asynchronous algorithm I used is called Asynchronous Advantage Actor-Critic or A3C.

I believe it would be the simplest toy implementation you can find at the moment (2018-01).

What are the main focuses in this implementation?

  • Pytorch + multiprocessing (NOT threading) for parallel training
  • Both discrete and continuous action environments
  • To be simple and easy to dig into the code (less than 200 lines)

Reason of using Pytorch instead of Tensorflow

Both of them are great for building your customized neural network. But to work with multiprocessing, Tensorflow is not that great due to its low compatibility with multiprocessing. I have an implementation of Tensorflow A3C build on threading. I even tried to implement distributed Tensorflow. However, the distributed version is for cluster computing which I don't have. When using only one machine, it is slower than threading version I wrote.

Fortunately, Pytorch gets the multiprocessing compatibility. I went through many Pytorch A3C examples (there, there and there). They are great but too complicated to dig into the code. Therefore, this is my motivation to write my simple example codes.

BTW, if you are interested to learn Pytorch, there is my simple tutorial code with many visualizations. I also made the tensorflow tutorial (same as pytorch) available in here.

Codes & Results

  • shared_adam.py: optimizer that shares its parameters in parallel
  • utils.py: useful function that can be used more than once
  • discrete_A3C.py: CartPole, neural net and training for discrete action space
  • continuous_A3C.py: Pendulum, neural net and training for continuous action space

CartPole result

Pendulum result

Dependencies

  • pytorch >= 0.4.0
  • numpy
  • gym
  • matplotlib
排名相邻
同类项目