docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Run a model

    After you create a worker, call Schedule to run the model.

    worker.Schedule(inputTensor);
    

    The first scheduling of a model within the Unity Editor might be slow as Inference Engine needs to compile code and shaders, including allocating internal memory. Subsequent runs will be faster due to caching.

    It’s a good idea to include a test run when you start the application to help improve the initial load time.

    For an example, refer to the Run a model sample in the sample scripts.

    Additional resources

    • Split inference over multiple frames
    • Understand models in Inference Engine
    • Create an engine to run a model
    • Profile a model
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)