Class ComputeOps
Syntax
public class ComputeOps : ReferenceComputeOps, IOps
Constructors
ComputeOps(ComputeShader[], ComputeShader, ITensorAllocator, Boolean)
Declaration
public ComputeOps(ComputeShader[] kernels, ComputeShader referenceKernel, ITensorAllocator allocator = null, bool verbose = false)
Parameters
Type |
Name |
Description |
ComputeShader[] |
kernels |
|
ComputeShader |
referenceKernel |
|
ITensorAllocator |
allocator |
|
Boolean |
verbose |
|
Methods
Activation(String, Tensor, Single, Single)
Declaration
protected override Tensor Activation(string kernelName, Tensor X, float alpha = 0F, float beta = 0F)
Parameters
Returns
Overrides
ApplyPadding(Tensor, Int32[], String, Single)
Declaration
protected override Tensor ApplyPadding(Tensor X, int[] pad, string kernelName, float constant = 0F)
Parameters
Returns
Overrides
BestKernel(ComputeKernelLibrary.Entry[])
Declaration
protected ComputeKernel BestKernel(ComputeKernelLibrary.Entry[] entrees)
Parameters
Returns
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
ElementwiseWithBroadcast(String, Tensor[])
Declaration
public override Tensor ElementwiseWithBroadcast(string kernelName, Tensor[] tensors)
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, String, Tensor)
Declaration
protected virtual Tensor GlobalPool2D(string smallKernelName, string globalKernelName, Tensor X)
Parameters
Returns
LogicalNot(Tensor)
Declaration
public override Tensor LogicalNot(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
LogSoftmax(Tensor)
Declaration
public override Tensor LogSoftmax(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
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
Pool2D(String, Tensor, Int32[], Int32[], Int32[])
Declaration
protected override Tensor Pool2D(string kernelName, Tensor X, int[] pool, int[] stride, int[] pad)
Parameters
Returns
Overrides
PRelu(Tensor, Tensor)
Declaration
public override Tensor PRelu(Tensor X, Tensor S)
Parameters
Returns
Overrides
RandomNormal(TensorShape, Single, Single, Int32)
Declaration
public override Tensor RandomNormal(TensorShape s, float mean, float scale, int seed)
Parameters
Returns
Overrides
Declaration
public override Tensor RandomUniform(TensorShape s, float mean, float scale, int seed)
Parameters
Returns
Overrides
ScaleBias(Tensor, Tensor, Tensor)
Declaration
public override Tensor ScaleBias(Tensor X, Tensor S, Tensor B)
Parameters
Returns
Overrides
Softmax(Tensor)
Declaration
public override Tensor Softmax(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Overrides
Upsample2D(Tensor, Int32[])
Declaration
public override Tensor Upsample2D(Tensor X, int[] size)
Parameters
Returns
Overrides