Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDILab开源决策智能平台
DI-engine
提交
41dce176
D
DI-engine
项目概览
OpenDILab开源决策智能平台
/
DI-engine
上一次同步 2 年多
通知
56
Star
321
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DI-engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
41dce176
编写于
11月 25, 2021
作者:
N
niuyazhe
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
polish(nyz): polish impala atrai config
上级
4157cdae
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
23 deletion
+11
-23
ding/policy/impala.py
ding/policy/impala.py
+3
-7
dizoo/atari/config/serial/enduro/enduro_impala_config.py
dizoo/atari/config/serial/enduro/enduro_impala_config.py
+2
-4
dizoo/atari/config/serial/pong/pong_impala_config.py
dizoo/atari/config/serial/pong/pong_impala_config.py
+2
-4
dizoo/atari/config/serial/qbert/qbert_impala_config.py
dizoo/atari/config/serial/qbert/qbert_impala_config.py
+2
-4
dizoo/atari/config/serial/spaceinvaders/spaceinvaders_impala_config.py
...onfig/serial/spaceinvaders/spaceinvaders_impala_config.py
+2
-4
未找到文件。
ding/policy/impala.py
浏览文件 @
41dce176
...
...
@@ -39,7 +39,6 @@ class IMPALAPolicy(Policy):
| valid in serial training | means more off-policy
== ==================== ======== ============== ======================================== =======================
"""
unroll_len
=
32
config
=
dict
(
type
=
'impala'
,
cuda
=
False
,
...
...
@@ -49,6 +48,8 @@ class IMPALAPolicy(Policy):
priority
=
False
,
# (bool) Whether use Importance Sampling Weight to correct biased update. If True, priority must be True.
priority_IS_weight
=
False
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
32
,
learn
=
dict
(
# (bool) Whether to use multi gpu
multi_gpu
=
False
,
...
...
@@ -66,8 +67,6 @@ class IMPALAPolicy(Policy):
discount_factor
=
0.9
,
# (float) additional discounting parameter
lambda_
=
0.95
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
unroll_len
,
# (float) clip ratio of importance weights
rho_clip_ratio
=
1.0
,
# (float) clip ratio of importance weights
...
...
@@ -78,8 +77,6 @@ class IMPALAPolicy(Policy):
collect
=
dict
(
# (int) collect n_sample data, train model n_iteration times
n_sample
=
16
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
unroll_len
,
# (float) discount factor for future reward, defaults int [0, 1]
discount_factor
=
0.9
,
gae_lambda
=
0.95
,
...
...
@@ -116,7 +113,7 @@ class IMPALAPolicy(Policy):
self
.
_learn_model
=
model_wrap
(
self
.
_model
,
wrapper_name
=
'base'
)
self
.
_action_shape
=
self
.
_cfg
.
model
.
action_shape
self
.
_unroll_len
=
self
.
_cfg
.
learn
.
unroll_len
self
.
_unroll_len
=
self
.
_cfg
.
unroll_len
# Algorithm config
self
.
_priority
=
self
.
_cfg
.
priority
...
...
@@ -290,7 +287,6 @@ class IMPALAPolicy(Policy):
Collect mode init method. Called by ``self.__init__``, initialize algorithm arguments and collect_model.
Use multinomial_sample to choose action.
"""
self
.
_collect_unroll_len
=
self
.
_cfg
.
collect
.
unroll_len
self
.
_collect_model
=
model_wrap
(
self
.
_model
,
wrapper_name
=
'multinomial_sample'
)
self
.
_collect_model
.
reset
()
...
...
dizoo/atari/config/serial/enduro/enduro_impala_config.py
浏览文件 @
41dce176
...
...
@@ -14,6 +14,8 @@ enduro_impala_config = dict(
),
policy
=
dict
(
cuda
=
True
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
model
=
dict
(
obs_shape
=
[
4
,
84
,
84
],
action_shape
=
9
,
...
...
@@ -40,8 +42,6 @@ enduro_impala_config = dict(
discount_factor
=
0.99
,
# (float) additional discounting parameter
lambda_
=
1.0
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
# (float) clip ratio of importance weights
rho_clip_ratio
=
1.0
,
# (float) clip ratio of importance weights
...
...
@@ -52,8 +52,6 @@ enduro_impala_config = dict(
collect
=
dict
(
# (int) collect n_sample data, train model n_iteration times
n_sample
=
16
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
# (float) discount factor for future reward, defaults int [0, 1]
discount_factor
=
0.99
,
gae_lambda
=
0.95
,
...
...
dizoo/atari/config/serial/pong/pong_impala_config.py
浏览文件 @
41dce176
...
...
@@ -15,6 +15,8 @@ pong_impala_config = dict(
policy
=
dict
(
cuda
=
True
,
priority
=
False
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
model
=
dict
(
obs_shape
=
[
4
,
84
,
84
],
action_shape
=
6
,
...
...
@@ -41,8 +43,6 @@ pong_impala_config = dict(
discount_factor
=
0.9
,
# (float) additional discounting parameter
lambda_
=
0.95
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
# (float) clip ratio of importance weights
rho_clip_ratio
=
1.0
,
# (float) clip ratio of importance weights
...
...
@@ -53,8 +53,6 @@ pong_impala_config = dict(
collect
=
dict
(
# (int) collect n_sample data, train model n_iteration times
n_sample
=
16
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
# (float) discount factor for future reward, defaults int [0, 1]
discount_factor
=
0.9
,
gae_lambda
=
0.95
,
...
...
dizoo/atari/config/serial/qbert/qbert_impala_config.py
浏览文件 @
41dce176
...
...
@@ -14,6 +14,8 @@ qbert_impala_config = dict(
),
policy
=
dict
(
cuda
=
True
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
model
=
dict
(
obs_shape
=
[
4
,
84
,
84
],
action_shape
=
6
,
...
...
@@ -40,8 +42,6 @@ qbert_impala_config = dict(
discount_factor
=
0.9
,
# (float) additional discounting parameter
lambda_
=
0.95
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
# (float) clip ratio of importance weights
rho_clip_ratio
=
1.0
,
# (float) clip ratio of importance weights
...
...
@@ -52,8 +52,6 @@ qbert_impala_config = dict(
collect
=
dict
(
# (int) collect n_sample data, train model n_iteration times
n_sample
=
16
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
# (float) discount factor for future reward, defaults int [0, 1]
discount_factor
=
0.9
,
gae_lambda
=
0.95
,
...
...
dizoo/atari/config/serial/spaceinvaders/spaceinvaders_impala_config.py
浏览文件 @
41dce176
...
...
@@ -14,6 +14,8 @@ space_invaders_impala_config = dict(
),
policy
=
dict
(
cuda
=
True
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
model
=
dict
(
obs_shape
=
[
4
,
84
,
84
],
action_shape
=
6
,
...
...
@@ -40,8 +42,6 @@ space_invaders_impala_config = dict(
discount_factor
=
0.9
,
# (float) additional discounting parameter
lambda_
=
0.95
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
# (float) clip ratio of importance weights
rho_clip_ratio
=
1.0
,
# (float) clip ratio of importance weights
...
...
@@ -52,8 +52,6 @@ space_invaders_impala_config = dict(
collect
=
dict
(
# (int) collect n_sample data, train model n_iteration times
n_sample
=
16
,
# (int) the trajectory length to calculate v-trace target
unroll_len
=
64
,
# (float) discount factor for future reward, defaults int [0, 1]
discount_factor
=
0.9
,
gae_lambda
=
0.95
,
...
...
OpenDILab开源决策智能平台
@m0_55289267
mentioned in commit
375f531e
·
11月 26, 2021
mentioned in commit
375f531e
mentioned in commit 375f531ef4d00a369a9f6382e9d5acdff68711b7
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录