C# Класс DigitDetection.MnistFullLayerNeuralNetwork

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
commandQueue IMTLCommandQueue
dstImage MPSImage
softmax MPSCnnSoftMax

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
vImageConvert_Planar16FtoPlanarF ( vImageBuffer &src, vImageBuffer &dest, vImageFlags flags ) : nint

Описание методов

Forward() публичный Метод

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
Результат uint

GetLabel() публичный Метод

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
Результат uint

MnistFullLayerNeuralNetwork() публичный Метод

public MnistFullLayerNeuralNetwork ( IMTLCommandQueue commandQueueIn ) : System
commandQueueIn IMTLCommandQueue
Результат System

Planar16FtoPlanarF() публичный статический Метод

public static Planar16FtoPlanarF ( vImageBuffer &src, vImageBuffer &dest, vImageFlags flags ) : vImageError
src vImageBuffer
dest vImageBuffer
flags vImageFlags
Результат vImageError

Описание свойств

commandQueue защищенное свойство

protected IMTLCommandQueue commandQueue
Результат IMTLCommandQueue

dstImage защищенное свойство

protected MPSImage dstImage
Результат MPSImage

softmax защищенное свойство

protected MPSCnnSoftMax softmax
Результат MPSCnnSoftMax