docs.unity3d.com
    Show / Hide Table of Contents

    Class Conv

    Represents a Conv convolution layer, which applies a convolution filter to an input tensor.

    Inheritance
    Object
    Layer
    FusedActivation
    Conv
    Inherited Members
    FusedActivation.fusedActivation
    Layer.inputs
    Layer.name
    Layer.outputs
    Layer.flags
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Sentis.Layers
    Syntax
    [Serializable]
    public class Conv : FusedActivation

    Constructors

    Conv(String, String, String, String, Int32, Int32[], Int32[], Int32[], AutoPad, FusableActivation)

    Initializes and returns an instance of Conv convolution layer.

    Declaration
    public Conv(string name, string X, string W, string B, int group, int[] strides, int[] pads, int[] dilations, AutoPad autoPad = AutoPad.NotSet, FusableActivation fusedActivation = FusableActivation.None)
    Parameters
    Type Name Description
    String name

    The name to use for the output tensor of the layer.

    String X

    The name to use for the input tensor of the layer.

    String W

    The name to use for the filter tensor of the layer.

    String B

    The name to use for the optional bias tensor of the layer.

    Int32 group

    The number of groups that input channels and output channels are divided into.

    Int32[] strides

    The optional stride value for each spatial dimension of the filter.

    Int32[] pads

    The optional lower and upper padding values for each spatial dimension of the filter.

    Int32[] dilations

    The optional dilation value of each spatial dimension of the filter.

    AutoPad autoPad

    The auto padding mode of the convolution as an AutoPad.

    FusableActivation fusedActivation

    The fused activation type to apply after the convolution. The default value is None.

    Fields

    autoPad

    The auto padding mode of the convolution as an AutoPad.

    Declaration
    public AutoPad autoPad
    Field Value
    Type Description
    AutoPad

    dilations

    The dilation value of each spatial dimension of the filter.

    If this is null the layer uses a default of [1, 1, ..., 1].

    Declaration
    public int[] dilations
    Field Value
    Type Description
    Int32[]

    group

    The number of groups that input channels and output channels are divided into.

    Declaration
    public int group
    Field Value
    Type Description
    Int32

    pads

    The lower and upper padding values for each spatial dimension of the filter, [pad_left, pad_right] for 1D, [pad_top, pad_bottom, pad_left, pad_right] for 2D, etc.

    If this is null the layer uses a default of [0, 0, ..., 0].

    Declaration
    public int[] pads
    Field Value
    Type Description
    Int32[]

    strides

    The stride value for each spatial dimension of the filter.

    If this is null the layer uses a default of [1, 1, ..., 1].

    Declaration
    public int[] strides
    Field Value
    Type Description
    Int32[]

    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 override Tensor Execute(Tensor[] inputTensors, ExecutionContext ctx)
    Parameters
    Type Name Description
    Tensor[] inputTensors
    ExecutionContext ctx
    Returns
    Type Description
    Tensor
    Overrides
    Layer.Execute(Tensor[], ExecutionContext)

    ToString()

    Returns a string that represents the Layer.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    FusedActivation.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