docs.unity3d.com
    Show / Hide Table of Contents

    Class Layer

    Represents the base class for all model layers.

    Inheritance
    Object
    Layer
    Activation
    ArgReduce
    BatchNormalization
    Broadcast
    Cast
    CastLike
    Clip
    Compress
    Concat
    ConstantOfShape
    CumSum
    CustomLayer
    DepthToSpace
    Einsum
    Expand
    Flatten
    FusedActivation
    Gather
    GatherElements
    GatherND
    GlobalPool
    Identity
    InstanceNormalization
    IsInf
    IsNaN
    LayerNormalization
    LocalPool
    LRN
    LSTM
    MatMul
    MatMul2D
    NonMaxSuppression
    NonZero
    Not
    OneHot
    Pad
    RandomLayer
    Range
    Reduce
    Reshape
    Resize
    RoiAlign
    ScaleBias
    ScatterElements
    ScatterND
    Shape
    Shrink
    Sign
    Size
    Slice
    SpaceToDepth
    Split
    Squeeze
    Tile
    TopK
    Transpose
    Trilu
    Unsqueeze
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Sentis.Layers
    Syntax
    [Serializable]
    public abstract class Layer

    Fields

    flags

    The flags set on the layer.

    Declaration
    [NonSerialized]
    public Flags flags
    Field Value
    Type Description
    Flags

    inputs

    The names to use for the input tensors for a layer.

    Declaration
    public string[] inputs
    Field Value
    Type Description
    String[]

    name

    The name to use for the first output tensor for a layer.

    Declaration
    public string name
    Field Value
    Type Description
    String

    outputs

    The names to use for all of the output tensors for a layer. This is null if a layer has only one output.

    Declaration
    public string[] outputs
    Field Value
    Type Description
    String[]

    Methods

    Execute(Tensor[], ExecutionContext)

    Executes the layer using the operations and variables from the ExecutionContext and returns the output tensor.

    If the layer has more than one output, output tensors are saved to variables.

    Declaration
    public abstract Tensor Execute(Tensor[] inputTensors, ExecutionContext ctx)
    Parameters
    Type Name Description
    Tensor[] inputTensors
    ExecutionContext ctx
    Returns
    Type Description
    Tensor

    ToString()

    Returns a string that represents the Layer.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()
    In This Article
    • Fields
      • flags
      • inputs
      • name
      • outputs
    • Methods
      • Execute(Tensor[], ExecutionContext)
      • ToString()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023