pyml.neural_network.nn.InconsistentLayerSizes#

exception InconsistentLayerSizes(output_size_previous_layer, input_size_current_layer)[source]#

Exception raised when neurons of two consecutive layers do not match.

Parameters:
  • output_size_previous_layer (int) – Ouput neurons from previous layers

  • input_size_current_layer (int) – Input size of current layer

Examples

>>> from pyml.nn import NN
>>> model = NN()
>>> model.add(Dense(4, 16))
>>> model.add(Activation_ReLU())
>>> model.add(Layer_Dense(20, 10))
InconsistentLayerSizes: The output size of the previous layer: 16 and the input size of the current layer: 17 do not match.