I have the below MLP neural network:
MLP = MLPClassifier(activation= 'tanh', alpha= 1e-05, hidden_layer_sizes= (2, 3), learning_rate= 'constant' , max_iter= 5000)
MLP.fit(X_train,y_train)
print(MLP.coefs_)
As I understand this neural network has only 2 hidden layers, with 2 neurons in the first hidden layer, and 3 neurons in the second hidden layer. However, the output to print coefficients above gives the below:
[array([[-0.15020109, 0.29242019],
[ 0.38515555, 0.06000627],
[-0.04371792, 0.35203079],
[ 0.28167529, 0.05948562],
[-0.46051132, -0.28546222]]), array([[-0.29658042, -1.2229539 , 0.4949065 ],
[-0.95435436, 0.3854664 , 0.6349616 ]]), array([[-0.54332547, 0.27007792, 0.68899707],
[-0.00191208, 0.89295531, -0.22855791],
[-0.58939234, 0.39217616, 1.10214481]])]
My question is how to map the above output to each neuron in the hidden layer. From the first glance, it seems that the weight for the first neuron in the first hidden layer is: [-0.29658042, -1.2229539 , 0.4949065 ]. How can weights for a single neuron can be an array of 3 elements?