public MnistFullLayerNeuralNetwork(IMTLCommandQueue commandQueueIn) { // CommandQueue to be kept around commandQueue = commandQueueIn; device = commandQueueIn.Device; // Initialize MPSImage from descriptors SrcImage = new MPSImage(device, SID); dstImage = new MPSImage(device, DID); // setup convolution layer (which is a fully-connected layer) // cliprect, offset is automatically set layer = SlimMPSCnnFullyConnected.Create(kernelWidth: 28, kernelHeight: 28, inputFeatureChannels: 1, outputFeatureChannels: 10, neuronFilter: null, device: device, kernelParamsBinaryName: "NN"); // prepare softmax layer to be applied at the end to get a clear label softmax = new MPSCnnSoftMax(device); }
public MnistFullLayerNeuralNetwork (IMTLCommandQueue commandQueueIn) { // CommandQueue to be kept around commandQueue = commandQueueIn; device = commandQueueIn.Device; // Initialize MPSImage from descriptors SrcImage = new MPSImage (device, SID); dstImage = new MPSImage (device, DID); // setup convolution layer (which is a fully-connected layer) // cliprect, offset is automatically set layer = SlimMPSCnnFullyConnected.Create (kernelWidth: 28, kernelHeight: 28, inputFeatureChannels: 1, outputFeatureChannels: 10, neuronFilter: null, device: device, kernelParamsBinaryName: "NN"); // prepare softmax layer to be applied at the end to get a clear label softmax = new MPSCnnSoftMax (device); }