Search Unity

Can not import brain

Discussion in 'ML-Agents' started by StigPoulsen, May 6, 2021.

?

How can I fix the onnx-fil, so that it can be imported?

  1. I have the same problem

    0 vote(s)
    0.0%
  2. I have fixed it!

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. StigPoulsen

    StigPoulsen

    Joined:
    Mar 13, 2021
    Posts:
    2
    Hi
    I'm using Python version 3.9.4 (with pip 21.1.1 and torch 1.7.1). As suggested on Unitys homepage (https://github.com/Unity-Technologies/ml-agents/tree/latest_release/ml-agents-envs), I am using mlagents 0.26.0. When I have trained a "brain", I can not import the onnx-file into Unity. I get this error messags:
    Asset import failed, "Assets/Models/AUV Behavior.onnx" > OnnxImportException: Unexpected error while parsing layer 18 of type Gemm. Hope anyone can help.

    Kind regards,
    Stig
     
    paschok likes this.
  2. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hi, which version of the ml-agents c# package are you using?
     
    StigPoulsen likes this.
  3. StigPoulsen

    StigPoulsen

    Joined:
    Mar 13, 2021
    Posts:
    2
    Im not sure. The ml-agents is 0.26.0. But that is not what you are asking about? I am using Visual Studio Version 16.7.7.
     
    Last edited: May 25, 2021
  4. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    In Unity, you should be able to see the version of the com.unity.ml-agents c# package