Class Layer
Represents the base class for all model layers.
Inherited Members
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 |