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
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
Concat(Tensor[], Int32)
Declaration
public override Tensor Concat(Tensor[] tensors, int axis)
Parameters
Returns
Overrides
Conv2D(Tensor, Tensor, Tensor, Int32[], Int32[], Layer.FusedActivation)
Declaration
public override Tensor Conv2D(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
Parameters
Returns
Overrides
Conv2DTrans(Tensor, Tensor, Tensor, Int32[], Int32[], Int32[], Layer.FusedActivation)
Declaration
public override Tensor Conv2DTrans(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad, int[] outputAdjustment, Layer.FusedActivation fusedActivation)
Parameters
Returns
Overrides
Dense(Tensor, Tensor, Tensor, Layer.FusedActivation)
Declaration
public override Tensor Dense(Tensor X, Tensor W, Tensor B, Layer.FusedActivation fusedActivation)
Parameters
Returns
Overrides
DepthwiseConv2D(Tensor, Tensor, Tensor, Int32[], Int32[], Layer.FusedActivation)
Declaration
public override Tensor DepthwiseConv2D(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
Parameters
Returns
Overrides
ElementwiseWithBroadcast(String, Tensor[])
Declaration
protected 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
GlobalMaxPool2D(Tensor)
Declaration
public override Tensor GlobalMaxPool2D(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, Layer.FusedActivation)
Declaration
public override Tensor Normalization(Tensor X, Tensor S, Tensor B, int pool, int axis, float epsilon, Layer.FusedActivation fusedActivation)
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
PreExecuteLayer(Layer, Tensor[])
Declaration
public virtual void PreExecuteLayer(Layer layer, Tensor[] inputs)
Parameters
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
ResetAllocator(Boolean)
Declaration
public override void ResetAllocator(bool keepCachedMemory = true)
Parameters
Type |
Name |
Description |
Boolean |
keepCachedMemory |
|
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[], Boolean)
Declaration
public override Tensor Upsample2D(Tensor X, int[] scale, bool bilinear)
Parameters
Returns
Overrides