Interface IOps
Interfaces for backend implementers
see ModelBuilder.cs for detail on layers.
Syntax
Methods
Abs(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Add(Tensor[])
Declaration
Tensor Add(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
AvgPool2D(Tensor, Int32[], Int32[], Int32[])
Declaration
Tensor AvgPool2D(Tensor x, int[] pool, int[] stride, int[] pad)
Parameters
Returns
Border2D(Tensor, Int32[], Single)
Declaration
Tensor Border2D(Tensor x, int[] pad, float borderValue)
Parameters
Returns
Ceil(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Clip(Tensor, Single, Single)
Declaration
Tensor Clip(Tensor x, float min, float max)
Parameters
Returns
Concat(Tensor[], Int32)
Declaration
Tensor Concat(Tensor[] tensors, int axis)
Parameters
Returns
Conv2D(Tensor, Tensor, Tensor, Int32[], Int32[], Layer.FusedActivation)
Declaration
Tensor Conv2D(Tensor x, Tensor k, Tensor b, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
Parameters
Returns
Conv2DTrans(Tensor, Tensor, Tensor, Int32[], Int32[], Int32[], Layer.FusedActivation)
Declaration
Tensor Conv2DTrans(Tensor x, Tensor k, Tensor b, int[] stride, int[] pad, int[] outputAdjustment, Layer.FusedActivation fusedActivation)
Parameters
Returns
Copy(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Dense(Tensor, Tensor, Tensor, Layer.FusedActivation)
Declaration
Tensor Dense(Tensor x, Tensor w, Tensor b, Layer.FusedActivation fusedActivation)
Parameters
Returns
DepthToSpace(Tensor, Int32[], Layer.DepthToSpaceMode)
Declaration
Tensor DepthToSpace(Tensor x, int[] scale, Layer.DepthToSpaceMode mode)
Parameters
Returns
DepthwiseConv2D(Tensor, Tensor, Tensor, Int32[], Int32[], Layer.FusedActivation)
Declaration
Tensor DepthwiseConv2D(Tensor x, Tensor k, Tensor b, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
Parameters
Returns
Div(Tensor[])
Declaration
Tensor Div(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Dropout(Tensor, Single)
Declaration
Tensor Dropout(Tensor x, float alpha)
Parameters
Returns
Elu(Tensor, Single)
Declaration
Tensor Elu(Tensor x, float alpha)
Parameters
Returns
Equal(Tensor, Tensor)
Declaration
Tensor Equal(Tensor a, Tensor b)
Parameters
Returns
Exp(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Expand(Tensor, TensorShape)
Declaration
Tensor Expand(Tensor x, TensorShape shape)
Parameters
Returns
Flatten(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Floor(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Gather(Tensor[], Int32)
Declaration
Tensor Gather(Tensor[] tensors, int axis)
Parameters
Returns
GlobalAvgPool2D(Tensor)
Declaration
Tensor GlobalAvgPool2D(Tensor x)
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
GlobalAvgVariancePool2D(Tensor)
Declaration
Tensor GlobalAvgVariancePool2D(Tensor x)
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
GlobalMaxPool2D(Tensor)
Declaration
Tensor GlobalMaxPool2D(Tensor x)
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Greater(Tensor, Tensor)
Declaration
Tensor Greater(Tensor a, Tensor b)
Parameters
Returns
GreaterEqual(Tensor, Tensor)
Declaration
Tensor GreaterEqual(Tensor a, Tensor b)
Parameters
Returns
LeakyRelu(Tensor, Single)
Declaration
Tensor LeakyRelu(Tensor x, float alpha)
Parameters
Returns
Less(Tensor, Tensor)
Declaration
Tensor Less(Tensor a, Tensor b)
Parameters
Returns
LessEqual(Tensor, Tensor)
Declaration
Tensor LessEqual(Tensor a, Tensor b)
Parameters
Returns
Log(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
LogicalAnd(Tensor, Tensor)
Declaration
Tensor LogicalAnd(Tensor a, Tensor b)
Parameters
Returns
LogicalNot(Tensor)
Declaration
Tensor LogicalNot(Tensor x)
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
LogicalOr(Tensor, Tensor)
Declaration
Tensor LogicalOr(Tensor a, Tensor b)
Parameters
Returns
LogicalXor(Tensor, Tensor)
Declaration
Tensor LogicalXor(Tensor a, Tensor b)
Parameters
Returns
LogSoftmax(Tensor)
Declaration
Tensor LogSoftmax(Tensor x)
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
LRN(Tensor, Single, Single, Single, Int32)
Declaration
Tensor LRN(Tensor x, float alpha, float beta, float bias, int size)
Parameters
Returns
MatMul(Tensor, Boolean, Tensor, Boolean)
Declaration
Tensor MatMul(Tensor x, bool xTranspose, Tensor y, bool yTranspose)
Parameters
Returns
Max(Tensor[])
Declaration
Tensor Max(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
MaxPool2D(Tensor, Int32[], Int32[], Int32[])
Declaration
Tensor MaxPool2D(Tensor x, int[] pool, int[] stride, int[] pad)
Parameters
Returns
Mean(Tensor[])
Declaration
Tensor Mean(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Min(Tensor[])
Declaration
Tensor Min(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Mul(Tensor[])
Declaration
Tensor Mul(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Multinomial(Tensor, Int32, Int32)
Declaration
Tensor Multinomial(Tensor x, int count, int seed)
Parameters
Returns
Neg(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Normalization(Tensor, Tensor, Tensor, Int32, Int32, Single, Layer.FusedActivation)
Declaration
Tensor Normalization(Tensor x, Tensor s, Tensor b, int pool, int axis, float epsilon, Layer.FusedActivation fusedActivation)
Parameters
Returns
OneHot(Tensor, Int32, Single, Single)
Declaration
Tensor OneHot(Tensor x, int depth, float onValue, float offValue)
Parameters
Returns
Pad2DEdge(Tensor, Int32[])
Declaration
Tensor Pad2DEdge(Tensor x, int[] pad)
Parameters
Returns
Pad2DReflect(Tensor, Int32[])
Declaration
Tensor Pad2DReflect(Tensor x, int[] pad)
Parameters
Returns
Pad2DSymmetric(Tensor, Int32[])
Declaration
Tensor Pad2DSymmetric(Tensor x, int[] pad)
Parameters
Returns
Pow(Tensor, Single)
Declaration
Tensor Pow(Tensor x, float alpha)
Parameters
Returns
Pow(Tensor[])
Declaration
Tensor Pow(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
PRelu(Tensor, Tensor)
Declaration
Tensor PRelu(Tensor x, Tensor alpha)
Parameters
Returns
Prepare(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
RandomNormal(TensorShape, Single, Single, Int32)
Declaration
Tensor RandomNormal(TensorShape s, float mean, float scale, int seed)
Parameters
Returns
Declaration
Tensor RandomUniform(TensorShape s, float mean, float scale, int seed)
Parameters
Returns
Reciprocal(Tensor)
Declaration
Tensor Reciprocal(Tensor x)
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
ReduceMax(Tensor, Int32)
Declaration
Tensor ReduceMax(Tensor x, int axis)
Parameters
Returns
ReduceMean(Tensor, Int32)
Declaration
Tensor ReduceMean(Tensor x, int axis)
Parameters
Returns
ReduceMin(Tensor, Int32)
Declaration
Tensor ReduceMin(Tensor x, int axis)
Parameters
Returns
ReduceProd(Tensor, Int32)
Declaration
Tensor ReduceProd(Tensor x, int axis)
Parameters
Returns
ReduceSum(Tensor, Int32)
Declaration
Tensor ReduceSum(Tensor x, int axis)
Parameters
Returns
Relu(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Relu6(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Resample2D(Tensor, Int32[], Boolean)
Declaration
Tensor Resample2D(Tensor x, int[] size, bool bilinear)
Parameters
Returns
ResetAllocator(Boolean)
Declaration
void ResetAllocator(bool keepCachedMemory = true)
Parameters
Type |
Name |
Description |
Boolean |
keepCachedMemory |
|
Reshape(Tensor, TensorShape)
Declaration
Tensor Reshape(Tensor x, TensorShape shape)
Parameters
Returns
ScaleBias(Tensor, Tensor, Tensor)
Declaration
Tensor ScaleBias(Tensor x, Tensor s, Tensor b)
Parameters
Returns
Selu(Tensor, Single, Single)
Declaration
Tensor Selu(Tensor x, float alpha, float gamma)
Parameters
Returns
Sigmoid(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Softmax(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
SpaceToDepth(Tensor, Int32[])
Declaration
Tensor SpaceToDepth(Tensor x, int[] scale)
Parameters
Returns
Sqrt(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
StridedSlice(Tensor, Int32[], Int32[], Int32[])
Declaration
Tensor StridedSlice(Tensor x, int[] starts, int[] ends, int[] stride)
Parameters
Returns
Sub(Tensor[])
Declaration
Tensor Sub(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Swish(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Tanh(Tensor)
Declaration
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Tile(Tensor, Int32[])
Declaration
Tensor Tile(Tensor x, int[] repeats)
Parameters
Returns
Transpose(Tensor)
Declaration
Tensor Transpose(Tensor x)
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Returns
Upsample2D(Tensor, Int32[], Boolean)
Declaration
Tensor Upsample2D(Tensor x, int[] scale, bool bilinear)
Parameters
Returns