src/core/layer/LayerFactory.java
public static AbstractExecutionLayer create(int layerIndex, LayerType layerType, ActivationFunction activationFunction, Initialization initialization, String params) throws DynamicParamException, NeuralNetworkException, MatrixException {
        return switch (layerType) {
            case FEEDFORWARD -> new FeedforwardLayer(layerIndex, activationFunction, initialization, params);
            case RECURRENT -> new RecurrentLayer(layerIndex, activationFunction, initialization, params);
            case LSTM -> new LSTMLayer(layerIndex, activationFunction, initialization, params);
            case PEEPHOLELSTM -> new PeepholeLSTMLayer(layerIndex, activationFunction, initialization, params);
            case GRAVESLSTM -> new GravesLSTMLayer(layerIndex, activationFunction, initialization, params);
            case GRU -> new GRULayer(layerIndex, initialization, params);
            case MINGRU -> new MinGRULayer(layerIndex, initialization, params);
            case BIRECURRENT -> new BiRecurrentLayer(layerIndex, activationFunction, initialization, params);
            case BILSTM -> new BiLSTMLayer(layerIndex, activationFunction, initialization, params);
            case BIPEEPHOLELSTM -> new BiPeepholeLSTMLayer(layerIndex, activationFunction, initialization, params);
            case BIGRAVESLSTM -> new BiGravesLSTMLayer(layerIndex, activationFunction, initialization, params);
            case BIGRU -> new BiGRULayer(layerIndex, initialization, params);
            case BIMINGRU -> new BiMinGRULayer(layerIndex, initialization, params);
            case CONVOLUTION -> new ConvolutionLayer(layerIndex, activationFunction, initialization, params);
            case CROSSCORRELATION -> new CrosscorrelationLayer(layerIndex, activationFunction, initialization, params);
            case WINOGRAD_CONVOLUTION -> new WinogradConvolutionLayer(layerIndex, activationFunction, initialization, params);
            case MAX_POOLING -> new MaxPoolingLayer(layerIndex, initialization, params);
            case RANDOM_POOLING -> new RandomPoolingLayer(layerIndex, initialization, params);
            case CYCLIC_POOLING -> new CyclicPoolingLayer(layerIndex, initialization, params);
            case AVERAGE_POOLING -> new AveragePoolingLayer(layerIndex, initialization, params);
            case BATCH_NORMALIZATION -> new BatchNormalization(layerIndex, initialization, params);
            case LAYER_NORMALIZATION -> new LayerNormalization(layerIndex, initialization, params);
            case WEIGHT_NORMALIZATION -> new WeightNormalization(layerIndex, initialization, params);
            case DROPOUT -> new Dropout(layerIndex, initialization, params);
            case GRADIENT_CLIPPING -> new GradientClipping(layerIndex, initialization, params);
            case L1_REGULARIZATION -> new L1_Regularization(layerIndex, initialization, params);
            case L2_REGULARIZATION -> new L2_Regularization(layerIndex, initialization, params);
            case Lp_REGULARIZATION -> new Lp_Regularization(layerIndex, initialization, params);
            case WEIGHT_NOISING -> new WeightNoising(layerIndex, initialization, params);
        };
    }
/**
     * Creates neural network execution layer.
     *
     * @param layerIndex layer Index.
     * @param layerType type of layer.
     * @param activationFunction activation function for layer.
     * @param initialization initialization function for layer.
     * @param params parameters for layer.
     * @return created neural network layer instance
     * @throws DynamicParamException throws exception if parameter (params) setting fails.
     * @throws NeuralNetworkException throws exception setting of activation function fails.
     * @throws MatrixException throws exception if custom function is attempted to be created with this constructor.
     */
