Skip to content

Commit

Permalink
Update sb3_imitation.py
Browse files Browse the repository at this point in the history
Set device to CPU.
  • Loading branch information
Ivan-267 authored Jul 10, 2024
1 parent 30494cd commit 9cd545c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/sb3_imitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def close_env():
policy_kwargs=policy_kwargs,
verbose=2,
tensorboard_log=f"logs/{args.experiment_name}",
device="cpu"
# seed=args.seed // Not currently supported as stable_baselines_wrapper.py seed() method is not yet implemented.
)

Expand All @@ -190,6 +191,7 @@ def close_env():
rng=rng,
policy=learner.policy,
custom_logger=logger,
device="cpu"
)
print("Starting Imitation Learning Training using BC:")
bc_trainer.train(n_epochs=args.bc_epochs)
Expand Down

0 comments on commit 9cd545c

Please sign in to comment.