Class PrecompiledComputeOps
Inheritance
PrecompiledComputeOps
Syntax
public class PrecompiledComputeOps : ComputeOps, IOps, IModelCompiler
Constructors
PrecompiledComputeOps(ComputeShader[], ComputeShader, ITensorAllocator, Boolean)
Declaration
public PrecompiledComputeOps(ComputeShader[] kernels, ComputeShader referenceKernel, ITensorAllocator allocator = null, bool verbose = false)
Parameters
Type |
Name |
Description |
ComputeShader[] |
kernels |
|
ComputeShader |
referenceKernel |
|
ITensorAllocator |
allocator |
|
Boolean |
verbose |
|
Fields
_Alpha
Declaration
Field Value
_Beta
Declaration
Field Value
_DataB
Declaration
Field Value
_DataK
Declaration
Field Value
_DataO
Declaration
Field Value
_DataW
Declaration
Field Value
_DataWBK
Declaration
public static int _DataWBK
Field Value
_DataX
Declaration
Field Value
_DeclB
Declaration
public static ComputeFunc.TensorDecl _DeclB
Field Value
_DeclK
Declaration
public static ComputeFunc.TensorDecl _DeclK
Field Value
_DeclO
Declaration
public static ComputeFunc.TensorDecl _DeclO
Field Value
_DeclW
Declaration
public static ComputeFunc.TensorDecl _DeclW
Field Value
_DeclX
Declaration
public static ComputeFunc.TensorDecl _DeclX
Field Value
_Pad
Declaration
Field Value
_Pool
Declaration
Field Value
_Stride
Declaration
public static int _Stride
Field Value
Methods
Activation(String, Tensor, Single, Single)
Declaration
protected override Tensor Activation(string kernelName, Tensor X, float alpha = 0F, float beta = 0F)
Parameters
Returns
Overrides
Declaration
protected int CalcModelWithInputsHashCode(Model model, IDictionary<string, TensorShape> inputShapes)
Parameters
Returns
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
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
LogSoftmax(Tensor)
Declaration
public override Tensor LogSoftmax(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
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
PreExecuteLayer(Layer, Tensor[])
Declaration
public virtual void PreExecuteLayer(Layer layer, Tensor[] inputs)
Parameters
Implements
PRelu(Tensor, Tensor)
Declaration
public override Tensor PRelu(Tensor X, Tensor S)
Parameters
Returns
Overrides
PrepareModel(Model, IDictionary<String, TensorShape>)
Declaration
public virtual void PrepareModel(Model model, IDictionary<string, TensorShape> inputShapes)
Parameters
Implements
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