Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Inference differs from training

Discussion in 'ML-Agents' started by Sajmon1337, Mar 9, 2023.

  1. Sajmon1337


    Dec 9, 2021

    What could be the source of error when the agent behavior differs significantly during inference from what can be observed while training? If I take the generated .onnx-brain and hand it to the Behavior-component when in the editor and then run the simulation in the editor or bake the brain into a build (mono or IL2CPP) the behavior is completely off, BUT when i run inference from mlagents-learn via the --inference flag the behavior is as expected both in a build and when in editor play mode.
    I have no clue even where to start digging into this.


    ml-agents: 0.30.0,
    ml-agents-envs: 0.30.0,
    Communicator API: 1.5.0,
    PyTorch: 1.13.1+cu117

    on Ubuntu 2022 LTS

    with lots of Burstcompiled jobs in the sensor logic.