src/core/network/NeuralNetwork.java
public void addOutputLayer(ArrayList<BinaryFunctionType> lossFunctionTypes, ArrayList<String> params) throws NeuralNetworkException, DynamicParamException, MatrixException {
        checkStarted();
        ArrayList<LossFunction> lossFunctions = new ArrayList<>();
        int lossFunctionTypesSize = lossFunctionTypes.size();
        for (int index = 0; index < lossFunctionTypesSize; index++) {
            lossFunctions.add(params != null ? new LossFunction(lossFunctionTypes.get(index), params.get(index)) : new LossFunction(lossFunctionTypes.get(index)));
        }
        outputLayer = new OutputLayer(-1, lossFunctions);
    }
/**
     * Adds output layer to neural network.
     *
     * @param lossFunctionTypes loss function types for output layer.
     * @param params parameters for loss function.
     * @throws NeuralNetworkException throws neural network exception if adding of output layer fails.
     * @throws DynamicParamException throws exception if parameter (params) setting fails.
     * @throws MatrixException throws exception if custom function is attempted to be created with this constructor.
     */
Adds output layer to neural network.
@param lossFunctionTypes loss function types for output layer.
@param params parameters for loss function.
@throws NeuralNetworkException throws neural network exception if adding of output layer fails.
@throws DynamicParamException throws exception if parameter (params) setting fails.
@throws MatrixException throws exception if custom function is attempted to be created with this constructor.
Adds output layer to neural network . @param lossFunctionTypes loss function types for output layer . @param params parameters for loss function . @throws NeuralNetworkException throws neural network exception if adding of output layer fails . @throws DynamicParamException throws exception if parameter ( params ) setting fails . @throws MatrixException throws exception if custom function is attempted to be created with this constructor .
public void addOutputLayer(ArrayList<BinaryFunctionType> lossFunctionTypes, ArrayList<String> params) throws NeuralNetworkException, DynamicParamException, MatrixException {
        checkStarted();
        ArrayList<LossFunction> lossFunctions = new ArrayList<>();
        int lossFunctionTypesSize = lossFunctionTypes.size();
        for (int index = 0; index < lossFunctionTypesSize; index++) {
            lossFunctions.add(params != null ? new LossFunction(lossFunctionTypes.get(index), params.get(index)) : new LossFunction(lossFunctionTypes.get(index)));
        }
        outputLayer = new OutputLayer(-1, lossFunctions);
    }
public void addOutputLayer ( ArrayList < BinaryFunctionType > lossFunctionTypes , ArrayList < String > params ) throws NeuralNetworkException , DynamicParamException , MatrixException { checkStarted ( ) ; ArrayList < LossFunction > lossFunctions = new ArrayList < > ( ) ; int lossFunctionTypesSize = lossFunctionTypes . size ( ) ; for ( int index = 0 ; index < lossFunctionTypesSize ; index ++ ) { lossFunctions . add ( params != null ? new LossFunction ( lossFunctionTypes . get ( index ) , params . get ( index ) ) : new LossFunction ( lossFunctionTypes . get ( index ) ) ) ; } outputLayer = new OutputLayer ( - 1 , lossFunctions ) ; }
Adds output layer to neural network.
Adds output layer to neural network .