메소드 | 설명 | |
---|---|---|
Create ( uint kernelWidth, uint kernelHeight, uint inputFeatureChannels, uint outputFeatureChannels, MPSCnnNeuron neuronFilter, IMTLDevice device, string kernelParamsBinaryName, bool padding, uint strideX, uint strideY, uint destinationFeatureChannelOffset, uint groupNum ) : |
Initializes a fully connected kernel. Returns: A valid SlimMPSCnnConvolution object or null, if failure.
|
|
EncodeToCommandBuffer ( IMTLCommandBuffer commandBuffer, MPSImage sourceImage, MPSImage destinationImage ) : void |
Encode a MPSCnnKernel into a command Buffer. The operation shall proceed out-of-place. We calculate the appropriate offset as per how TensorFlow calculates its padding using input image size and stride here. This [Link](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/ops/nn.py) has an explanation in header comments how tensorFlow pads its convolution input images.
|
메소드 | 설명 | |
---|---|---|
IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr_UInt64 ( |
||
SlimMPSCnnConvolution ( IMTLDevice device, MPSCnnConvolutionDescriptor convolutionDescriptor, |
public static Create ( uint kernelWidth, uint kernelHeight, uint inputFeatureChannels, uint outputFeatureChannels, MPSCnnNeuron neuronFilter, IMTLDevice device, string kernelParamsBinaryName, bool padding, uint strideX, uint strideY, uint destinationFeatureChannelOffset, uint groupNum ) : |
||
kernelWidth | uint | Kernel Width |
kernelHeight | uint | Kernel Height |
inputFeatureChannels | uint | Number feature channels in input of this layer |
outputFeatureChannels | uint | Number feature channels from output of this layer |
neuronFilter | MPSCnnNeuron | A neuronFilter to add at the end as activation (could be null) |
device | IMTLDevice | The IMTLDevice on which this SlimMPSCnnConvolution filter will be used |
kernelParamsBinaryName | string | name of the layer to fetch kernelParameters by adding a prefix "weights_" or "bias_" |
padding | bool | Bool value whether to use padding or not |
strideX | uint | Stride of the filter |
strideY | uint | Stride of the filter |
destinationFeatureChannelOffset | uint | FeatureChannel no. in the destination MPSImage to start writing from, helps with concat operations |
groupNum | uint | if grouping is used, default value is 1 meaning no groups |
리턴 |
public EncodeToCommandBuffer ( IMTLCommandBuffer commandBuffer, MPSImage sourceImage, MPSImage destinationImage ) : void | ||
commandBuffer | IMTLCommandBuffer | A valid MTLCommandBuffer to receive the encoded filter |
sourceImage | MPSImage | A valid MPSImage object containing the source image. |
destinationImage | MPSImage | A valid MPSImage to be overwritten by result image. destinationImage may not alias sourceImage |
리턴 | void |