StableBaselines3 DQN saturates ram

Viewed 15

I have a problem training DQN from Stable-Baselines3. I wrote this code inside Google Colab, but when I execute it the runtime crashes and restarts.

# for dependencies
!pip install stable-baselines3[extra] ale-py==0.7.4
# imports
from stable_baselines3 import DQN
from stable_baselines3.common.env_util import make_atari_env
# create env
env = make_atari_env('PongNoFrameskip-v4')
# train model
model = DQN('CnnPolicy', env, verbose=1)
model.learn(total_timesteps=10000)

After nearly 3 seconds of training, Colab crashes due to saturated RAM. This behaviors is repeated with other games, such as ALE/Freeway-v5. What have I to do to fix this?

0 Answers
Related