Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dipam Chakraborty
neurips-2020-procgen-competition
Commits
f07abc5e
Commit
f07abc5e
authored
Oct 30, 2020
by
Dipam Chakraborty
Browse files
ppg recal adv
parent
1fb3e4c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
algorithms/ppg_experimental/custom_torch_ppg.py
View file @
f07abc5e
...
...
@@ -286,7 +286,6 @@ class CustomTorchPolicy(TorchPolicy):
for
nnpi
in
range
(
self
.
retune_selector
.
n_pi
):
for
ne
in
range
(
self
.
retune_selector
.
nenvs
):
import
pdb
;
pdb
.
set_trace
()
replay_vf
[
nnpi
,
:,
ne
],
replay_pi
[
nnpi
,
:,
ne
]
=
self
.
model
.
vf_pi
(
self
.
retune_selector
.
exp_replay
[
nnpi
,
:,
ne
],
ret_numpy
=
True
,
no_grad
=
True
,
to_torch
=
True
)
...
...
@@ -301,7 +300,7 @@ class CustomTorchPolicy(TorchPolicy):
num_rollouts
=
self
.
config
[
'aux_mbsize'
]
for
ep
in
range
(
retune_epochs
):
counter
=
0
for
slices
in
self
.
retune_selector
.
make_minibatches
(
replay_pi
,
returns
_buffer
,
num_rollouts
):
for
slices
in
self
.
retune_selector
.
make_minibatches
(
replay_pi
,
new_
returns
,
num_rollouts
):
counter
+=
1
apply_grad
=
(
counter
%
num_accumulate
)
==
0
self
.
tune_policy
(
slices
[
0
],
self
.
to_tensor
(
slices
[
1
]),
self
.
to_tensor
(
slices
[
2
]),
...
...
experiments/ppg-experimental.yaml
View file @
f07abc5e
...
...
@@ -45,9 +45,9 @@ procgen-ppo:
no_done_at_end
:
False
# Custom switches
skips
:
0
n_pi
:
1
num_retunes
:
1
4
skips
:
2
n_pi
:
1
6
num_retunes
:
1
5
retune_epochs
:
7
standardize_rewards
:
True
aux_mbsize
:
4
...
...
run.sh
View file @
f07abc5e
...
...
@@ -7,8 +7,8 @@ set -e
# export EXPERIMENT_DEFAULT="experiments/impala-baseline.yaml"
# export EXPERIMENT_DEFAULT="experiments/custom-torch-ppo.yaml"
export
EXPERIMENT_DEFAULT
=
"experiments/custom-ppg.yaml"
#
export EXPERIMENT_DEFAULT="experiments/ppg-experimental.yaml"
#
export EXPERIMENT_DEFAULT="experiments/custom-ppg.yaml"
export
EXPERIMENT_DEFAULT
=
"experiments/ppg-experimental.yaml"
export
EXPERIMENT
=
${
EXPERIMENT
:-
$EXPERIMENT_DEFAULT
}
if
[[
-z
$AICROWD_IS_GRADING
]]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment