Theoretically and practically, are the hidden layers of MLPclassifier (refer to hidden_layer_sizes)
mlp = MLPClassifier(hidden_layer_sizes=(4, 3, 2, 1),
max_iter = 100, activation = 'relu',
solver = 'adam', verbose = type_spec_from_value,
random_state = 100, learning_rate = 'invscaling',
early_stopping=False
)
the same as the Dense layers of tensorflow/keras
mlp = Sequential()
mlp.add(Dense(4))
mlp.add(Dense(3))
mlp.add(Dense(2))
mlp.add(Dense(3))
?
CodePudding user response:
Yes, they are the same. In both cases, the parameters specify the number of neurons.