Class PixelShaderOps
Inherited Members
Namespace: Unity.Barracuda
Syntax
public class PixelShaderOps : ReferenceCPUOps, IOps, IOpsStatistics
Constructors
PixelShaderOps(ITensorAllocator)
Declaration
public PixelShaderOps(ITensorAllocator allocator = null)
Parameters
Type | Name | Description |
---|---|---|
ITensorAllocator | allocator |
Methods
Abs(Tensor)
Abs
Declaration
public override Tensor Abs(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Acos(Tensor)
Acos
Declaration
public override Tensor Acos(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Acosh(Tensor)
Acosh
Declaration
public override Tensor Acosh(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Activation(String, Tensor, Single, Single)
Generic activation function
Declaration
protected virtual Tensor Activation(string kernelName, Tensor X, float alpha = 0F, float beta = 0F)
Parameters
Type | Name | Description |
---|---|---|
String | kernelName | kernel name |
Tensor | X | input |
Single | alpha | alpha |
Single | beta | beta |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Add(Tensor[])
Add tensors
together
Declaration
public override Tensor Add(Tensor[] tensors)
Parameters
Type | Name | Description |
---|---|---|
Tensor[] | tensors | input tensors |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
ApplyPadding(Tensor, Int32[], String, Single)
Apply padding
Declaration
protected virtual Tensor ApplyPadding(Tensor X, int[] pad, string kernelName, float constant = 0F)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | input |
Int32[] | pad | padding |
String | kernelName | kernel name |
Single | constant | constant |
Returns
Type | Description |
---|---|
Tensor | output |
ArgMax(Tensor, Int32)
ArgMax
Declaration
public override Tensor ArgMax(Tensor X, int axis)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32 | axis | axis |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
ArgMin(Tensor, Int32)
ArgMax
Declaration
public override Tensor ArgMin(Tensor X, int axis)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32 | axis | axis |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Asin(Tensor)
Asin
Declaration
public override Tensor Asin(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Asinh(Tensor)
Asinh
Declaration
public override Tensor Asinh(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Atan(Tensor)
Atan
Declaration
public override Tensor Atan(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Atanh(Tensor)
Atanh
Declaration
public override Tensor Atanh(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
AvgPool2D(Tensor, Int32[], Int32[], Int32[])
2D average pooling
Declaration
public override Tensor 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 |
Overrides
Border2D(Tensor, Int32[], Single)
2D border padding
Declaration
public override Tensor Border2D(Tensor X, int[] pad, float constant)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32[] | pad | padding |
Single | constant |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Ceil(Tensor)
Ceil
Declaration
public override Tensor Ceil(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Clip(Tensor, Single, Single)
Clip
Declaration
public override Tensor 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 |
Overrides
Concat(Tensor[], Int32)
Concatenate tensors
across axis
Declaration
public override Tensor Concat(Tensor[] tensors, int axis)
Parameters
Type | Name | Description |
---|---|---|
Tensor[] | tensors | input tensors |
Int32 | axis | axis |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Conv2D(Tensor, Tensor, Tensor, Int32[], Int32[], Layer.FusedActivation)
2D convolution
Declaration
public override Tensor 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 |
Overrides
Conv2DTrans(Tensor, Tensor, Tensor, Int32[], Int32[], Int32[], Layer.FusedActivation)
Transpose 2D convolution
Declaration
public override Tensor 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 |
Overrides
Copy(Tensor)
Copy
Declaration
public override Tensor Copy(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Cos(Tensor)
Cos
Declaration
public override Tensor Cos(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Cosh(Tensor)
Cosh
Declaration
public override Tensor Cosh(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Dense(Tensor, Tensor, Tensor, Layer.FusedActivation)
Dense layer (matrix multiplication) o = x
⨯ w
+ b
Declaration
public override Tensor 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 |
Overrides
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
public override Tensor Dense3(Tensor X, Tensor W, Tensor B)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Tensor | W | |
Tensor | B |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
DepthToSpace(Tensor, Int32[], Layer.DepthToSpaceMode)
Depth to space
Declaration
public override Tensor DepthToSpace(Tensor X, int[] blocksize, Layer.DepthToSpaceMode mode)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32[] | blocksize | |
Layer.DepthToSpaceMode | mode | mode |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
DepthwiseConv2D(Tensor, Tensor, Tensor, Int32[], Int32[], Layer.FusedActivation)
Depthwise 2D convolution
Declaration
public override Tensor 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 |
Overrides
Div(Tensor[])
Divide tensors o = tensors[0] / tensors[1] / ... / tensors[N-1]
Declaration
public override Tensor Div(Tensor[] tensors)
Parameters
Type | Name | Description |
---|---|---|
Tensor[] | tensors | input tensors |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
ElementwiseWithBroadcast(String, Tensor[])
Elementwise broadcast for specified kernel
Declaration
protected virtual Tensor ElementwiseWithBroadcast(string kernelName, Tensor[] tensors)
Parameters
Type | Name | Description |
---|---|---|
String | kernelName | kernel name |
Tensor[] | tensors | input tensors |
Returns
Type | Description |
---|---|
Tensor | output |
Exceptions
Type | Condition |
---|---|
NotImplementedException | thrown if input |
Elu(Tensor, Single)
ELU
Declaration
public override Tensor Elu(Tensor X, float alpha)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Single | alpha | alpha |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Equal(Tensor, Tensor)
Equal
Declaration
public override Tensor Equal(Tensor A, Tensor B)
Parameters
Type | Name | Description |
---|---|---|
Tensor | A | |
Tensor | B |
Returns
Type | Description |
---|---|
Tensor | Tensor with |
Overrides
Erf(Tensor)
Erf
Declaration
public override Tensor Erf(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Exp(Tensor)
Exponent e^x
Declaration
public override Tensor Exp(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Flatten(Tensor)
Flatten
Declaration
public override Tensor Flatten(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Floor(Tensor)
Floor
Declaration
public override Tensor Floor(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Gather(Tensor[], Int32)
Gather
Declaration
public override Tensor Gather(Tensor[] tensors, int axis)
Parameters
Type | Name | Description |
---|---|---|
Tensor[] | tensors | input tensors |
Int32 | axis | axis |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
GlobalAvgPool2D(Tensor)
2D global average pooling
Declaration
public override Tensor GlobalAvgPool2D(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
GlobalAvgVariancePool2D(Tensor)
2D global average variance pooling
Declaration
public override Tensor GlobalAvgVariancePool2D(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
GlobalMaxPool2D(Tensor)
2D global max pooling
Declaration
public override Tensor GlobalMaxPool2D(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
GlobalPool2D(String, Tensor)
Generic pooling 2D
Declaration
protected virtual Tensor GlobalPool2D(string kernelName, Tensor X)
Parameters
Type | Name | Description |
---|---|---|
String | kernelName | kernel name |
Tensor | X | input |
Returns
Type | Description |
---|---|
Tensor | output |
Greater(Tensor, Tensor)
Greater
Declaration
public override Tensor Greater(Tensor A, Tensor B)
Parameters
Type | Name | Description |
---|---|---|
Tensor | A | |
Tensor | B |
Returns
Type | Description |
---|---|
Tensor | Tensor with |
Overrides
GreaterEqual(Tensor, Tensor)
Greater or equal
Declaration
public override Tensor GreaterEqual(Tensor A, Tensor B)
Parameters
Type | Name | Description |
---|---|---|
Tensor | A | |
Tensor | B |
Returns
Type | Description |
---|---|
Tensor | Tensor with |
Overrides
HardSigmoid(Tensor, Single, Single)
HardSigmoid
Declaration
public override Tensor HardSigmoid(Tensor X, float alpha, float beta)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Single | alpha | alpha |
Single | beta |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
IsFusedActivationSupported(Layer.FusedActivation)
Check if fusedActivation
is supported in-place
Declaration
protected override bool IsFusedActivationSupported(Layer.FusedActivation fusedActivation)
Parameters
Type | Name | Description |
---|---|---|
Layer.FusedActivation | fusedActivation | fused activation type |
Returns
Type | Description |
---|---|
Boolean |
|
Overrides
LeakyRelu(Tensor, Single)
Leaky ReLU
Declaration
public override Tensor LeakyRelu(Tensor X, float alpha)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Single | alpha | alpha |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Less(Tensor, Tensor)
Less
Declaration
public override Tensor Less(Tensor A, Tensor B)
Parameters
Type | Name | Description |
---|---|---|
Tensor | A | |
Tensor | B |
Returns
Type | Description |
---|---|
Tensor | Tensor with |
Overrides
LessEqual(Tensor, Tensor)
Less or equal
Declaration
public override Tensor LessEqual(Tensor A, Tensor B)
Parameters
Type | Name | Description |
---|---|---|
Tensor | A | |
Tensor | B |
Returns
Type | Description |
---|---|
Tensor | Tensor with |
Overrides
Log(Tensor)
Log
Declaration
public override Tensor Log(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
LogicalAnd(Tensor, Tensor)
And
Declaration
public override Tensor LogicalAnd(Tensor A, Tensor B)
Parameters
Type | Name | Description |
---|---|---|
Tensor | A | |
Tensor | B |
Returns
Type | Description |
---|---|
Tensor | Tensor with |
Overrides
LogicalNot(Tensor)
Not
Declaration
public override Tensor LogicalNot(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | Tensor with !x values |
Overrides
LogicalOr(Tensor, Tensor)
Or
Declaration
public override Tensor LogicalOr(Tensor A, Tensor B)
Parameters
Type | Name | Description |
---|---|---|
Tensor | A | |
Tensor | B |
Returns
Type | Description |
---|---|
Tensor | Tensor with |
Overrides
LogicalXor(Tensor, Tensor)
Xor
Declaration
public override Tensor LogicalXor(Tensor A, Tensor B)
Parameters
Type | Name | Description |
---|---|---|
Tensor | A | |
Tensor | B |
Returns
Type | Description |
---|---|
Tensor | Tensor with |
Overrides
LogSoftmax(Tensor, Int32)
LogSoftmax
Declaration
public override Tensor LogSoftmax(Tensor X, int axis)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32 | axis |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
LRN(Tensor, Single, Single, Single, Int32)
LRN (Local Response Normalization)
Declaration
public override Tensor 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 |
Overrides
MatMul(Tensor, Boolean, Tensor, Boolean)
Simple 2D matrix multiplication O = X
⨯ Y
Declaration
public override Tensor MatMul(Tensor X, bool xTranspose, Tensor Y, bool yTranspose)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | left Tensor |
Boolean | xTranspose |
|
Tensor | Y | right Tensor |
Boolean | yTranspose |
|
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Max(Tensor[])
Max
Declaration
public override Tensor Max(Tensor[] tensors)
Parameters
Type | Name | Description |
---|---|---|
Tensor[] | tensors | input tensors |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
MaxPool2D(Tensor, Int32[], Int32[], Int32[])
2D max pooling
Declaration
public override Tensor 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 |
Overrides
Mean(Tensor[])
Mean
Declaration
public override Tensor Mean(Tensor[] tensors)
Parameters
Type | Name | Description |
---|---|---|
Tensor[] | tensors | input tensors |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Min(Tensor[])
Min
Declaration
public override Tensor Min(Tensor[] tensors)
Parameters
Type | Name | Description |
---|---|---|
Tensor[] | tensors | input tensors |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Mul(Tensor[])
Multiply tensors together
Declaration
public override Tensor Mul(Tensor[] tensors)
Parameters
Type | Name | Description |
---|---|---|
Tensor[] | tensors | input tensors |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Neg(Tensor)
Neg
Declaration
public override Tensor Neg(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Normalization(Tensor, Tensor, Tensor, Int32, Int32, Single, Layer.FusedActivation)
Normalization
Declaration
public override Tensor 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 |
Overrides
OneHot(Tensor, Int32, Single, Single, Int32)
One hot
Declaration
public override Tensor OneHot(Tensor X, int depth, float onValue, float offValue, int inputRank = -1)
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 |
Overrides
Pad2DEdge(Tensor, Int32[])
Edge padding
Declaration
public override Tensor Pad2DEdge(Tensor X, int[] pad)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32[] | pad | padding |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Pad2DReflect(Tensor, Int32[])
Reflection padding
Declaration
public override Tensor Pad2DReflect(Tensor X, int[] pad)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32[] | pad | padding |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Pad2DSymmetric(Tensor, Int32[])
Symmetric padding
Declaration
public override Tensor Pad2DSymmetric(Tensor X, int[] pad)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32[] | pad | padding |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Pin(Tensor, Boolean)
Declaration
public TextureTensorData Pin(Tensor X, bool uploadCache = true)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Boolean | uploadCache |
Returns
Type | Description |
---|---|
TextureTensorData |
Pool2D(String, Tensor, Int32[], Int32[], Int32[])
Declaration
protected virtual Tensor Pool2D(string kernelName, Tensor X, int[] pool, int[] stride, int[] pad)
Parameters
Type | Name | Description |
---|---|---|
String | kernelName | |
Tensor | X | |
Int32[] | pool | |
Int32[] | stride | |
Int32[] | pad |
Returns
Type | Description |
---|---|
Tensor |
Pow(Tensor, Single)
Power
Declaration
public override Tensor Pow(Tensor X, float alpha)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Single | alpha | alpha |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Pow(Tensor[])
Raise tensors to the power o =tensors[0] ^ tensors[1] ^ ... ^ tensors[N-1]
Declaration
public override Tensor Pow(Tensor[] tensors)
Parameters
Type | Name | Description |
---|---|---|
Tensor[] | tensors | input tensors |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
PRelu(Tensor, Tensor)
PReLU
Declaration
public override Tensor PRelu(Tensor X, Tensor S)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Tensor | S |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Prepare(Tensor)
Prepares tensor for use
Declaration
public override Tensor Prepare(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | Tensor |
Overrides
PrepareNoAlloc(Tensor)
Prepares tensor for use without uploading internal data to device
Declaration
public override Tensor PrepareNoAlloc(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | Tensor |
Overrides
Reciprocal(Tensor)
Reciprocal (1/x)
Declaration
public override Tensor Reciprocal(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
ReduceMax(Tensor, Int32)
Reduce with max
Declaration
public override Tensor ReduceMax(Tensor X, int axis)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32 | axis | axis |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
ReduceMean(Tensor, Int32)
Reduce with mean
Declaration
public override Tensor ReduceMean(Tensor X, int axis)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32 | axis | axis |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
ReduceMin(Tensor, Int32)
Reduce with min
Declaration
public override Tensor ReduceMin(Tensor X, int axis)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32 | axis | axis |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
ReduceProd(Tensor, Int32)
Reduce with product
Declaration
public override Tensor ReduceProd(Tensor X, int axis)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32 | axis | axis |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
ReduceSum(Tensor, Int32)
Reduce with sum
Declaration
public override Tensor ReduceSum(Tensor X, int axis)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32 | axis | axis |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Relu(Tensor)
ReLU
Declaration
public override Tensor Relu(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Relu6(Tensor)
ReLU capped to 6
Declaration
public override Tensor Relu6(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Resample2D(Tensor, Int32[], Boolean)
Resample 2D
Declaration
public override Tensor 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 |
Overrides
Reshape(Tensor, TensorShape)
Reshape
Declaration
public override Tensor Reshape(Tensor X, TensorShape newShape)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
TensorShape | newShape |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Round(Tensor)
Round to nearest integer. In case of halfs, round to nearest even integer
Declaration
public override Tensor Round(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
ScaleBias(Tensor, Tensor, Tensor)
Scale bias o = s * x + b, element wise
Declaration
public override Tensor ScaleBias(Tensor X, Tensor S, Tensor B)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Tensor | S | |
Tensor | B |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
ScatterND(Tensor, Tensor, Tensor, Layer.ScatterNDReductionMode)
Declaration
public override Tensor 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 |
Overrides
Selu(Tensor, Single, Single)
SELU
Declaration
public override Tensor 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 |
Overrides
ShouldFlattenInputForDenseLayer(TensorShape)
Check if Flatten
is needed for Dense
layer input
Declaration
protected bool ShouldFlattenInputForDenseLayer(TensorShape X)
Parameters
Type | Name | Description |
---|---|---|
TensorShape | X | input shape |
Returns
Type | Description |
---|---|
Boolean |
|
Sigmoid(Tensor)
Sigmoid
Declaration
public override Tensor Sigmoid(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Sign(Tensor)
Sign
Declaration
public override Tensor Sign(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | Tensor with 1 if x > 0 -1 if < 0 and 0 if == 0 values |
Overrides
Sin(Tensor)
Sin
Declaration
public override Tensor Sin(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Sinh(Tensor)
Sinh
Declaration
public override Tensor Sinh(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Softmax(Tensor, Int32)
Softmax
Declaration
public override Tensor Softmax(Tensor X, int axis)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32 | axis | axis |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Softplus(Tensor)
Softplus
Declaration
public override Tensor Softplus(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
SpaceToDepth(Tensor, Int32[])
Space to depth
Declaration
public override Tensor SpaceToDepth(Tensor X, int[] blocksize)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32[] | blocksize |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Sqrt(Tensor)
Sqrt
Declaration
public override Tensor Sqrt(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
StridedSlice(Tensor, Int32[], Int32[], Int32[])
Strided slice
Declaration
public override Tensor 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 |
Overrides
Sub(Tensor[])
Subtract tensors o = tensors[0] - tensors[1] - ... - tensors[N-1]
Declaration
public override Tensor Sub(Tensor[] tensors)
Parameters
Type | Name | Description |
---|---|---|
Tensor[] | tensors | input tensors |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Swish(Tensor)
Swish
Declaration
public override Tensor Swish(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Tan(Tensor)
Tan
Declaration
public override Tensor Tan(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Tanh(Tensor)
Tanh
Declaration
public override Tensor Tanh(Tensor X)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
TensorToRenderTexture(Tensor, RenderTexture, Int32, Int32, Vector4, Vector4, Texture3D, Boolean)
Copy Tensor
data to RenderTexture
Declaration
public void TensorToRenderTexture(Tensor X, RenderTexture target, int batch, int fromChannel, Vector4 scale, Vector4 bias, Texture3D lut, bool flipY = true)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | source |
RenderTexture | target | target |
Int32 | batch | batch |
Int32 | fromChannel | from channel |
Vector4 | scale | scale |
Vector4 | bias | bias |
Texture3D | lut | LUT table |
Boolean | flipY | flips the texture along the Y dimension (optional, default: true) |
Tile(Tensor, Int32[])
Tile
Declaration
public override Tensor Tile(Tensor X, int[] repeats)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32[] | repeats | repetition counts |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Transpose(Tensor, Int32[])
Transpose according to permutations
Declaration
public override Tensor Transpose(Tensor X, int[] permutations)
Parameters
Type | Name | Description |
---|---|---|
Tensor | X | |
Int32[] | permutations | new axis order |
Returns
Type | Description |
---|---|
Tensor | output Tensor |
Overrides
Upsample2D(Tensor, Int32[], Boolean)
Upsample 2D
Declaration
public override Tensor 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 |
Overrides
Where(Tensor, Tensor, Tensor)
Where
Declaration
public override Tensor Where(Tensor C, Tensor A, Tensor B)
Parameters
Type | Name | Description |
---|---|---|
Tensor | C | |
Tensor | A | |
Tensor | B |
Returns
Type | Description |
---|---|
Tensor | Tensor with values |