Class ReferenceCPUOps
Inheritance
ReferenceCPUOps
Syntax
public class ReferenceCPUOps : IOps
Constructors
ReferenceCPUOps(ITensorAllocator)
Declaration
public ReferenceCPUOps(ITensorAllocator allocator = null)
Parameters
Methods
Abs(Tensor)
Declaration
public virtual Tensor Abs(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Add(Tensor[])
Declaration
public virtual Tensor Add(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Implements
AvgPool2D(Tensor, Int32[], Int32[], Int32[])
Declaration
public virtual Tensor AvgPool2D(Tensor X, int[] pool, int[] stride, int[] pad)
Parameters
Returns
Implements
Bernoulli(Single)
Declaration
protected float Bernoulli(float p)
Parameters
Type |
Name |
Description |
Single |
p |
|
Returns
Border2D(Tensor, Int32[], Single)
Declaration
public virtual Tensor Border2D(Tensor X, int[] pad, float value)
Parameters
Returns
Implements
Ceil(Tensor)
Declaration
public virtual Tensor Ceil(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Clip(Tensor, Single, Single)
Declaration
public virtual Tensor Clip(Tensor X, float min, float max)
Parameters
Returns
Implements
Concat(Tensor[], Int32)
Declaration
public virtual Tensor Concat(Tensor[] tensors, int axis)
Parameters
Returns
Implements
Conv2D(Tensor, Tensor, Tensor, Int32[], Int32[])
Declaration
public virtual Tensor Conv2D(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad)
Parameters
Returns
Implements
Conv2DTrans(Tensor, Tensor, Tensor, Int32[], Int32[], Int32[])
Declaration
public virtual Tensor Conv2DTrans(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad, int[] outputAdjustment)
Parameters
Returns
Implements
Copy(Tensor)
Declaration
public virtual Tensor Copy(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
CopyAndReshape(Tensor, TensorShape)
Declaration
protected virtual Tensor CopyAndReshape(Tensor X, TensorShape shape)
Parameters
Returns
Dense(Tensor, Tensor, Tensor)
Declaration
public virtual Tensor Dense(Tensor X, Tensor W, Tensor B)
Parameters
Returns
Implements
DepthwiseConv2D(Tensor, Tensor, Tensor, Int32[], Int32[])
Declaration
public virtual Tensor DepthwiseConv2D(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad)
Parameters
Returns
Implements
Div(Tensor[])
Declaration
public virtual Tensor Div(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Implements
Dropout(Tensor, Single)
Declaration
public virtual Tensor Dropout(Tensor X, float alpha)
Parameters
Returns
Implements
Elu(Tensor, Single)
Declaration
public virtual Tensor Elu(Tensor X, float alpha)
Parameters
Returns
Implements
Equal(Tensor, Tensor)
Declaration
public virtual Tensor Equal(Tensor A, Tensor B)
Parameters
Returns
Implements
Exp(Tensor)
Declaration
public virtual Tensor Exp(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Flatten(Tensor)
Declaration
public virtual Tensor Flatten(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Floor(Tensor)
Declaration
public virtual Tensor Floor(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Gather(Tensor[], Int32)
Declaration
public virtual Tensor Gather(Tensor[] tensors, int axis)
Parameters
Returns
Implements
Gaussian(Single, Single)
Declaration
protected float Gaussian(float mean, float stdDev)
Parameters
Returns
GlobalAvgPool2D(Tensor)
Declaration
public virtual Tensor GlobalAvgPool2D(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
GlobalAvgVariancePool2D(Tensor)
Declaration
public virtual Tensor GlobalAvgVariancePool2D(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
GlobalMaxPool2D(Tensor)
Declaration
public virtual Tensor GlobalMaxPool2D(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Greater(Tensor, Tensor)
Declaration
public virtual Tensor Greater(Tensor A, Tensor B)
Parameters
Returns
Implements
GreaterEqual(Tensor, Tensor)
Declaration
public virtual Tensor GreaterEqual(Tensor A, Tensor B)
Parameters
Returns
Implements
LeakyRelu(Tensor, Single)
Declaration
public virtual Tensor LeakyRelu(Tensor X, float alpha)
Parameters
Returns
Implements
Less(Tensor, Tensor)
Declaration
public virtual Tensor Less(Tensor A, Tensor B)
Parameters
Returns
Implements
LessEqual(Tensor, Tensor)
Declaration
public virtual Tensor LessEqual(Tensor A, Tensor B)
Parameters
Returns
Implements
Log(Tensor)
Declaration
public virtual Tensor Log(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
LogicalAnd(Tensor, Tensor)
Declaration
public virtual Tensor LogicalAnd(Tensor A, Tensor B)
Parameters
Returns
Implements
LogicalNot(Tensor)
Declaration
public virtual Tensor LogicalNot(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
LogicalOr(Tensor, Tensor)
Declaration
public virtual Tensor LogicalOr(Tensor A, Tensor B)
Parameters
Returns
Implements
LogicalXor(Tensor, Tensor)
Declaration
public virtual Tensor LogicalXor(Tensor A, Tensor B)
Parameters
Returns
Implements
LogSoftmax(Tensor)
Declaration
public virtual Tensor LogSoftmax(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
LRN(Tensor, Single, Single, Single, Int32)
Declaration
public virtual Tensor LRN(Tensor X, float alpha, float beta, float bias, int size)
Parameters
Returns
Implements
MatMul(Tensor, Boolean, Tensor, Boolean)
Declaration
public virtual Tensor MatMul(Tensor X, bool xTranspose, Tensor Y, bool yTranspose)
Parameters
Returns
Implements
Max(Tensor[])
Declaration
public virtual Tensor Max(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Implements
MaxPool2D(Tensor, Int32[], Int32[], Int32[])
Declaration
public virtual Tensor MaxPool2D(Tensor X, int[] pool, int[] stride, int[] pad)
Parameters
Returns
Implements
Mean(Tensor[])
Declaration
public virtual Tensor Mean(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Implements
Min(Tensor[])
Declaration
public virtual Tensor Min(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Implements
Mul(Tensor[])
Declaration
public virtual Tensor Mul(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Implements
Multinomial(Tensor, Int32, Int32)
Declaration
public virtual Tensor Multinomial(Tensor X, int count, int seed)
Parameters
Returns
Implements
Neg(Tensor)
Declaration
public virtual Tensor Neg(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
NewTensor(TensorShape, String)
Declaration
protected Tensor NewTensor(TensorShape s, string name = "")
Parameters
Returns
NewTensor(Int32, Int32, Int32, Int32, String)
Declaration
protected Tensor NewTensor(int b, int h, int w, int ch, string name = "")
Parameters
Returns
NewTensor(Int32, Int32, String)
Declaration
protected Tensor NewTensor(int b, int ch, string name = "")
Parameters
Returns
NewTensorLike(Tensor)
Declaration
protected Tensor NewTensorLike(Tensor t)
Parameters
Type |
Name |
Description |
Tensor |
t |
|
Returns
Normalization(Tensor, Tensor, Tensor, Int32, Int32, Single)
Declaration
public virtual Tensor Normalization(Tensor X, Tensor S, Tensor B, int pool, int axis, float epsilon)
Parameters
Returns
Implements
OneHot(Tensor, Int32, Single, Single)
Declaration
public virtual Tensor OneHot(Tensor X, int depth, float onValue, float offValue)
Parameters
Returns
Implements
Pad2DEdge(Tensor, Int32[])
Declaration
public virtual Tensor Pad2DEdge(Tensor X, int[] pad)
Parameters
Returns
Implements
Pad2DReflect(Tensor, Int32[])
Declaration
public virtual Tensor Pad2DReflect(Tensor X, int[] pad)
Parameters
Returns
Implements
Pad2DSymmetric(Tensor, Int32[])
Declaration
public virtual Tensor Pad2DSymmetric(Tensor X, int[] pad)
Parameters
Returns
Implements
Pow(Tensor, Single)
Declaration
public virtual Tensor Pow(Tensor X, float alpha)
Parameters
Returns
Implements
Pow(Tensor[])
Declaration
public virtual Tensor Pow(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Implements
PRelu(Tensor, Tensor)
Declaration
public virtual Tensor PRelu(Tensor X, Tensor S)
Parameters
Returns
Implements
Prepare(Tensor)
Declaration
public virtual Tensor Prepare(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
RandomNormal(TensorShape, Single, Single, Int32)
Declaration
public virtual Tensor RandomNormal(TensorShape s, float mean, float scale, int seed)
Parameters
Returns
Implements
Declaration
public virtual Tensor RandomUniform(TensorShape s, float mean, float scale, int seed)
Parameters
Returns
Implements
Reciprocal(Tensor)
Declaration
public virtual Tensor Reciprocal(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
ReduceMax(Tensor, Int32)
Declaration
public virtual Tensor ReduceMax(Tensor X, int axis)
Parameters
Returns
Implements
ReduceMean(Tensor, Int32)
Declaration
public virtual Tensor ReduceMean(Tensor X, int axis)
Parameters
Returns
Implements
ReduceMin(Tensor, Int32)
Declaration
public virtual Tensor ReduceMin(Tensor X, int axis)
Parameters
Returns
Implements
ReduceProd(Tensor, Int32)
Declaration
public virtual Tensor ReduceProd(Tensor X, int axis)
Parameters
Returns
Implements
ReduceSum(Tensor, Int32)
Declaration
public virtual Tensor ReduceSum(Tensor X, int axis)
Parameters
Returns
Implements
Relu(Tensor)
Declaration
public virtual Tensor Relu(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Relu6(Tensor)
Declaration
public virtual Tensor Relu6(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
ResetAllocator(Boolean)
Declaration
public virtual void ResetAllocator(bool keepCachedMemory = true)
Parameters
Type |
Name |
Description |
Boolean |
keepCachedMemory |
|
Implements
Reshape(Tensor, TensorShape)
Declaration
public virtual Tensor Reshape(Tensor X, TensorShape newShape)
Parameters
Returns
Implements
ScaleBias(Tensor, Tensor, Tensor)
Declaration
public virtual Tensor ScaleBias(Tensor X, Tensor S, Tensor B)
Parameters
Returns
Implements
Selu(Tensor, Single, Single)
Declaration
public virtual Tensor Selu(Tensor X, float alpha, float gamma)
Parameters
Returns
Implements
Sigmoid(Tensor)
Declaration
public virtual Tensor Sigmoid(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Softmax(Tensor)
Declaration
public virtual Tensor Softmax(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Sqrt(Tensor)
Declaration
public virtual Tensor Sqrt(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
StridedSlice(Tensor, Int32[], Int32[], Int32[])
Declaration
public virtual Tensor StridedSlice(Tensor X, int[] starts, int[] ends, int[] stride)
Parameters
Returns
Implements
Sub(Tensor[])
Declaration
public virtual Tensor Sub(Tensor[] tensors)
Parameters
Type |
Name |
Description |
Tensor[] |
tensors |
|
Returns
Implements
Swish(Tensor)
Declaration
public virtual Tensor Swish(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Tanh(Tensor)
Declaration
public virtual Tensor Tanh(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Tile(Tensor, Int32[])
Declaration
public virtual Tensor Tile(Tensor X, int[] repeats)
Parameters
Returns
Implements
Transpose(Tensor)
Declaration
public virtual Tensor Transpose(Tensor X)
Parameters
Type |
Name |
Description |
Tensor |
X |
|
Returns
Implements
Upsample2D(Tensor, Int32[])
Declaration
public virtual Tensor Upsample2D(Tensor X, int[] size)
Parameters
Returns
Implements
WaitForCompletion(Tensor)
Declaration
public virtual void WaitForCompletion(Tensor x)
Parameters
Type |
Name |
Description |
Tensor |
x |
|
Implements