Class Layer
Barracuda Model Layer
Inherited Members
Namespace: Unity.Barracuda
Assembly: solution.dll
Syntax
public class Layer
Constructors
Layer(string, 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, Type, Activation)
Constructs Layer
Declaration
public Layer(string layerName, Layer.Type layerType, Layer.Activation activationType = Activation.None)
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 |
---|---|
float |
axes
Axes (not serialized) - used for conversion
Declaration
[NonSerialized]
public int[] axes
Field Value
Type | Description |
---|---|
int[] |
axis
Axis
Declaration
public int axis
Field Value
Type | Description |
---|---|
int |
beta
Beta
Declaration
public float beta
Field Value
Type | Description |
---|---|
float |
datasets
Datasets bound to layer
Declaration
public Layer.DataSet[] datasets
Field Value
Type | Description |
---|---|
Data |
flags
Layer flags (not serialized) - used for conversion
Declaration
[NonSerialized]
public Layer.Flags flags
Field Value
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 |
outputs
Output (layer) names (not serialized) - used for conversion
Declaration
[NonSerialized]
public string[] outputs
Field Value
Type | Description |
---|---|
string[] |
pad
Padding shape
Declaration
public int[] pad
Field Value
Type | Description |
---|---|
int[] |
pool
Pooling
Declaration
public int[] pool
Field Value
Type | Description |
---|---|
int[] |
stride
Stride
Declaration
public int[] stride
Field Value
Type | Description |
---|---|
int[] |
type
Layer type
Declaration
public Layer.Type type
Field Value
weights
Flat weights array (for actual shape see datasets
)
Declaration
public BarracudaArray weights
Field Value
Type | Description |
---|---|
Barracuda |
Methods
ApplyTensorToDataSet(Tensor, int)
Converts Tensor to DataSet
Declaration
public void ApplyTensorToDataSet(Tensor X, int index)
Parameters
DataSetToTensor(int)
Converts DataSet to Tensor
Declaration
public Tensor DataSetToTensor(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | dataset index |
Returns
Type | Description |
---|---|
Tensor | Tensor |
ToString()
Layer summary string
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | layer summary string |