danijar / dreamerv2

Mastering Atari with Discrete World Models
https://danijar.com/dreamerv2
MIT License
898 stars 195 forks source link

replay data memory usage? #40

Closed tominku closed 2 years ago

tominku commented 2 years ago

Hi, thank you for the good code base. I just wonder if a normal PC can embrace all the replay data in the memory when the agent step goes over 1 million. If I have about 16 GB memory, then can this agent be trained until the end? It seems like the replay data size keep increasing as the training proceeds (without a truncation). Do you have any idea that the agent can be trained in a small-sized memory? Thanks!

danijar commented 2 years ago

Hi, 1M frames should take slightly less than 12GB so it depends how much additional RAM is needed by your environment(s). You can of course always reduce the replay capacity or image size to reduce RAM usage. I computed the 12GB as 64x64x3 pixels x 1 byte (uint8) x 1e6 steps / 1024^3 = 11.4 GB, since the images dominate the replay buffer.