8
$\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$

1 Answer 1

6
$\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
  • 1
    $\begingroup$ Hi, Thank you. But the code you have linked is not available anymore $\endgroup$ May 28, 2021 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, 2021 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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