Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
distiller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
distiller
Commits
738d57f4
Commit
738d57f4
authored
5 years ago
by
Neta Zmora
Browse files
Options
Downloads
Patches
Plain Diff
AMC: fix the replay_buffer_size when using Coach and DDPG
parent
9f7f6b14
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/auto_compression/amc/amc.py
+4
-5
4 additions, 5 deletions
examples/auto_compression/amc/amc.py
with
4 additions
and
5 deletions
examples/auto_compression/amc/amc.py
+
4
−
5
View file @
738d57f4
...
...
@@ -131,7 +131,6 @@ def train_auto_compressor(model, args, optimizer_data, validate_fn, save_checkpo
def
create_environment
():
env
=
DistillerWrapperEnvironment
(
model
,
app_args
,
amc_cfg
,
services
)
#env.amc_cfg.ddpg_cfg.replay_buffer_size = int(1.5 * amc_cfg.ddpg_cfg.num_heatup_episodes * env.steps_per_episode)
env
.
amc_cfg
.
ddpg_cfg
.
replay_buffer_size
=
amc_cfg
.
ddpg_cfg
.
num_heatup_episodes
*
env
.
steps_per_episode
return
env
...
...
@@ -151,10 +150,10 @@ def train_auto_compressor(model, args, optimizer_data, validate_fn, save_checkpo
elif
args
.
amc_rllib
==
"
coach
"
:
from
rl_libs.coach
import
coach_if
rl
=
coach_if
.
RlLibInterface
()
env_cfg
=
{
'
model
'
:
model
,
'
app_args
'
:
app_args
,
'
amc_cfg
'
:
amc_cfg
,
'
services
'
:
services
}
env_cfg
=
{
'
model
'
:
env1
.
model
,
'
app_args
'
:
env1
.
app_args
,
'
amc_cfg
'
:
env1
.
amc_cfg
,
'
services
'
:
env1
.
services
}
steps_per_episode
=
env1
.
steps_per_episode
rl
.
solve
(
**
env_cfg
,
steps_per_episode
=
steps_per_episode
)
elif
args
.
amc_rllib
==
"
random
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment