Skip to content

Commit

Permalink
Assign self.device = device
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaps0dy committed Oct 11, 2023
1 parent d800947 commit 1978bc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stable_baselines3/common/recurrent/buffers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
RecurrentRolloutBufferData,
RecurrentRolloutBufferSamples,
)
from stable_baselines3.common.utils import get_device
from stable_baselines3.common.vec_env import VecNormalize


Expand Down Expand Up @@ -173,7 +174,7 @@ def __init__(
self.gamma = gamma

batch_shape = (self.buffer_size, self.n_envs)
device = self.device
self.device = device = get_device(device)

self.observation_space_example = space_to_example((), observation_space)

Expand Down

0 comments on commit 1978bc6

Please sign in to comment.