Search Unity

Which parameter affects the RAM usage for SAC?

Discussion in 'ML-Agents' started by MrOCW, Sep 7, 2021.

  1. MrOCW

    MrOCW

    Joined:
    Feb 16, 2021
    Posts:
    51
    Hi, I am using visual observation of 256x192x3. I have 32GB RAM but it runs out while using SAC.
    May I know which parameter to change in the config file that affects the RAM? should i change batch size or buffer size? how does changing it affect the training?
    Thanks!
     
  2. gft-ai

    gft-ai

    Joined:
    Jan 12, 2021
    Posts:
    44
  3. ruoping_unity

    ruoping_unity

    Unity Technologies

    Joined:
    Jul 10, 2020
    Posts:
    134
    If you're running out of memory during training you should consider using smaller batch size. Also the network architecture and network size also affects the memory usage, so you could also consider using a smaller network or smaller hidden size.
     
  4. MrOCW

    MrOCW

    Joined:
    Feb 16, 2021
    Posts:
    51
    i tested BS 64, Buffer 60000 and BS128, Buffer 60000
    RAM usage is pretty much the same
    but changing Buffer size affected the RAM the most so i guess i'll tweak that
    however, is it bad if batch size and buffer size is too close in value?
     
  5. gft-ai

    gft-ai

    Joined:
    Jan 12, 2021
    Posts:
    44
    I guess it would depend on how ‘close’ the values are.

    But I would say it depends on your hardware capabilities you just have to choose the numbers that gives you the best results given the limits of your machine.

    Good luck!