Class StatsOps
Proxy IOps implementation for tracking computational expenses for specific model
Namespace: Unity.Barracuda
Syntax
public class StatsOps : object, IOps, IOpsStatistics, IModelCompiler
Constructors
StatsOps(IOps)
Create StatsOps
Declaration
public StatsOps(IOps ops)
Parameters
| Type | Name | Description |
|---|---|---|
| IOps | ops | target ops |
Methods
GetModelExecutionsReporter()
Get model executions reporter
Declaration
public IModelExecutionsReporter GetModelExecutionsReporter()
Returns
| Type | Description |
|---|---|
| IModelExecutionsReporter | model executions reporter |
Implements
LSTM(Tensor, Tensor[], Tensor[], Tensor[], Tensor[], Tensor, Tensor)
LSTM
Declaration
public Tensor[] LSTM(Tensor X, Tensor[] W, Tensor[] R, Tensor[] Wb, Tensor[] Rb, Tensor hidden, Tensor cell)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | The input sequences packed into one 3-D tensor. |
| Tensor[] | W | W parameter weight matrix for input, output, forget, and cell gates - W[iofc] |
| Tensor[] | R | R recurrence weight matrix for input, output, forget, and cell gates - R[iofc] |
| Tensor[] | Wb | W bias vectors for input, output, forget, and cell gates - Wb[iofc] |
| Tensor[] | Rb | R bias vectors for input, output, forget, and cell gates - Rb[iofc] |
| Tensor | hidden | Initial value of the hidden |
| Tensor | cell | Initial value of the cell |
Returns
| Type | Description |
|---|---|
| Tensor[] | [Y (concatenated intermediate values of the hidden), Y_h (final hidden), Y_c (final cell)] |
Implements
NonZero(Tensor)
Indices for non zero values
Declaration
public Tensor NonZero(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | input |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
PostLayerCleanup()
Called after every layer execution. It allows IOps to run cleanup operations such as clearing temporary buffers only used in the scope of the last layer executed.
Declaration
public virtual void PostLayerCleanup()
Implements
PreExecuteLayer(Layer, Tensor[])
Declaration
public virtual void PreExecuteLayer(Layer layer, Tensor[] inputs)
Parameters
| Type | Name | Description |
|---|---|---|
| Layer | layer | |
| Tensor[] | inputs |
PrepareModel(Model, IDictionary<String, TensorShape>, IVars)
Declaration
public virtual void PrepareModel(Model model, IDictionary<string, TensorShape> inputShapes, IVars vars)
Parameters
| Type | Name | Description |
|---|---|---|
| Model | model | |
| IDictionary<String, TensorShape> | inputShapes | |
| IVars | vars |
TopKValues(Tensor, Tensor, Int32)
Top K values
Declaration
public Tensor TopKValues(Tensor X, Tensor I, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | input |
| Tensor | I | indices |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
ToString()
Build execution summary
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String | execution summary |
Explicit Interface Implementations
IOps.Abs(Tensor)
Abs
Declaration
Tensor IOps.Abs(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Acos(Tensor)
Acos
Declaration
Tensor IOps.Acos(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Acosh(Tensor)
Acosh
Declaration
Tensor IOps.Acosh(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Add(Tensor[])
Add tensors together
Declaration
Tensor IOps.Add(Tensor[] tensors)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | tensors | input tensors |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.ArgMax(Tensor, Int32)
ArgMax
Declaration
Tensor IOps.ArgMax(Tensor X, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.ArgMin(Tensor, Int32)
ArgMax
Declaration
Tensor IOps.ArgMin(Tensor X, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Asin(Tensor)
Asin
Declaration
Tensor IOps.Asin(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Asinh(Tensor)
Asinh
Declaration
Tensor IOps.Asinh(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Atan(Tensor)
Atan
Declaration
Tensor IOps.Atan(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Atanh(Tensor)
Atanh
Declaration
Tensor IOps.Atanh(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.AvgPool2D(Tensor, Int32[], Int32[], Int32[])
2D average pooling
Declaration
Tensor IOps.AvgPool2D(Tensor X, int[] pool, int[] stride, int[] pad)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | pool | pooling |
| Int32[] | stride | stride |
| Int32[] | pad | padding |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Border2D(Tensor, Int32[], Single)
2D border padding
Declaration
Tensor IOps.Border2D(Tensor X, int[] pad, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | pad | padding |
| Single | value |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Border3D(Tensor, Int32[], Single)
3D border padding
Declaration
Tensor IOps.Border3D(Tensor X, int[] pad, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | pad | padding |
| Single | value |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Ceil(Tensor)
Ceil
Declaration
Tensor IOps.Ceil(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Clip(Tensor, Single, Single)
Clip
Declaration
Tensor IOps.Clip(Tensor X, float min, float max)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Single | min | min value |
| Single | max | max value |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Concat(Tensor[], Int32)
Concatenate tensors across axis
Declaration
Tensor IOps.Concat(Tensor[] tensors, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | tensors | input tensors |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.ConstantOfShape(TensorShape, DataType, Single)
Creates a constant of shape input
Declaration
Tensor IOps.ConstantOfShape(TensorShape X, DataType type, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorShape | X | input shape |
| DataType | type | Tensor DataType |
| Single | value | value |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Conv2D(Tensor, Tensor, Tensor, Int32[], Int32[], Layer.FusedActivation)
2D convolution
Declaration
Tensor IOps.Conv2D(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Tensor | K | |
| Tensor | B | |
| Int32[] | stride | stride |
| Int32[] | pad | padding |
| Layer.FusedActivation | fusedActivation | fused activation type |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Conv2DTrans(Tensor, Tensor, Tensor, Int32[], Int32[], Int32[], Layer.FusedActivation)
Transpose 2D convolution
Declaration
Tensor IOps.Conv2DTrans(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad, int[] outputAdjustment, Layer.FusedActivation fusedActivation)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Tensor | K | |
| Tensor | B | |
| Int32[] | stride | stride |
| Int32[] | pad | padding |
| Int32[] | outputAdjustment | output adjustments |
| Layer.FusedActivation | fusedActivation | fused activation type |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Conv3D(Tensor, Tensor, Tensor, Int32[], Int32[], Layer.FusedActivation)
3D convolution
Declaration
Tensor IOps.Conv3D(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Tensor | K | |
| Tensor | B | |
| Int32[] | stride | stride |
| Int32[] | pad | padding |
| Layer.FusedActivation | fusedActivation | fused activation type |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Copy(Tensor)
Copy
Declaration
Tensor IOps.Copy(Tensor x)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | x | input |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Cos(Tensor)
Cos
Declaration
Tensor IOps.Cos(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Cosh(Tensor)
Cosh
Declaration
Tensor IOps.Cosh(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Dense(Tensor, Tensor, Tensor, Layer.FusedActivation)
Dense layer (matrix multiplication) o = x ⨯ w + b
Declaration
Tensor IOps.Dense(Tensor X, Tensor W, Tensor B, Layer.FusedActivation fusedActivation)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Tensor | W | |
| Tensor | B | |
| Layer.FusedActivation | fusedActivation | fused activation type |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Dense3(Tensor, Tensor, Tensor)
rank3 Dense layer (matrix multiplication) o = x ⨯ w + b
O: N,,W,C / X: N,,W,C / W:N,,,C / B:N,,,_
Declaration
Tensor IOps.Dense3(Tensor X, Tensor W, Tensor B)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Tensor | W | |
| Tensor | B |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.DepthToSpace(Tensor, Int32[], Layer.DepthToSpaceMode)
Depth to space
Declaration
Tensor IOps.DepthToSpace(Tensor X, int[] scale, Layer.DepthToSpaceMode mode)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | scale | scale |
| Layer.DepthToSpaceMode | mode | mode |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.DepthwiseConv2D(Tensor, Tensor, Tensor, Int32[], Int32[], Layer.FusedActivation)
Depthwise 2D convolution
Declaration
Tensor IOps.DepthwiseConv2D(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Tensor | K | |
| Tensor | B | |
| Int32[] | stride | stride |
| Int32[] | pad | padding |
| Layer.FusedActivation | fusedActivation | fused activation type |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Div(Tensor[])
Divide tensors o = tensors[0] / tensors[1] / ... / tensors[N-1]
Declaration
Tensor IOps.Div(Tensor[] tensors)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | tensors | input tensors |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Dropout(Tensor, Single)
Dropout
Declaration
Tensor IOps.Dropout(Tensor X, float alpha)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Single | alpha | alpha |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Elu(Tensor, Single)
ELU
Declaration
Tensor IOps.Elu(Tensor X, float alpha)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Single | alpha | alpha |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Equal(Tensor, Tensor)
Equal
Declaration
Tensor IOps.Equal(Tensor a, Tensor b)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | a | left Tensor |
| Tensor | b | right Tensor |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor with |
Implements
IOps.Erf(Tensor)
Erf
Declaration
Tensor IOps.Erf(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Exp(Tensor)
Exponent e^x
Declaration
Tensor IOps.Exp(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Expand(Tensor, TensorShape)
Expand
Declaration
Tensor IOps.Expand(Tensor X, TensorShape shape)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| TensorShape | shape | new shape |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Flatten(Tensor)
Flatten
Declaration
Tensor IOps.Flatten(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Floor(Tensor)
Floor
Declaration
Tensor IOps.Floor(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Gather(Tensor[], Int32)
Gather
Declaration
Tensor IOps.Gather(Tensor[] tensors, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | tensors | input tensors |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.GlobalAvgPool2D(Tensor)
2D global average pooling
Declaration
Tensor IOps.GlobalAvgPool2D(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.GlobalAvgVariancePool2D(Tensor)
2D global average variance pooling
Declaration
Tensor IOps.GlobalAvgVariancePool2D(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.GlobalMaxPool2D(Tensor)
2D global max pooling
Declaration
Tensor IOps.GlobalMaxPool2D(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Greater(Tensor, Tensor)
Greater
Declaration
Tensor IOps.Greater(Tensor a, Tensor b)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | a | left Tensor |
| Tensor | b | right Tensor |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor with |
Implements
IOps.GreaterEqual(Tensor, Tensor)
Greater or equal
Declaration
Tensor IOps.GreaterEqual(Tensor a, Tensor b)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | a | left Tensor |
| Tensor | b | right Tensor |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor with |
Implements
IOps.HardSigmoid(Tensor, Single, Single)
HardSigmoid
Declaration
Tensor IOps.HardSigmoid(Tensor X, float alpha, float beta)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Single | alpha | alpha |
| Single | beta |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.LeakyRelu(Tensor, Single)
Leaky ReLU
Declaration
Tensor IOps.LeakyRelu(Tensor X, float alpha)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Single | alpha | alpha |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Less(Tensor, Tensor)
Less
Declaration
Tensor IOps.Less(Tensor a, Tensor b)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | a | left Tensor |
| Tensor | b | right Tensor |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor with |
Implements
IOps.LessEqual(Tensor, Tensor)
Less or equal
Declaration
Tensor IOps.LessEqual(Tensor a, Tensor b)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | a | left Tensor |
| Tensor | b | right Tensor |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor with |
Implements
IOps.Log(Tensor)
Log
Declaration
Tensor IOps.Log(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.LogicalAnd(Tensor, Tensor)
And
Declaration
Tensor IOps.LogicalAnd(Tensor a, Tensor b)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | a | left Tensor |
| Tensor | b | right Tensor |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor with |
Implements
IOps.LogicalNot(Tensor)
Not
Declaration
Tensor IOps.LogicalNot(Tensor x)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | x | input |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor with !x values |
Implements
IOps.LogicalOr(Tensor, Tensor)
Or
Declaration
Tensor IOps.LogicalOr(Tensor a, Tensor b)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | a | left Tensor |
| Tensor | b | right Tensor |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor with |
Implements
IOps.LogicalXor(Tensor, Tensor)
Xor
Declaration
Tensor IOps.LogicalXor(Tensor a, Tensor b)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | a | left Tensor |
| Tensor | b | right Tensor |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor with |
Implements
IOps.LogSoftmax(Tensor, Int32)
LogSoftmax
Declaration
Tensor IOps.LogSoftmax(Tensor X, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.LRN(Tensor, Single, Single, Single, Int32)
LRN (Local Response Normalization)
Declaration
Tensor IOps.LRN(Tensor X, float alpha, float beta, float bias, int size)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Single | alpha | alpha |
| Single | beta | beta |
| Single | bias | bias |
| Int32 | size | size |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.MatMul(Tensor, Boolean, Tensor, Boolean)
Matrix multiplication o = x ⨯ y
Declaration
Tensor IOps.MatMul(Tensor X, bool xTranspose, Tensor Y, bool yTranspose)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Boolean | xTranspose | transposed |
| Tensor | Y | |
| Boolean | yTranspose | transposed |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.MatMul(Tensor, Int32, Tensor, Int32)
Multidimensional Matrix multiplication o = x ⨯ y
Declaration
Tensor IOps.MatMul(Tensor X, int rankX, Tensor Y, int rankY)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | rankX | rank of |
| Tensor | Y | |
| Int32 | rankY | rank of |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Max(Tensor[])
Max
Declaration
Tensor IOps.Max(Tensor[] tensors)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | tensors | input tensors |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.MaxPool2D(Tensor, Int32[], Int32[], Int32[])
2D max pooling
Declaration
Tensor IOps.MaxPool2D(Tensor X, int[] pool, int[] stride, int[] pad)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | pool | pooling |
| Int32[] | stride | stride |
| Int32[] | pad | padding |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Mean(Tensor[])
Mean
Declaration
Tensor IOps.Mean(Tensor[] tensors)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | tensors | input tensors |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Min(Tensor[])
Min
Declaration
Tensor IOps.Min(Tensor[] tensors)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | tensors | input tensors |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Mul(Tensor[])
Multiply tensors together
Declaration
Tensor IOps.Mul(Tensor[] tensors)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | tensors | input tensors |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Multinomial(Tensor, Int32, Int32)
Multinomial random distribution
Declaration
Tensor IOps.Multinomial(Tensor X, int count, int seed)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | count | count |
| Int32 | seed | seed |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Neg(Tensor)
Neg
Declaration
Tensor IOps.Neg(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.NonMaxSuppression(Tensor[], Int32, Single, Single, Int32)
Non max suppression tensors[0] - boxes, tensors[1] - scores
Declaration
Tensor IOps.NonMaxSuppression(Tensor[] tensors, int maxOutputBoxesPerClass, float iouThreshold, float scoreThreshold, int centerPointBox)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | tensors | |
| Int32 | maxOutputBoxesPerClass | max output boxes per class |
| Single | iouThreshold | IOU (Intersection Over Union) threshold |
| Single | scoreThreshold | score threshold |
| Int32 | centerPointBox | center point box |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Normalization(Tensor, Tensor, Tensor, Int32, Int32, Single, Layer.FusedActivation)
Normalization
Declaration
Tensor IOps.Normalization(Tensor X, Tensor S, Tensor B, int pool, int axis, float epsilon, Layer.FusedActivation fusedActivation)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Tensor | S | |
| Tensor | B | |
| Int32 | pool | pooling |
| Int32 | axis | axis |
| Single | epsilon | threshold |
| Layer.FusedActivation | fusedActivation | fused activation type |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.OneHot(Tensor, Int32, Single, Single, Int32)
One hot
Declaration
Tensor IOps.OneHot(Tensor X, int depth, float onValue, float offValue, int inputRank)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | depth | output depth |
| Single | onValue | on value |
| Single | offValue | off value |
| Int32 | inputRank | input rank helper |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Pad2DEdge(Tensor, Int32[])
Edge padding
Declaration
Tensor IOps.Pad2DEdge(Tensor X, int[] pad)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | pad | padding |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Pad2DReflect(Tensor, Int32[])
Reflection padding
Declaration
Tensor IOps.Pad2DReflect(Tensor X, int[] pad)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | pad | padding |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Pad2DSymmetric(Tensor, Int32[])
Symmetric padding
Declaration
Tensor IOps.Pad2DSymmetric(Tensor X, int[] pad)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | pad | padding |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Pow(Tensor, Single)
Power
Declaration
Tensor IOps.Pow(Tensor X, float alpha)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Single | alpha | alpha |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Pow(Tensor[])
Raise tensors to the power o =tensors[0] ^ tensors[1] ^ ... ^ tensors[N-1]
Declaration
Tensor IOps.Pow(Tensor[] tensors)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | tensors | input tensors |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.PRelu(Tensor, Tensor)
PReLU
Declaration
Tensor IOps.PRelu(Tensor X, Tensor S)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Tensor | S |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Prepare(Tensor)
Prepares tensor for use
Declaration
Tensor IOps.Prepare(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor |
Implements
IOps.PrepareNoAlloc(Tensor)
Prepares tensor for use without uploading internal data to device
Declaration
Tensor IOps.PrepareNoAlloc(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor |
Implements
IOps.RandomNormal(TensorShape, Single, Single, Int32)
Normal random distribution
Declaration
Tensor IOps.RandomNormal(TensorShape s, float mean, float scale, int seed)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorShape | s | shape |
| Single | mean | mean |
| Single | scale | scale |
| Int32 | seed | seed |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.RandomUniform(TensorShape, Single, Single, Int32)
Uniform random distribution
Declaration
Tensor IOps.RandomUniform(TensorShape s, float mean, float scale, int seed)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorShape | s | shape |
| Single | mean | mean |
| Single | scale | scale |
| Int32 | seed | seed |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Reciprocal(Tensor)
Reciprocal (1/x)
Declaration
Tensor IOps.Reciprocal(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.ReduceMax(Tensor, Int32)
Reduce with max
Declaration
Tensor IOps.ReduceMax(Tensor X, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.ReduceMean(Tensor, Int32)
Reduce with mean
Declaration
Tensor IOps.ReduceMean(Tensor X, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.ReduceMin(Tensor, Int32)
Reduce with min
Declaration
Tensor IOps.ReduceMin(Tensor X, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.ReduceProd(Tensor, Int32)
Reduce with product
Declaration
Tensor IOps.ReduceProd(Tensor X, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.ReduceSum(Tensor, Int32)
Reduce with sum
Declaration
Tensor IOps.ReduceSum(Tensor X, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Relu(Tensor)
ReLU
Declaration
Tensor IOps.Relu(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Relu6(Tensor)
ReLU capped to 6
Declaration
Tensor IOps.Relu6(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Resample2D(Tensor, Int32[], Boolean)
Resample 2D
Declaration
Tensor IOps.Resample2D(Tensor X, int[] size, bool bilinear)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | size | size |
| Boolean | bilinear | bilinear flag |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.ResetAllocator(Boolean)
Reset internal allocator
Declaration
void IOps.ResetAllocator(bool keepCachedMemory)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | keepCachedMemory | keep cached memory flag |
Implements
IOps.Reshape(Tensor, TensorShape)
Reshape
Declaration
Tensor IOps.Reshape(Tensor X, TensorShape shape)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| TensorShape | shape | new shape |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.RoiAlign(Tensor, Tensor, Tensor, Int32, Int32, Int32, Single)
RoiAlign
Declaration
Tensor IOps.RoiAlign(Tensor X, Tensor rois, Tensor indices, int outputHeight, int outputWidth, int samplingRatio, float spatialScale)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Tensor | rois | |
| Tensor | indices | batch indices |
| Int32 | outputHeight | outputHeight |
| Int32 | outputWidth | outputWidth |
| Int32 | samplingRatio | samplingRatio |
| Single | spatialScale | spatialScale |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Round(Tensor)
Round to nearest integer. In case of halfs, round to nearest even integer
Declaration
Tensor IOps.Round(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.ScaleBias(Tensor, Tensor, Tensor)
Scale bias o = s * x + b, element wise
Declaration
Tensor IOps.ScaleBias(Tensor X, Tensor S, Tensor B)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Tensor | S | |
| Tensor | B |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.ScatterND(Tensor, Tensor, Tensor, Layer.ScatterNDReductionMode)
Declaration
Tensor IOps.ScatterND(Tensor X, Tensor indices, Tensor updates, Layer.ScatterNDReductionMode reduction)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Tensor | indices | |
| Tensor | updates | |
| Layer.ScatterNDReductionMode | reduction |
Returns
| Type | Description |
|---|---|
| Tensor |
Implements
IOps.Selu(Tensor, Single, Single)
SELU
Declaration
Tensor IOps.Selu(Tensor X, float alpha, float gamma)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Single | alpha | alpha |
| Single | gamma | gamma |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.SetModelExecutionsReporter(IModelExecutionsReporter)
Set model executions reporter model executions reporter
Declaration
void IOps.SetModelExecutionsReporter(IModelExecutionsReporter executionsReporter)
Parameters
| Type | Name | Description |
|---|---|---|
| IModelExecutionsReporter | executionsReporter |
Implements
IOps.Shape(Tensor, Int32)
Shape of the input
Declaration
Tensor IOps.Shape(Tensor X, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | input |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Sigmoid(Tensor)
Sigmoid
Declaration
Tensor IOps.Sigmoid(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Sign(Tensor)
Sign
Declaration
Tensor IOps.Sign(Tensor x)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | x | input |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor with 1 if x > 0 -1 if < 0 and 0 if == 0 values |
Implements
IOps.Sin(Tensor)
Sin
Declaration
Tensor IOps.Sin(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Sinh(Tensor)
Sinh
Declaration
Tensor IOps.Sinh(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Softmax(Tensor, Int32)
Softmax
Declaration
Tensor IOps.Softmax(Tensor X, int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | axis | axis |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Softplus(Tensor)
Softplus
Declaration
Tensor IOps.Softplus(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.SpaceToDepth(Tensor, Int32[])
Space to depth
Declaration
Tensor IOps.SpaceToDepth(Tensor X, int[] scale)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | scale | scale |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Sqrt(Tensor)
Sqrt
Declaration
Tensor IOps.Sqrt(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.StridedSlice(Tensor, Int32[], Int32[], Int32[])
Strided slice
Declaration
Tensor IOps.StridedSlice(Tensor X, int[] starts, int[] ends, int[] strides)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | starts | |
| Int32[] | ends | |
| Int32[] | strides |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Sub(Tensor[])
Subtract tensors o = tensors[0] - tensors[1] - ... - tensors[N-1]
Declaration
Tensor IOps.Sub(Tensor[] tensors)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | tensors | input tensors |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Swish(Tensor)
Swish
Declaration
Tensor IOps.Swish(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Tan(Tensor)
Tan
Declaration
Tensor IOps.Tan(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Tanh(Tensor)
Tanh
Declaration
Tensor IOps.Tanh(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Tile(Tensor, Int32[])
Tile
Declaration
Tensor IOps.Tile(Tensor X, int[] repeats)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | repeats | repetition counts |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.TopKIndices(Tensor, Int32, Int32, Boolean, Boolean)
Top K indices
Declaration
Tensor IOps.TopKIndices(Tensor X, int k, int axis, bool largest, bool sorted)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32 | k | k |
| Int32 | axis | axis |
| Boolean | largest | largest flag |
| Boolean | sorted | sorted flag |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Transpose(Tensor)
Transpose matrix
Declaration
Tensor IOps.Transpose(Tensor X)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Transpose(Tensor, Int32[])
Transpose according to permutations
Declaration
Tensor IOps.Transpose(Tensor X, int[] permutations)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | permutations | new axis order |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Upsample2D(Tensor, Int32[], Boolean)
Upsample 2D
Declaration
Tensor IOps.Upsample2D(Tensor X, int[] scale, bool bilinear)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | scale | scale |
| Boolean | bilinear | bilinear flag |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Upsample3D(Tensor, Int32[], Boolean)
Upsample 3D
Declaration
Tensor IOps.Upsample3D(Tensor X, int[] scale, bool trilinear)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | X | |
| Int32[] | scale | scale |
| Boolean | trilinear | trilinear flag |
Returns
| Type | Description |
|---|---|
| Tensor | output Tensor |
Implements
IOps.Where(Tensor, Tensor, Tensor)
Where
Declaration
Tensor IOps.Where(Tensor c, Tensor a, Tensor b)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor | c | Tensor c |
| Tensor | a | Tensor a |
| Tensor | b | Tensor b |
Returns
| Type | Description |
|---|---|
| Tensor | Tensor with values |