Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

How to use a TF-hub saved_model in Unity

Discussion in 'ML-Agents' started by zwendi214, Apr 28, 2020.

  1. zwendi214

    zwendi214

    Joined:
    Mar 1, 2020
    Posts:
    1
    I plan to use "https://tfhub.dev/google/universal-sentence-encoder/4" model to build a game in Unity. It's my first time try the ml-agents plugin, so not sure how to do that.

    The model I downloaded from TF-hub is a saved_model.pb file.

    in ml-agents hub tutorial (https://github.com/Unity-Technologi...raining-the-model-with-reinforcement-learning), it says I should assign a <behaviour_name>.nn file to the Model parameter.

    upload_2020-4-27_21-53-10.png

    In the Youtube tutorial(
    ), it says I should assign a <model_name>.bytes file to the Model parameter.

    I'm confused, what should I use?
    upload_2020-4-27_21-55-13.png
     
  2. vincentpierre

    vincentpierre

    Joined:
    May 5, 2017
    Posts:
    160
    The video tutorial you linked to is rather old. we changed the model file from bytes to nn why we stoped using TensorFlowSharp and started using the Unity Inference Engine instead.
    ML-Agents only supports models trained with ML-Agents in games.
    If you want to use the Unity Inference Engine to use your non-ML-Agents model in your game this is its github repository : https://github.com/Unity-Technologies/barracuda-release
     
    zwendi214 likes this.