src/core/network/NeuralNetwork.java
public void run() {
        while (true) {
            executeLock.lock();
            if (executionState == ExecutionState.IDLE) executeLockCondition.awaitUninterruptibly();
            try {
                switch (executionState) {
                    case TRAIN -> trainIterations();
                    case PREDICT -> predictInput();
                    case VALIDATE -> validateInput(true);
                    case TERMINATED -> {
                        getInputLayer().stop();
                        neuralNetworkThread = null;
                        completeLockCondition.signal();
                        executeLock.unlock();
                        return;
                    }
                }
            }
            catch (Exception exception) {
                exception.printStackTrace();
                System.exit(-1);
            }
            executeLock.unlock();
        }
    }
/**
     * Thread run function.<br>
     * Executes given neural network procedures and synchronizes their execution via neural network thread execution lock.<br>
     *
     */
Thread run function.
Executes given neural network procedures and synchronizes their execution via neural network thread execution lock.
Thread run function . Executes given neural network procedures and synchronizes their execution via neural network thread execution lock .
public void run() {
        while (true) {
            executeLock.lock();
            if (executionState == ExecutionState.IDLE) executeLockCondition.awaitUninterruptibly();
            try {
                switch (executionState) {
                    case TRAIN -> trainIterations();
                    case PREDICT -> predictInput();
                    case VALIDATE -> validateInput(true);
                    case TERMINATED -> {
                        getInputLayer().stop();
                        neuralNetworkThread = null;
                        completeLockCondition.signal();
                        executeLock.unlock();
                        return;
                    }
                }
            }
            catch (Exception exception) {
                exception.printStackTrace();
                System.exit(-1);
            }
            executeLock.unlock();
        }
    }
public void run ( ) { while ( true ) { executeLock . lock ( ) ; if ( executionState == ExecutionState . IDLE ) executeLockCondition . awaitUninterruptibly ( ) ; try { switch ( executionState ) { case TRAIN -> trainIterations ( ) ; case PREDICT -> predictInput ( ) ; case VALIDATE -> validateInput ( true ) ; case TERMINATED -> { getInputLayer ( ) . stop ( ) ; neuralNetworkThread = null ; completeLockCondition . signal ( ) ; executeLock . unlock ( ) ; return ; } } } catch ( Exception exception ) { exception . printStackTrace ( ) ; System . exit ( - 1 ) ; } executeLock . unlock ( ) ; } }
Thread run function.<br>
 Executes given neural network procedures and synchronizes their execution via neural network thread execution lock.<br>
Thread run function . <br > Executes given neural network procedures and synchronizes their execution via neural network thread execution lock . <br >