Exemplo n.º 1
0
		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;
		}
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
		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;
		}
Exemplo n.º 4
0
        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;
        }