According to the documentation, it says the 'activation' argument specifies:
"Activation function for the hidden layer"
Does that mean that you cannot use a different activation function in different layers?
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.
Sign up to join this communityOne can see from the code (look at uses of self.activation
) that the same function is used for all the hidden layers.
You might want to consider the comments to this question for alternative approaches, generally being a move away from sklearn
and towards a deep learning framework.