public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        NeuralBrain brain = (NeuralBrain)target;

        if (!init)
        {
            if (GUILayout.Button("Initiallize"))
            {
                init = brain.Initiallize(0);
            }
        }

        if (init)
        {
            if (GUILayout.Button("Train network"))
            {
                brain.StartTrainingThread();
            }
        }

        if (GUILayout.Button("Reset"))
        {
            brain.Reset();
            init = false;
        }
    }
Example #2
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        NeuralBrain brain = (NeuralBrain)target;

        if (!init)
        {
            if (GUILayout.Button("Initiallize"))
            {
                init = brain.Initiallize(0);
            }
        }

        if (init)
        {
            if (GUILayout.Button("Train network"))
            {
                brain.StartTrainingThread();
            }
        }

        if (brain.trained)
        {
            if (GUILayout.Button("Predict random from training set"))
            {
                brain.PredictRandomFromTrainingSet();
            }
        }

        if (brain.trained)
        {
            if (GUILayout.Button("Predict all from training set"))
            {
                brain.PredictFromTrainingSet();
            }
        }

        if (brain.trained)
        {
            if (GUILayout.Button("Predict all from test set"))
            {
                brain.PredictFromTestSet();
            }
        }

        if (GUILayout.Button("Reset"))
        {
            brain.Reset();
            init = false;
        }
    }