Class ReferenceComputeOps
Inheritance
ReferenceComputeOps
Syntax
public class ReferenceComputeOps : ReferenceCPUOps, IOps
Constructors
ReferenceComputeOps(ComputeShader, ITensorAllocator)
Declaration
public ReferenceComputeOps(ComputeShader kernels, ITensorAllocator allocator = null)
Parameters
Methods
Activation(String, Tensor, Single, Single)
Declaration
protected virtual Tensor Activation(string kernelName, Tensor X, float alpha = 0F, float beta = 0F)
Parameters
Returns
Add(Tensor[])
Declaration
public override Tensor Add(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Overrides
ApplyPadding(Tensor, Int32[], String, Single)
Declaration
protected virtual Tensor ApplyPadding(Tensor X, int[] pad, string kernelName, float constant = 0F)
Parameters
Returns
AvgPool2D(Tensor, Int32[], Int32[], Int32[])
Declaration
public override Tensor AvgPool2D(Tensor X, int[] pool, int[] stride, int[] pad)
Parameters
Returns
Overrides
Border2D(Tensor, Int32[], Single)
Declaration
public override Tensor Border2D(Tensor X, int[] pad, float constant)
Parameters
Returns
Overrides
Clip(Tensor, Single, Single)
Declaration
public override Tensor Clip(Tensor X, float min, float max)
Parameters
Returns
Overrides
Concat(Tensor[], Int32)
Declaration
public override Tensor Concat(Tensor[] tensors, int axis)
Parameters
Returns
Overrides
Conv2D(Tensor, Tensor, Tensor, Int32[], Int32[])
Declaration
public override Tensor Conv2D(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad)
Parameters
Returns
Overrides
Conv2DTrans(Tensor, Tensor, Tensor, Int32[], Int32[], Int32[])
Declaration
public override Tensor Conv2DTrans(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad, int[] outputAdjustment)
Parameters
Returns
Overrides
CopyAndReshape(Tensor, TensorShape)
Declaration
protected override Tensor CopyAndReshape(Tensor X, TensorShape newShape)
Parameters
Returns
Overrides
Dense(Tensor, Tensor, Tensor)
Declaration
public override Tensor Dense(Tensor X, Tensor W, Tensor B)
Parameters
Returns
Overrides
DepthwiseConv2D(Tensor, Tensor, Tensor, Int32[], Int32[])
Declaration
public override Tensor DepthwiseConv2D(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad)
Parameters
Returns
Overrides
Dispatch(ComputeFunc, TensorShape, Int32, Int32, Int32, String)
Declaration
public Tensor Dispatch(ComputeFunc fn, TensorShape outputShape, int workItemsX, int workItemsY, int workItemsZ, string outputName = "O")
Parameters
Returns
Div(Tensor[])
Declaration
public override Tensor Div(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Overrides
Dropout(Tensor, Single)
Declaration
public override Tensor Dropout(Tensor X, float alpha)
Parameters
Returns
Overrides
ElementwiseWithBroadcast(String, Tensor[])
Declaration
public virtual Tensor ElementwiseWithBroadcast(string kernelName, Tensor[] tensors)
Parameters
Returns
Elu(Tensor, Single)
Declaration
public override Tensor Elu(Tensor X, float alpha)
Parameters
Returns
Overrides
Equal(Tensor, Tensor)
Declaration
public override Tensor Equal(Tensor A, Tensor B)
Parameters
Returns
Overrides
Exp(Tensor)
Declaration
public override Tensor Exp(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
Gather(Tensor[], Int32)
Declaration
public override Tensor Gather(Tensor[] tensors, int axis)
Parameters
Returns
Overrides
GlobalAvgPool2D(Tensor)
Declaration
public override Tensor GlobalAvgPool2D(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
GlobalAvgVariancePool2D(Tensor)
Declaration
public override Tensor GlobalAvgVariancePool2D(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
GlobalMaxPool2D(Tensor)
Declaration
public override Tensor GlobalMaxPool2D(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
GlobalPool2D(String, Tensor)
Declaration
protected virtual Tensor GlobalPool2D(string kernelName, Tensor X)
Parameters
Returns
Greater(Tensor, Tensor)
Declaration
public override Tensor Greater(Tensor A, Tensor B)
Parameters
Returns
Overrides
GreaterEqual(Tensor, Tensor)
Declaration
public override Tensor GreaterEqual(Tensor A, Tensor B)
Parameters
Returns
Overrides
IDivC(Int32, Int32)
Declaration
protected static int IDivC(int v, int div)
Parameters
Returns
LeakyRelu(Tensor, Single)
Declaration
public override Tensor LeakyRelu(Tensor X, float alpha)
Parameters
Returns
Overrides
Less(Tensor, Tensor)
Declaration
public override Tensor Less(Tensor A, Tensor B)
Parameters
Returns
Overrides
LessEqual(Tensor, Tensor)
Declaration
public override Tensor LessEqual(Tensor A, Tensor B)
Parameters
Returns
Overrides
Log(Tensor)
Declaration
public override Tensor Log(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
LogicalAnd(Tensor, Tensor)
Declaration
public override Tensor LogicalAnd(Tensor A, Tensor B)
Parameters
Returns
Overrides
LogicalNot(Tensor)
Declaration
public override Tensor LogicalNot(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
LogicalOr(Tensor, Tensor)
Declaration
public override Tensor LogicalOr(Tensor A, Tensor B)
Parameters
Returns
Overrides
LogicalXor(Tensor, Tensor)
Declaration
public override Tensor LogicalXor(Tensor A, Tensor B)
Parameters
Returns
Overrides
LogSoftmax(Tensor)
Declaration
public override Tensor LogSoftmax(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
Max(Tensor[])
Declaration
public override Tensor Max(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Overrides
MaxPool2D(Tensor, Int32[], Int32[], Int32[])
Declaration
public override Tensor MaxPool2D(Tensor X, int[] pool, int[] stride, int[] pad)
Parameters
Returns
Overrides
Min(Tensor[])
Declaration
public override Tensor Min(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Overrides
Mul(Tensor[])
Declaration
public override Tensor Mul(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Overrides
Neg(Tensor)
Declaration
public override Tensor Neg(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
NewTensor(ComputeFunc, String, TensorShape)
Declaration
public Tensor NewTensor(ComputeFunc fn, string name, TensorShape shape)
Parameters
Returns
Normalization(Tensor, Tensor, Tensor, Int32, Int32, Single)
Declaration
public override Tensor Normalization(Tensor X, Tensor S, Tensor B, int pool, int axis, float epsilon)
Parameters
Returns
Overrides
Pad2DEdge(Tensor, Int32[])
Declaration
public override Tensor Pad2DEdge(Tensor X, int[] pad)
Parameters
Returns
Overrides
Pad2DReflect(Tensor, Int32[])
Declaration
public override Tensor Pad2DReflect(Tensor X, int[] pad)
Parameters
Returns
Overrides
Pad2DSymmetric(Tensor, Int32[])
Declaration
public override Tensor Pad2DSymmetric(Tensor X, int[] pad)
Parameters
Returns
Overrides
Pin(Tensor)
Declaration
public ComputeTensorData Pin(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Pool2D(String, Tensor, Int32[], Int32[], Int32[])
Declaration
protected virtual Tensor Pool2D(string kernelName, Tensor X, int[] pool, int[] stride, int[] pad)
Parameters
Returns
Pow(Tensor, Single)
Declaration
public override Tensor Pow(Tensor X, float alpha)
Parameters
Returns
Overrides
Pow(Tensor[])
Declaration
public override Tensor Pow(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Overrides
PRelu(Tensor, Tensor)
Declaration
public override Tensor PRelu(Tensor X, Tensor S)
Parameters
Returns
Overrides
Prepare(Tensor)
Declaration
public override Tensor Prepare(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
Reduce(String, Tensor, Int32)
Declaration
public virtual Tensor Reduce(string kernelName, Tensor X, int axis)
Parameters
Returns
ReduceMax(Tensor, Int32)
Declaration
public override Tensor ReduceMax(Tensor X, int axis)
Parameters
Returns
Overrides
ReduceMean(Tensor, Int32)
Declaration
public override Tensor ReduceMean(Tensor X, int axis)
Parameters
Returns
Overrides
ReduceMin(Tensor, Int32)
Declaration
public override Tensor ReduceMin(Tensor X, int axis)
Parameters
Returns
Overrides
ReduceProd(Tensor, Int32)
Declaration
public override Tensor ReduceProd(Tensor X, int axis)
Parameters
Returns
Overrides
ReduceSum(Tensor, Int32)
Declaration
public override Tensor ReduceSum(Tensor X, int axis)
Parameters
Returns
Overrides
Relu(Tensor)
Declaration
public override Tensor Relu(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
Relu6(Tensor)
Declaration
public override Tensor Relu6(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
ScaleBias(Tensor, Tensor, Tensor)
Declaration
public override Tensor ScaleBias(Tensor X, Tensor S, Tensor B)
Parameters
Returns
Overrides
Selu(Tensor, Single, Single)
Declaration
public override Tensor Selu(Tensor X, float alpha, float gamma)
Parameters
Returns
Overrides
SetTensor(ComputeFunc, String, Tensor)
Declaration
public void SetTensor(ComputeFunc fn, string name, Tensor X)
Parameters
Sigmoid(Tensor)
Declaration
public override Tensor Sigmoid(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
Softmax(Tensor)
Declaration
public override Tensor Softmax(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
Sqrt(Tensor)
Declaration
public override Tensor Sqrt(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
Sub(Tensor[])
Declaration
public override Tensor Sub(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Overrides
Swish(Tensor)
Declaration
public override Tensor Swish(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
Tanh(Tensor)
Declaration
public override Tensor Tanh(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
TensorToRenderTexture(Tensor, RenderTexture, Int32, Int32, Single, Single)
Declaration
public void TensorToRenderTexture(Tensor X, RenderTexture target, int batch = 0, int fromChannel = 0, float scale = 1F, float bias = 0F)
Parameters
TextureToTensorData(TextureAsTensorData, String)
Declaration
protected ITensorData TextureToTensorData(TextureAsTensorData texData, string name)
Parameters
Returns
Upsample2D(Tensor, Int32[])
Declaration
public override Tensor Upsample2D(Tensor X, int[] size)
Parameters
Returns
Overrides
WaitForCompletion(Tensor)
Declaration
public override void WaitForCompletion(Tensor x)
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Overrides