src/utils/sampling/SequenceSampler.java
private void addSample(Sequence input, Sequence output) throws NeuralNetworkException {
        if (input == null) throw new NeuralNetworkException("Input is not defined.");
        if (output == null) throw new NeuralNetworkException("Output is not defined.");
        if (input.totalSize() != output.totalSize()) throw new NeuralNetworkException("Input and output must be same size.");
        if (input.totalSize() == 0) throw new NeuralNetworkException("Input and output cannot be empty.");
        if (input.getDepth() != output.getDepth()) throw new NeuralNetworkException("Sample depth of input and output must match.");
        if (sampleDepth == -1) sampleDepth = input.getDepth();
        else if (sampleDepth != input.getDepth()) throw new NeuralNetworkException("All input and output samples must have same depth.");
        inputs.put(inputs.size(), input);
        outputs.put(outputs.size(), output);
    }
/**
     * Adds sample into sampler.
     *
     * @param input input sequence.
     * @param output output sequence.
     * @throws NeuralNetworkException throws exception if input or output is not defined.
     */
Adds sample into sampler.
@param input input sequence.
@param output output sequence.
@throws NeuralNetworkException throws exception if input or output is not defined.
Adds sample into sampler . @param input input sequence . @param output output sequence . @throws NeuralNetworkException throws exception if input or output is not defined .
private void addSample(Sequence input, Sequence output) throws NeuralNetworkException {
        if (input == null) throw new NeuralNetworkException("Input is not defined.");
        if (output == null) throw new NeuralNetworkException("Output is not defined.");
        if (input.totalSize() != output.totalSize()) throw new NeuralNetworkException("Input and output must be same size.");
        if (input.totalSize() == 0) throw new NeuralNetworkException("Input and output cannot be empty.");
        if (input.getDepth() != output.getDepth()) throw new NeuralNetworkException("Sample depth of input and output must match.");
        if (sampleDepth == -1) sampleDepth = input.getDepth();
        else if (sampleDepth != input.getDepth()) throw new NeuralNetworkException("All input and output samples must have same depth.");
        inputs.put(inputs.size(), input);
        outputs.put(outputs.size(), output);
    }
private void addSample ( Sequence input , Sequence output ) throws NeuralNetworkException { if ( input == null ) throw new NeuralNetworkException ( "Input is not defined." ) ; if ( output == null ) throw new NeuralNetworkException ( "Output is not defined." ) ; if ( input . totalSize ( ) != output . totalSize ( ) ) throw new NeuralNetworkException ( "Input and output must be same size." ) ; if ( input . totalSize ( ) == 0 ) throw new NeuralNetworkException ( "Input and output cannot be empty." ) ; if ( input . getDepth ( ) != output . getDepth ( ) ) throw new NeuralNetworkException ( "Sample depth of input and output must match." ) ; if ( sampleDepth == - 1 ) sampleDepth = input . getDepth ( ) ; else if ( sampleDepth != input . getDepth ( ) ) throw new NeuralNetworkException ( "All input and output samples must have same depth." ) ; inputs . put ( inputs . size ( ) , input ) ; outputs . put ( outputs . size ( ) , output ) ; }
Adds sample into sampler.
Adds sample into sampler .