partial void TappedDeepButton (UIButton sender) { // switch network to be used between the deep and the single layered if (deep) { sender.SetTitle ("Use Deep Net", UIControlState.Normal); runningNet = neuralNetwork; } else { sender.SetTitle ("Use Single Layer", UIControlState.Normal); runningNet = neuralNetworkDeep; } deep = !deep; }
partial void TappedDeepButton(UIButton sender) { // switch network to be used between the deep and the single layered if (deep) { sender.SetTitle("Use Deep Net", UIControlState.Normal); runningNet = neuralNetwork; } else { sender.SetTitle("Use Single Layer", UIControlState.Normal); runningNet = neuralNetworkDeep; } deep = !deep; }
public override void ViewDidLoad () { base.ViewDidLoad (); // Load default device. device = MTLDevice.SystemDefault; // Make sure the current device supports MetalPerformanceShaders. if (!MPSKernel.Supports (device)) { Console.WriteLine ("Metal Performance Shaders not Supported on current Device"); return; } // Create new command queue. commandQueue = device.CreateCommandQueue (); // initialize the networks we shall use to detect digits neuralNetwork = new MnistFullLayerNeuralNetwork (commandQueue); neuralNetworkDeep = new MnistDeepConvNeuralNetwork (commandQueue); runningNet = neuralNetwork; }
public override void ViewDidLoad() { base.ViewDidLoad(); // Load default device. device = MTLDevice.SystemDefault; // Make sure the current device supports MetalPerformanceShaders. if (!MPSKernel.Supports(device)) { Console.WriteLine("Metal Performance Shaders not Supported on current Device"); return; } // Create new command queue. commandQueue = device.CreateCommandQueue(); // initialize the networks we shall use to detect digits neuralNetwork = new MnistFullLayerNeuralNetwork(commandQueue); neuralNetworkDeep = new MnistDeepConvNeuralNetwork(commandQueue); runningNet = neuralNetwork; }