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
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.