面向分布式强化学习的经验回放框架——Reverb: A Framework for Experience Replay
论文题目:
Reverb: A Framework for Experience Replay
地址:
https://arxiv.org/pdf/2102.04736.pdf
框架代码地址:
https://github.com/deepmind/reverb
相关文章:
面向分布式强化学习的经验回放框架(使用例子Demo)——Reverb: A Framework for Experience Replay
pip安装方式:(该方式大概率无法成功安装,此时可以参考本文底部的详细安装教程)
pip install dm-reverb
注意事项:
由于该框架是为TensorFlow所设计的,因此该框架的输入和输出变量均为TensorFlow的向量tensor,如果其他深度学习框架需要使用该分布式经验池框架则需要手动将输入和输出的变量转为numpy.array再进行转换,比如pytorch的tensor需要先转为numpy.array,然后再转为tensorflow.tensor 。
reverb框架和TensorFlow框架均为Google内部使用的框架,因此可以参考的使用案例和教程代码都很少,这也是Google的计算框架难以被外界使用的一个原因,对于reverb框架来说,没有比较成熟的教程代码,因此难以使用。
------------------------------------------------------------------
偶然间看到了这个experience replay框架,这个框架可以被看做是公开的工业界使用的面向分布式的经验回放框架,这方面的工作一直较少,可能这样的工作更偏向于工程而不是学术所以导致很少有人在做,即使是那些工业界也少有人在做这方面的工作,但是这样的工作还是蛮有必要的,毕竟算法这东西最后还是要服务于工业界的。
-------------------------------------------------------------------------
介绍一个reverb的函数:
reverb.rate_limiters.SampleToInsertRatio
帮助文档:
SampleToInsertRatio(samples_per_insert: float, min_size_to_sample: int, error_buffer: Union[float, Tuple[float, float]])
|
| Maintains a specified ratio between samples and inserts.
|
| The limiter works in two stages:
|
| Stage 1. Size of table is lt `min_size_to_sample`.
| Stage 2. Size of table is ge `min_size_to_sample`.
|
| During stage 1 the limiter works exactly like MinSize, i.e. it allows
| all insert calls and blocks all sample calls. Note that it is possible to
| transition into stage 1 from stage 2 when items are removed from the table.
|
| During stage 2 the limiter attempts to maintain the ratio
| `samples_per_inserts` between the samples and inserts. This is done by
| measuring the "error" in this ratio, calculated as:
|
| number_of_inserts * samples_per_insert - number_of_samples
|
| If `error_buffer` is a number and this quantity is larger than
| `min_size_to_sample * samples_per_insert + error_buffer` then insert calls
| will be blocked; sampling will be blocked for error less than
| `min_size_to_sample * samples_per_insert - error_buffer`.
|
| If `error_buffer` is a tuple of two numbers then insert calls will block if
| the error is larger than error_buffer[1], and sampling will block if the error
| is less than error_buffer[0].
|
| `error_buffer` exists to avoid unnecessary blocking for a system that is
| more or less in equilibrium.
该函数通过设置:samples_per_insert和error_buffer变量实现对sample和insert操作的权衡,主要思想就是如果sample的过少就阻塞insert操作;如果insert的太少就阻塞sample。
通过判断number_of_inserts * samples_per_insert - number_of_samples的值来判断现在的sample和insert操作的权衡情况,如果该值大于min_size_to_sample * samples_per_insert + error_buffer,那么说明insert的太多了,需要阻塞insert操作,此时sample可以正常继续;如果该值小于min_size_to_sample * samples_per_insert - error_buffer,那么说明此时sample的太多了,此时需要阻塞sample操作,而insert操作可以正常继续。
========================================================
这个框架的安装方法(ubuntu系统环境下):
强化学习分布式经验回放框架(experience replay)reverb的安装
=====================================================
面向分布式强化学习的经验回放框架——Reverb: A Framework for Experience Replay的更多相关文章
- 分布式强化学习基础概念(Distributional RL )
分布式强化学习基础概念(Distributional RL) from: https://mtomassoli.github.io/2017/12/08/distributional_rl/ 1. Q ...
- 强化学习(十七) 基于模型的强化学习与Dyna算法框架
在前面我们讨论了基于价值的强化学习(Value Based RL)和基于策略的强化学习模型(Policy Based RL),本篇我们讨论最后一种强化学习流派,基于模型的强化学习(Model Base ...
- ICML 2018 | 从强化学习到生成模型:40篇值得一读的论文
https://blog.csdn.net/y80gDg1/article/details/81463731 感谢阅读腾讯AI Lab微信号第34篇文章.当地时间 7 月 10-15 日,第 35 届 ...
- 5G网络的深度强化学习:联合波束成形,功率控制和干扰协调
摘要:第五代无线通信(5G)支持大幅增加流量和数据速率,并提高语音呼叫的可靠性.在5G无线网络中共同优化波束成形,功率控制和干扰协调以增强最终用户的通信性能是一项重大挑战.在本文中,我们制定波束形成, ...
- 强化学习(十八) 基于模拟的搜索与蒙特卡罗树搜索(MCTS)
在强化学习(十七) 基于模型的强化学习与Dyna算法框架中,我们讨论基于模型的强化学习方法的基本思路,以及集合基于模型与不基于模型的强化学习框架Dyna.本文我们讨论另一种非常流行的集合基于模型与不基 ...
- ICML论文|阿尔法狗CTO讲座: AI如何用新型强化学习玩转围棋扑克游戏
今年8月,Demis Hassabis等人工智能技术先驱们将来到雷锋网“人工智能与机器人创新大会”.在此,我们为大家分享David Silver的论文<不完美信息游戏中的深度强化学习自我对战&g ...
- 强化学习中的经验回放(The Experience Replay in Reinforcement Learning)
一.Play it again: reactivation of waking experience and memory(Trends in Neurosciences 2010) SWR发放模式不 ...
- 谷歌重磅开源强化学习框架Dopamine吊打OpenAI
谷歌重磅开源强化学习框架Dopamine吊打OpenAI 近日OpenAI在Dota 2上的表现,让强化学习又火了一把,但是 OpenAI 的强化学习训练环境 OpenAI Gym 却屡遭抱怨,比如不 ...
- 谷歌推出新型强化学习框架Dopamine
今日,谷歌发布博客介绍其最新推出的强化学习新框架 Dopamine,该框架基于 TensorFlow,可提供灵活性.稳定性.复现性,以及快速的基准测试. GitHub repo:https://git ...
- 【强化学习】1-1-2 “探索”(Exploration)还是“ 利用”(Exploitation)都要“面向目标”(Goal-Direct)
title: [强化学习]1-1-2 "探索"(Exploration)还是" 利用"(Exploitation)都要"面向目标"(Goal ...
随机推荐
- javascript class 方法的this指向问题
踩坑记录 JavaScript 的 class 里面有两种定义方法的方式 普通函数(fun1) 箭头函数(fun2) class Obj { func1() { // write some code. ...
- 三月二十五日 安卓打卡app开发
今天完成了每月打卡次数统计功能 public static String count(String account) throws SQLException { Connection connecti ...
- uniapp iphone 6s获取时间戳失败
上代码 时间格式:2023-10-11 00:00:00 var ms = new Date(item.content.goodsList[0].end_time).getTime() 使用iphon ...
- ansible v2.9.9离线安装脚本
链接:https://pan.baidu.com/s/18uxyWWyJ39i1mJJ1hb8zww?pwd=QWSC 提取码:QWSC
- ServiceMesh、SideCar和Istio
Service Mesh简介 Service Mesh直译过来就是服务网格,而他的架构就是一个个微服务组成的网络. Sidecar简介 Service Mesh中的节点就是Sidecar节点. sid ...
- 高通lk阶段mipi 代码解析以及新屏幕添加
参考:https://www.cnblogs.com/linhaostudy/p/9237526.html 背景 前段时间做了这块的工作,但总结完以后领导说我的认识还是过于肤浅,因此重新再看了一下. ...
- RK3588J + 麒麟系统,“软硬件”全国产——让您的产品更具竞争力!
银河麒麟嵌入式操作系统简介 银河麒麟嵌入式操作系统V10是面向物联网及工业互联网场景的安全实时嵌入式操作系统,具备信息安全.多域隔离.云边端协同.多样性算力支持等特点,可满足嵌入式场景对操作系统小型化 ...
- 嵌入式知识分享——GDB程序调试方法说明
前 言 本指导文档适用开发环境: Windows开发环境:Windows 7 64bit.Windows 10 64bit Linux开发环境:Ubuntu 18.04.4 64bit 虚拟机:VM ...
- spark内核架构深度剖析
- 五个节点的hadoop集群--主要配置文件
五个节点:配置文件解析:hadoop01 NameNode .DataNode.NodeManagerhadoop02 ResourceManager hadoop03 D ...