Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

.nn to keras model

Discussion in 'ML-Agents' started by unity_bvYSjU_BlRS8eA, Jun 30, 2020 at 6:30 AM.

  1. unity_bvYSjU_BlRS8eA

    unity_bvYSjU_BlRS8eA

    Joined:
    Tuesday
    Posts:
    2
    How can I export my .nn model into Keras .h5 model in unity ml agents?
     
  2. andrzej_

    andrzej_

    Joined:
    Dec 2, 2016
    Posts:
    74
    I'm pretty sure someone from the Unity team will have more reliable information, but I'd personally try with the protobuf file that is created during training. Both protobuf and HDF5 store the graph and weights so I'm sure there are plenty of ways to convert it.
     
  3. ervteng_unity

    ervteng_unity

    Unity Technologies

    Joined:
    Dec 6, 2018
    Posts:
    48
    Converting the .nn to other formats is not supported. I'd try to convert the Tensorflow models (
    frozen_graph.pb
    ) that are created after training; they can be found in the
    results/run_id/behavior_name
    folder after training.
     
  4. unity_bvYSjU_BlRS8eA

    unity_bvYSjU_BlRS8eA

    Joined:
    Tuesday
    Posts:
    2
    I think there should be a way to save a model into .h5, it would way easier to get the model. Also I was thinking to train a DRL model in unity, and test it in real-world hardware, so I need a simple Keras model that has trained in unity environment , but I can inference it in real world, is that possible ?
     
unityunity