docs.unity.cn
    Show / Hide Table of Contents

    Class Layer

    Barracuda Model Layer

    Inheritance
    Object
    Layer
    Namespace: Unity.Barracuda
    Syntax
    public class Layer : object

    Constructors

    Layer(String, Layer.Activation)

    Constructs Activation Layer

    Declaration
    public Layer(string layerName, Layer.Activation activationType)
    Parameters
    Type Name Description
    String layerName

    layer name

    Layer.Activation activationType

    layer activation type

    Layer(String, Layer.Type, Layer.Activation)

    Constructs Layer

    Declaration
    public Layer(string layerName, Layer.Type layerType, Layer.Activation activationType = default(Layer.Activation))
    Parameters
    Type Name Description
    String layerName

    layer name

    Layer.Type layerType

    layer type

    Layer.Activation activationType

    layer activation type

    Fields

    activation

    Layer activation type

    Declaration
    public Layer.Activation activation
    Field Value
    Type Description
    Layer.Activation

    alpha

    Alpha

    Declaration
    public float alpha
    Field Value
    Type Description
    Single

    axis

    Axis

    Declaration
    public Int32 axis
    Field Value
    Type Description
    Int32

    beta

    Beta

    Declaration
    public float beta
    Field Value
    Type Description
    Single

    datasets

    Datasets bound to layer

    Declaration
    public Layer.DataSet[] datasets
    Field Value
    Type Description
    Layer.DataSet[]

    inputs

    Input (layer) names

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

    name

    Layer name

    Declaration
    public string name
    Field Value
    Type Description
    String

    pad

    Padding shape

    Declaration
    public Int32[] pad
    Field Value
    Type Description
    Int32[]

    pool

    Pooling

    Declaration
    public Int32[] pool
    Field Value
    Type Description
    Int32[]

    stride

    Stride

    Declaration
    public Int32[] stride
    Field Value
    Type Description
    Int32[]

    type

    Layer type

    Declaration
    public Layer.Type type
    Field Value
    Type Description
    Layer.Type

    weights

    Flat weights array (for actual shape see datasets)

    Declaration
    public float[] weights
    Field Value
    Type Description
    Single[]

    Methods

    DataSetToTensor(Int32)

    Converts DataSet to Tensor

    Declaration
    public Tensor DataSetToTensor(int index)
    Parameters
    Type Name Description
    Int32 index

    dataset index

    Returns
    Type Description
    Tensor

    Tensor

    ToString()

    Layer summary string

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    layer summary string

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Friday, May 14, 2021