src/core/network/Persistence.java
public static NeuralNetwork restoreNeuralNetwork(String filename) throws IOException, ClassNotFoundException {
        FileInputStream fileInputStream = new FileInputStream(filename + ".ser");
        ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);
        NeuralNetwork neuralNetwork = (NeuralNetwork)objectInputStream.readObject();
        objectInputStream.close();
        return neuralNetwork;
    }
/**
     * Restores neural network from file.
     *
     * @param filename file name from which persistent neural network data is restored from.
     * @return de-serialized neural network instance.
     * @throws IOException throws exception if deserialization of neural network object from file fails.
     * @throws ClassNotFoundException throws exception if instantiation of neural network from serialized object stream fails.
     */
Restores neural network from file.
@param filename file name from which persistent neural network data is restored from.
@return de-serialized neural network instance.
@throws IOException throws exception if deserialization of neural network object from file fails.
@throws ClassNotFoundException throws exception if instantiation of neural network from serialized object stream fails.
Restores neural network from file . @param filename file name from which persistent neural network data is restored from . @return de - serialized neural network instance . @throws IOException throws exception if deserialization of neural network object from file fails . @throws ClassNotFoundException throws exception if instantiation of neural network from serialized object stream fails .
public static NeuralNetwork restoreNeuralNetwork(String filename) throws IOException, ClassNotFoundException {
        FileInputStream fileInputStream = new FileInputStream(filename + ".ser");
        ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);
        NeuralNetwork neuralNetwork = (NeuralNetwork)objectInputStream.readObject();
        objectInputStream.close();
        return neuralNetwork;
    }
public static NeuralNetwork restoreNeuralNetwork ( String filename ) throws IOException , ClassNotFoundException { FileInputStream fileInputStream = new FileInputStream ( filename + ".ser" ) ; ObjectInputStream objectInputStream = new ObjectInputStream ( fileInputStream ) ; NeuralNetwork neuralNetwork = ( NeuralNetwork ) objectInputStream . readObject ( ) ; objectInputStream . close ( ) ; return neuralNetwork ; }
Restores neural network from file.
Restores neural network from file .