Class IsInf
Represents an element-wise IsInf logical layer: f(x) = 1 elementwise if x is +Inf and detectPositive, or x is -Inf and detectNegative is true. Otherwise f(x) = 0.
Inherited Members
Namespace: Unity.Sentis.Layers
Syntax
[Serializable]
public class IsInf : Layer
Constructors
IsInf(String, String, Boolean, Boolean)
Initializes and returns an instance of IsInf logical layer.
Declaration
public IsInf(string name, string input, bool detectNegative, bool detectPositive)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The name to use for the output tensor of the layer. |
| String | input | The name to use for the input tensor of the layer. |
| Boolean | detectNegative | Whether to detect negative infinities in the |
| Boolean | detectPositive | Whether to detect positive infinities in the |
Fields
detectNegative
Whether to detect negative infinities in the IsInf function.
Declaration
public bool detectNegative
Field Value
| Type | Description |
|---|---|
| Boolean |
detectPositive
Whether to detect positive infinities in the IsInf function.
Declaration
public bool detectPositive
Field Value
| Type | Description |
|---|---|
| Boolean |
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
ToString()
Returns a string that represents the Layer.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String |