Creates neural network execution layer.
@param layerIndex layer Index.
@param layerType type of layer.
@param activationFunction activation function for layer.
@param initialization initialization function for layer.
@param params parameters for layer.
@return created neural network layer instance
@throws DynamicParamException throws exception if parameter (params) setting fails.
@throws NeuralNetworkException throws exception setting of activation function fails.
@throws MatrixException throws exception if custom function is attempted to be created with this constructor.
Creates neural network execution layer . @param layerIndex layer Index . @param layerType type of layer . @param activationFunction activation function for layer . @param initialization initialization function for layer . @param params parameters for layer . @return created neural network layer instance @throws DynamicParamException throws exception if parameter ( params ) setting fails . @throws NeuralNetworkException throws exception setting of activation function fails . @throws MatrixException throws exception if custom function is attempted to be created with this constructor .
public static AbstractExecutionLayer create(int layerIndex, LayerType layerType, ActivationFunction activationFunction, Initialization initialization, String params) throws DynamicParamException, NeuralNetworkException, MatrixException {
        return switch (layerType) {
            case FEEDFORWARD -> new FeedforwardLayer(layerIndex, activationFunction, initialization, params);
            case RECURRENT -> new RecurrentLayer(layerIndex, activationFunction, initialization, params);
            case LSTM -> new LSTMLayer(layerIndex, activationFunction, initialization, params);
            case PEEPHOLELSTM -> new PeepholeLSTMLayer(layerIndex, activationFunction, initialization, params);
            case GRAVESLSTM -> new GravesLSTMLayer(layerIndex, activationFunction, initialization, params);
            case GRU -> new GRULayer(layerIndex, initialization, params);
            case MINGRU -> new MinGRULayer(layerIndex, initialization, params);
            case BIRECURRENT -> new BiRecurrentLayer(layerIndex, activationFunction, initialization, params);
            case BILSTM -> new BiLSTMLayer(layerIndex, activationFunction, initialization, params);
            case BIPEEPHOLELSTM -> new BiPeepholeLSTMLayer(layerIndex, activationFunction, initialization, params);
            case BIGRAVESLSTM -> new BiGravesLSTMLayer(layerIndex, activationFunction, initialization, params);
            case BIGRU -> new BiGRULayer(layerIndex, initialization, params);
            case BIMINGRU -> new BiMinGRULayer(layerIndex, initialization, params);
            case CONVOLUTION -> new ConvolutionLayer(layerIndex, activationFunction, initialization, params);
            case CROSSCORRELATION -> new CrosscorrelationLayer(layerIndex, activationFunction, initialization, params);
            case WINOGRAD_CONVOLUTION -> new WinogradConvolutionLayer(layerIndex, activationFunction, initialization, params);
            case MAX_POOLING -> new MaxPoolingLayer(layerIndex, initialization, params);
            case RANDOM_POOLING -> new RandomPoolingLayer(layerIndex, initialization, params);
            case CYCLIC_POOLING -> new CyclicPoolingLayer(layerIndex, initialization, params);
            case AVERAGE_POOLING -> new AveragePoolingLayer(layerIndex, initialization, params);
            case BATCH_NORMALIZATION -> new BatchNormalization(layerIndex, initialization, params);
            case LAYER_NORMALIZATION -> new LayerNormalization(layerIndex, initialization, params);
            case WEIGHT_NORMALIZATION -> new WeightNormalization(layerIndex, initialization, params);
            case DROPOUT -> new Dropout(layerIndex, initialization, params);
            case GRADIENT_CLIPPING -> new GradientClipping(layerIndex, initialization, params);
            case L1_REGULARIZATION -> new L1_Regularization(layerIndex, initialization, params);
            case L2_REGULARIZATION -> new L2_Regularization(layerIndex, initialization, params);
            case Lp_REGULARIZATION -> new Lp_Regularization(layerIndex, initialization, params);
            case WEIGHT_NOISING -> new WeightNoising(layerIndex, initialization, params);
        };
    }
public static AbstractExecutionLayer create ( int layerIndex , LayerType layerType , ActivationFunction activationFunction , Initialization initialization , String params ) throws DynamicParamException , NeuralNetworkException , MatrixException { return switch ( layerType ) { case FEEDFORWARD -> new FeedforwardLayer ( layerIndex , activationFunction , initialization , params ) ; case RECURRENT -> new RecurrentLayer ( layerIndex , activationFunction , initialization , params ) ; case LSTM -> new LSTMLayer ( layerIndex , activationFunction , initialization , params ) ; case PEEPHOLELSTM -> new PeepholeLSTMLayer ( layerIndex , activationFunction , initialization , params ) ; case GRAVESLSTM -> new GravesLSTMLayer ( layerIndex , activationFunction , initialization , params ) ; case GRU -> new GRULayer ( layerIndex , initialization , params ) ; case MINGRU -> new MinGRULayer ( layerIndex , initialization , params ) ; case BIRECURRENT -> new BiRecurrentLayer ( layerIndex , activationFunction , initialization , params ) ; case BILSTM -> new BiLSTMLayer ( layerIndex , activationFunction , initialization , params ) ; case BIPEEPHOLELSTM -> new BiPeepholeLSTMLayer ( layerIndex , activationFunction , initialization , params ) ; case BIGRAVESLSTM -> new BiGravesLSTMLayer ( layerIndex , activationFunction , initialization , params ) ; case BIGRU -> new BiGRULayer ( layerIndex , initialization , params ) ; case BIMINGRU -> new BiMinGRULayer ( layerIndex , initialization , params ) ; case CONVOLUTION -> new ConvolutionLayer ( layerIndex , activationFunction , initialization , params ) ; case CROSSCORRELATION -> new CrosscorrelationLayer ( layerIndex , activationFunction , initialization , params ) ; case WINOGRAD_CONVOLUTION -> new WinogradConvolutionLayer ( layerIndex , activationFunction , initialization , params ) ; case MAX_POOLING -> new MaxPoolingLayer ( layerIndex , initialization , params ) ; case RANDOM_POOLING -> new RandomPoolingLayer ( layerIndex , initialization , params ) ; case CYCLIC_POOLING -> new CyclicPoolingLayer ( layerIndex , initialization , params ) ; case AVERAGE_POOLING -> new AveragePoolingLayer ( layerIndex , initialization , params ) ; case BATCH_NORMALIZATION -> new BatchNormalization ( layerIndex , initialization , params ) ; case LAYER_NORMALIZATION -> new LayerNormalization ( layerIndex , initialization , params ) ; case WEIGHT_NORMALIZATION -> new WeightNormalization ( layerIndex , initialization , params ) ; case DROPOUT -> new Dropout ( layerIndex , initialization , params ) ; case GRADIENT_CLIPPING -> new GradientClipping ( layerIndex , initialization , params ) ; case L1_REGULARIZATION -> new L1_Regularization ( layerIndex , initialization , params ) ; case L2_REGULARIZATION -> new L2_Regularization ( layerIndex , initialization , params ) ; case Lp_REGULARIZATION -> new Lp_Regularization ( layerIndex , initialization , params ) ; case WEIGHT_NOISING -> new WeightNoising ( layerIndex , initialization , params ) ; } ; }
Creates neural network execution layer.
Creates neural network execution layer .