src/core/network/NeuralNetwork.java
public void addOutputLayer(BinaryFunctionType[] lossFunctionTypes, String[] params) throws NeuralNetworkException, DynamicParamException, MatrixException {
        checkStarted();
        ArrayList<LossFunction> lossFunctions = new ArrayList<>();
        int lossFunctionTypesLength = lossFunctionTypes.length;
        for (int index = 0; index < lossFunctionTypesLength; index++) {
            lossFunctions.add(params != null ? new LossFunction(lossFunctionTypes[index], params[index]) : new LossFunction(lossFunctionTypes[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(BinaryFunctionType[] lossFunctionTypes, String[] params) throws NeuralNetworkException, DynamicParamException, MatrixException {
        checkStarted();
        ArrayList<LossFunction> lossFunctions = new ArrayList<>();
        int lossFunctionTypesLength = lossFunctionTypes.length;
        for (int index = 0; index < lossFunctionTypesLength; index++) {
            lossFunctions.add(params != null ? new LossFunction(lossFunctionTypes[index], params[index]) : new LossFunction(lossFunctionTypes[index]));
        }
        outputLayer = new OutputLayer(-1, lossFunctions);
    }
public void addOutputLayer ( BinaryFunctionType [ ] lossFunctionTypes , String [ ] params ) throws NeuralNetworkException , DynamicParamException , MatrixException { checkStarted ( ) ; ArrayList < LossFunction > lossFunctions = new ArrayList < > ( ) ; int lossFunctionTypesLength = lossFunctionTypes . length ; for ( int index = 0 ; index < lossFunctionTypesLength ; index ++ ) { lossFunctions . add ( params != null ? new LossFunction ( lossFunctionTypes [ index ] , params [ index ] ) : new LossFunction ( lossFunctionTypes [ index ] ) ) ; } outputLayer = new OutputLayer ( - 1 , lossFunctions ) ; }
Adds output layer to neural network.
Adds output layer to neural network .