Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PARL
提交
c5a8c2ba
P
PARL
项目概览
PaddlePaddle
/
PARL
通知
67
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PARL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c5a8c2ba
编写于
12月 17, 2019
作者:
H
Hongsheng Zeng
提交者:
Bo Zhou
12月 17, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix paddle version bug; refine scripts (#186)
上级
7173368e
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
50 addition
and
5 deletion
+50
-5
examples/NeurIPS2019-Learn-to-Move-Challenge/README.md
examples/NeurIPS2019-Learn-to-Move-Challenge/README.md
+1
-1
examples/NeurIPS2019-Learn-to-Move-Challenge/evaluate.py
examples/NeurIPS2019-Learn-to-Move-Challenge/evaluate.py
+11
-1
examples/NeurIPS2019-Learn-to-Move-Challenge/evaluate_args.py
...ples/NeurIPS2019-Learn-to-Move-Challenge/evaluate_args.py
+1
-1
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/eval_difficulty1.sh
...S2019-Learn-to-Move-Challenge/scripts/eval_difficulty1.sh
+3
-0
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/eval_difficulty2.sh
...S2019-Learn-to-Move-Challenge/scripts/eval_difficulty2.sh
+4
-0
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/eval_difficulty3.sh
...S2019-Learn-to-Move-Challenge/scripts/eval_difficulty3.sh
+3
-0
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/eval_difficulty3_first_target.sh
...o-Move-Challenge/scripts/eval_difficulty3_first_target.sh
+3
-0
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/train_difficulty1.sh
...2019-Learn-to-Move-Challenge/scripts/train_difficulty1.sh
+3
-0
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/train_difficulty2.sh
...2019-Learn-to-Move-Challenge/scripts/train_difficulty2.sh
+3
-0
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/train_difficulty3.sh
...2019-Learn-to-Move-Challenge/scripts/train_difficulty3.sh
+3
-0
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/train_difficulty3_first_target.sh
...-Move-Challenge/scripts/train_difficulty3_first_target.sh
+3
-0
examples/NeurIPS2019-Learn-to-Move-Challenge/train.py
examples/NeurIPS2019-Learn-to-Move-Challenge/train.py
+11
-1
examples/NeurIPS2019-Learn-to-Move-Challenge/train_args.py
examples/NeurIPS2019-Learn-to-Move-Challenge/train_args.py
+1
-1
未找到文件。
examples/NeurIPS2019-Learn-to-Move-Challenge/README.md
浏览文件 @
c5a8c2ba
...
...
@@ -6,7 +6,7 @@ The **PARL** team gets the first place in NeurIPS reinforcement learning competi
## Dependencies
-
python3.6
-
[
paddlepaddle==1.5.
2
](
https://github.com/PaddlePaddle/Paddle
)
-
[
paddlepaddle==1.5.
1
](
https://github.com/PaddlePaddle/Paddle
)
-
[
parl>=1.2.1
](
https://github.com/PaddlePaddle/PARL
)
-
[
osim-rl==3.0.11
](
https://github.com/stanfordnmbl/osim-rl
)
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/evaluate.py
浏览文件 @
c5a8c2ba
...
...
@@ -22,9 +22,10 @@ import numpy as np
from
actor
import
Actor
from
opensim_model
import
OpenSimModel
from
opensim_agent
import
OpenSimAgent
from
parl.utils
import
logger
,
ReplayMemory
,
tensorboard
from
parl.utils
import
logger
,
ReplayMemory
,
tensorboard
,
get_gpu_count
from
parl.utils.window_stat
import
WindowStat
from
parl.remote.client
import
get_global_client
from
parl.utils
import
machine_info
from
shutil
import
copy2
ACT_DIM
=
22
...
...
@@ -62,6 +63,15 @@ class ActorState(object):
class
Evaluator
(
object
):
def
__init__
(
self
,
args
):
if
machine_info
.
is_gpu_available
():
assert
get_gpu_count
()
==
1
,
'Only support training in single GPU,
\
Please set environment variable: `export CUDA_VISIBLE_DEVICES=[GPU_ID_TO_USE]` .'
else
:
cpu_num
=
os
.
environ
.
get
(
'CPU_NUM'
)
assert
cpu_num
is
not
None
and
cpu_num
==
'1'
,
'Only support training in single CPU,
\
Please set environment variable: `export CPU_NUM=1`.'
model
=
OpenSimModel
(
OBS_DIM
,
VEL_DIM
,
ACT_DIM
)
algorithm
=
parl
.
algorithms
.
DDPG
(
model
,
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/evaluate_args.py
浏览文件 @
c5a8c2ba
...
...
@@ -20,7 +20,7 @@ def get_args():
parser
.
add_argument
(
'--cluster_address'
,
default
=
'localhost:80
81
'
,
default
=
'localhost:80
10
'
,
type
=
str
,
help
=
'cluster address of xparl.'
)
parser
.
add_argument
(
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/eval_difficulty1.sh
浏览文件 @
c5a8c2ba
# use which GPU
export
CUDA_VISIBLE_DEVICES
=
0
python evaluate.py
--actor_num
160
\
--difficulty
1
\
--penalty_coeff
3.0
\
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/eval_difficulty2.sh
浏览文件 @
c5a8c2ba
# use which GPU
export
CUDA_VISIBLE_DEVICES
=
0
python evaluate.py
--actor_num
160
\
--difficulty
2
\
--penalty_coeff
5.0
\
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/eval_difficulty3.sh
浏览文件 @
c5a8c2ba
# use which GPU
export
CUDA_VISIBLE_DEVICES
=
0
python evaluate.py
--actor_num
160
\
--difficulty
3
\
--vel_penalty_coeff
3.0
\
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/eval_difficulty3_first_target.sh
浏览文件 @
c5a8c2ba
# use which GPU
export
CUDA_VISIBLE_DEVICES
=
0
python evaluate.py
--actor_num
160
\
--difficulty
3
\
--vel_penalty_coeff
3.0
\
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/train_difficulty1.sh
浏览文件 @
c5a8c2ba
...
...
@@ -4,6 +4,9 @@ if [ $# != 1 ]; then
exit
0
fi
# use which GPU
export
CUDA_VISIBLE_DEVICES
=
0
python train.py
--actor_num
300
\
--difficulty
1
\
--penalty_coeff
3.0
\
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/train_difficulty2.sh
浏览文件 @
c5a8c2ba
...
...
@@ -3,6 +3,9 @@ if [ $# != 1 ]; then
exit
0
fi
# use which GPU
export
CUDA_VISIBLE_DEVICES
=
0
python train.py
--actor_num
300
\
--difficulty
2
\
--penalty_coeff
5.0
\
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/train_difficulty3.sh
浏览文件 @
c5a8c2ba
...
...
@@ -3,6 +3,9 @@ if [ $# != 1 ]; then
exit
0
fi
# use which GPU
export
CUDA_VISIBLE_DEVICES
=
0
python train.py
--actor_num
300
\
--difficulty
3
\
--vel_penalty_coeff
3.0
\
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/scripts/train_difficulty3_first_target.sh
浏览文件 @
c5a8c2ba
...
...
@@ -3,6 +3,9 @@ if [ $# != 1 ]; then
exit
0
fi
# use which GPU
export
CUDA_VISIBLE_DEVICES
=
0
python train.py
--actor_num
300
\
--difficulty
3
\
--vel_penalty_coeff
3.0
\
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/train.py
浏览文件 @
c5a8c2ba
...
...
@@ -22,9 +22,10 @@ import numpy as np
from
actor
import
Actor
from
opensim_model
import
OpenSimModel
from
opensim_agent
import
OpenSimAgent
from
parl.utils
import
logger
,
ReplayMemory
,
tensorboard
from
parl.utils
import
logger
,
ReplayMemory
,
tensorboard
,
get_gpu_count
from
parl.utils.window_stat
import
WindowStat
from
parl.remote.client
import
get_global_client
from
parl.utils
import
machine_info
ACT_DIM
=
22
VEL_DIM
=
19
...
...
@@ -68,6 +69,15 @@ class ActorState(object):
class
Learner
(
object
):
def
__init__
(
self
,
args
):
if
machine_info
.
is_gpu_available
():
assert
get_gpu_count
()
==
1
,
'Only support training in single GPU,
\
Please set environment variable: `export CUDA_VISIBLE_DEVICES=[GPU_ID_TO_USE]` .'
else
:
cpu_num
=
os
.
environ
.
get
(
'CPU_NUM'
)
assert
cpu_num
is
not
None
and
cpu_num
==
'1'
,
'Only support training in single CPU,
\
Please set environment variable: `export CPU_NUM=1`.'
model
=
OpenSimModel
(
OBS_DIM
,
VEL_DIM
,
ACT_DIM
)
algorithm
=
parl
.
algorithms
.
DDPG
(
model
,
...
...
examples/NeurIPS2019-Learn-to-Move-Challenge/train_args.py
浏览文件 @
c5a8c2ba
...
...
@@ -20,7 +20,7 @@ def get_args():
parser
.
add_argument
(
'--cluster_address'
,
default
=
'localhost:80
81
'
,
default
=
'localhost:80
10
'
,
type
=
str
,
help
=
'cluster address of xparl.'
)
parser
.
add_argument
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录