示例#1
0
    protected void OnButtonClassifyClicked(object sender, EventArgs e)
    {
        // Classify image
        Digit.GetFromDrawable(DigitBox.GdkWindow, Rgb.Colormap, 0, 0, 0, 0, Digit.Width, Digit.Height);
        Classify.Pixbuf(Digit, cnn, ref Classification, ref Probability);

        CopyClassification();

        if (IsActivated)
        {
            var layer = NetworkLayers.Active;
            var map   = Convert.ToInt32(ActivationMapScroll.Value);

            if (layer >= 0 && layer < cnn.Layers.Count && map >= 0 && map < cnn.Layers[layer].Activation.i)
            {
                DrawActivationMap(layer, map);

                FeatureMapEvent(layer);
            }
        }

        IsActivated = true;

        NetworkLayers.Sensitive = true;

        DrawFullyConnectedLayers();
    }