Search Unity

Bug Render to texture sensor eats up memory fast

Discussion in 'ML-Agents' started by EternalMe, Dec 22, 2022.

  1. EternalMe

    EternalMe

    Joined:
    Sep 12, 2014
    Posts:
    183
    Has somebody done something serious with Render texture Sensor and PPO? It eats up memory in few minutes.
     
  2. EternalMe

    EternalMe

    Joined:
    Sep 12, 2014
    Posts:
    183
    batch_size: 1048
    buffer_size: 10480

    1 agent, 800x400 texture
     
    Last edited: Dec 23, 2022
  3. GamerLordMat

    GamerLordMat

    Joined:
    Oct 10, 2019
    Posts:
    185
    800x400 is huge. Try either lower quality textures or less agents. Also think about if you need visual att all (raycast work much better in most cases)
     
    hughperkins likes this.
  4. EternalMe

    EternalMe

    Joined:
    Sep 12, 2014
    Posts:
    183
    As I mentioned above, 1 agent. Should be ok with this resolution.
    Not a beginner here, I need visual for perfect reason what is an experiment with visual :)
     
    hughperkins likes this.
  5. GamerLordMat

    GamerLordMat

    Joined:
    Oct 10, 2019
    Posts:
    185
    okay then ;). Maybe share the code to give some more insight. 800x400 should not be a problem that is true. I have recently worked with RenderTargetSensor and it worked (many smaller render targets)
     
    hughperkins likes this.
  6. EternalMe

    EternalMe

    Joined:
    Sep 12, 2014
    Posts:
    183
    Code is not the problem. I even cranked it down to almost nothing to test the memory issue. Its on python side. Will report a bug, and lets see.
     
  7. GamerLordMat

    GamerLordMat

    Joined:
    Oct 10, 2019
    Posts:
    185
    Have you figured it out yet?
     
  8. EternalMe

    EternalMe

    Joined:
    Sep 12, 2014
    Posts:
    183
    Nope. I submitted a bug in github.
     
    hughperkins likes this.
  9. hughperkins

    hughperkins

    Joined:
    Dec 3, 2022
    Posts:
    191
    I concur with pasting a minimum set of code to reproduce the problem.
     
  10. EternalMe

    EternalMe

    Joined:
    Sep 12, 2014
    Posts:
    183
    Minimal code is in github issue.