5
$\begingroup$

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?

$\endgroup$
4
$\begingroup$

One 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.

$\endgroup$
2
  • $\begingroup$ Hi, Thank you. But the code you have linked is not available anymore $\endgroup$ May 28 at 17:33
  • $\begingroup$ Hi @DiliniPeiris, thanks for letting me know. I've updated the link in response to the maintainers of sklearn changing the module name. $\endgroup$
    – mapto
    May 29 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.