.setInputType(InputType.feedForward

Hi guys,
does the line “.setInputType(InputType.feed” in the following code make the multilayernetwork to a feedforward multilayernetwork?

MultiLayerConfiguration config = new NeuralNetConfiguration.Builder()

.seed(0xC0FFEE)

.weightInit(WeightInit.XAVIER)

.activation(Activation.TANH)

.updater( new Adam.Builder().learningRate(0.001).build())

.l2(0.0000316)

.list(

new DenseLayer.Builder().nOut(25).build(),

new DenseLayer.Builder().nOut(25).build(),

new DenseLayer.Builder().nOut(25).build(),

new DenseLayer.Builder().nOut(25).build(),

new DenseLayer.Builder().nOut(25).build(),

new OutputLayer.Builder( new LossMCXENT()).nOut(2).activation(Activation.SOFTMAX).build()

)

.setInputType(InputType.feedForward(finalSchema.numColumns() - 1))

.build();

@blablab1 this sets the input number of columns for all the various layers automatically by looking at each layer’s configuration and setting the number of inputs appropriately. That way you don’t have to manually calculate it.
A 'feed forward network" (being a neural net that just processes 2d arrays) are in this case DenseLayers.

1 Like