Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
takuseno committed Nov 4, 2024
1 parent 17d1465 commit 5400c22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ import d3rlpy
dataset, env = d3rlpy.datasets.get_d4rl('hopper-medium-v0')

# prepare algorithm
cql = d3rlpy.algos.CQLConfig().create(device='cuda:0')
cql = d3rlpy.algos.CQLConfig(compile_graph=True).create(device='cuda:0')

# train
cql.fit(
Expand Down Expand Up @@ -157,6 +157,7 @@ dataset, env = d3rlpy.datasets.get_atari_transitions(
cql = d3rlpy.algos.DiscreteCQLConfig(
observation_scaler=d3rlpy.preprocessing.PixelObservationScaler(),
reward_scaler=d3rlpy.preprocessing.ClipRewardScaler(-1.0, 1.0),
compile_graph=True,
).create(device='cuda:0')

# start training
Expand All @@ -180,7 +181,7 @@ env = gym.make('Hopper-v3')
eval_env = gym.make('Hopper-v3')

# prepare algorithm
sac = d3rlpy.algos.SACConfig().create(device='cuda:0')
sac = d3rlpy.algos.SACConfig(compile_graph=True).create(device='cuda:0')

# prepare replay buffer
buffer = d3rlpy.dataset.create_fifo_replay_buffer(limit=1000000, env=env)
Expand Down

0 comments on commit 5400c22

Please sign in to comment.