Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Help Wanted Train new model using an existing one

Discussion in 'ML-Agents' started by fefecmm, Jun 7, 2021.

  1. fefecmm


    Feb 28, 2020
    Hello, I've been trying to train a new AI using the knowledge of an already trained AI. I know there's a command called "initialize-from" in ML-Agents documentation, but I'm getting an error. Here's my situation: I have a trained an AI with ID name BallAI_NoWall (and this same behavior name in inspector) located in "c:/myuser/results" which is the default location where trainings are saved, right? Well, I want to use this trained AI to create a new one, with ID name "BallAI_Wall" (and, again, this same behavior name in inspector). I attached screenshots of the cmd screen showing the errors.

    Also, another question not really related to the post title: When I train an AI, the results folder are like results/IdNameGivenInCmd/BehaviorNameGivenInUnityInspector, right? Can I have, like, several behaviors in that Id folder?

    Attached Files:

    • 1.png
      File size:
      66.7 KB
    • 2.png
      File size:
      107.5 KB
  2. henrypeteet


    Unity Technologies

    Aug 19, 2020
    Hi, this may be an issue with the behavior name not matching between the two runs (a requirement of --initialize-from). I would suggest making sure the behavior name is the same for both in the config YAML and then using the run IDs to differentiate between the two.

    If I understand that you want them to look different in the inspector then please note that the name shown in-editor is just base filename without the .nn/.onnx extension. You can change this by copying the model file and renaming it if you really need the name to be different in the inspector.

    Please let me know if I miss-understood your question, hope this can help.