docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ModelLoader

    Barracuda Model loader

    Inheritance
    object
    ModelLoader
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Barracuda
    Assembly: Unity.Barracuda.dll
    Syntax
    public static class ModelLoader

    Methods

    Load(byte[], bool, bool)

    Return an object oriented representation (aka: Model) of a neural network from a byte[] array. By default details are not logged to the console, set verbose to true to see loading details.

    Declaration
    public static Model Load(byte[] stream, bool verbose = false, bool skipWeights = false)
    Parameters
    Type Name Description
    byte[] stream

    file name

    bool verbose

    verbose

    bool skipWeights

    skip loading weights (fast loading, metadata only)

    Returns
    Type Description
    Model

    Load(string, bool, bool)

    Return an object oriented representation (aka: Model) of a neural network from a .bc file. By default details are not logged to the console, set verbose to true to see loading details.

    Declaration
    public static Model Load(string filepath, bool verbose = false, bool skipWeights = false)
    Parameters
    Type Name Description
    string filepath

    file name

    bool verbose

    verbose

    bool skipWeights

    skip loading weights (fast loading, metadata only)

    Returns
    Type Description
    Model

    loaded Model

    Load(NNModel, bool, bool)

    Return an object oriented representation (aka: Model) of a neural network from a binary representation of type NNModel. By default details are not logged to the console, set verbose to true to see loading details.

    Declaration
    public static Model Load(NNModel model, bool verbose = false, bool skipWeights = false)
    Parameters
    Type Name Description
    NNModel model

    model

    bool verbose

    verbose

    bool skipWeights

    skip loading weights (fast loading, metadata only)

    Returns
    Type Description
    Model

    loaded Model

    LoadFromStreamingAssets(string, bool, bool)

    Return an object oriented representation (aka: Model) of a neural network from a .bc file from the the streaming asset folder. By default details are not logged to the console, set verbose to true to see loading details.

    Declaration
    public static Model LoadFromStreamingAssets(string filename, bool verbose = false, bool skipWeights = false)
    Parameters
    Type Name Description
    string filename

    file name

    bool verbose

    verbose

    bool skipWeights

    skip loading weights (fast loading, metadata only)

    Returns
    Type Description
    Model

    loaded 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)