C# Class DigitDetection.MnistFullLayerNeuralNetwork

Mostrar archivo Open project: xamarin/monotouch-samples Class Usage Examples

Protected Properties

Property Type Description
commandQueue IMTLCommandQueue
dstImage MPSImage
softmax MPSCnnSoftMax

Public Methods

Method Description
Forward ( MPSImage inputImage = null, int imageNum = 9999, int correctLabel = 10 ) : uint

This function encodes all the layers of the network into given commandBuffer, it calls subroutines for each piece of the network Returns: Guess of the network as to what the digit is as UInt

GetLabel ( MPSImage finalLayer ) : uint

This function reads the output probabilities from finalLayer to CPU, sorts them and gets the label with heighest probability

MnistFullLayerNeuralNetwork ( IMTLCommandQueue commandQueueIn ) : System
Planar16FtoPlanarF ( vImageBuffer &src, vImageBuffer &dest, vImageFlags flags ) : vImageError

Private Methods

Method Description
vImageConvert_Planar16FtoPlanarF ( vImageBuffer &src, vImageBuffer &dest, vImageFlags flags ) : nint

Method Details

Forward() public method

This function encodes all the layers of the network into given commandBuffer, it calls subroutines for each piece of the network Returns: Guess of the network as to what the digit is as UInt
public Forward ( MPSImage inputImage = null, int imageNum = 9999, int correctLabel = 10 ) : uint
inputImage MPSImage Image coming in on which the network will run
imageNum int If the test set is being used we will get a value between 0 and 9999 for which of the 10,000 images is being evaluated
correctLabel int The correct label for the inputImage while testing
return uint

GetLabel() public method

This function reads the output probabilities from finalLayer to CPU, sorts them and gets the label with heighest probability
public GetLabel ( MPSImage finalLayer ) : uint
finalLayer MPSImage output image of the network this has probabilities of each digit
return uint

MnistFullLayerNeuralNetwork() public method

public MnistFullLayerNeuralNetwork ( IMTLCommandQueue commandQueueIn ) : System
commandQueueIn IMTLCommandQueue
return System

Planar16FtoPlanarF() public static method

public static Planar16FtoPlanarF ( vImageBuffer &src, vImageBuffer &dest, vImageFlags flags ) : vImageError
src vImageBuffer
dest vImageBuffer
flags vImageFlags
return vImageError

Property Details

commandQueue protected_oe property

protected IMTLCommandQueue commandQueue
return IMTLCommandQueue

dstImage protected_oe property

protected MPSImage dstImage
return MPSImage

softmax protected_oe property

protected MPSCnnSoftMax softmax
return MPSCnnSoftMax