I have a question regarding the tanh function. I trained an NN (with tanh activation functions in hidden layers) on a multiclass dataset and visualised the tanh values of the complete samples from the dataset passed through the NN.

The question is why I only have the -1 and 1 values? What does it mean can we conclude something from that?

enter image description here

thank a lot

  • $\begingroup$ almost nothing can be concluded. It may be the result of bad architecture, type of data or simply be normal $\endgroup$
    – Nikos M.
    Mar 20 at 19:37
  • $\begingroup$ The use of activation function is used to make linear data as non-linear. Just like sigmoid returns you the values as either 0 or 1, tanh also generates values either -1 or +1 . $\endgroup$ Mar 22 at 7:40
  • $\begingroup$ tanh can also produce values between -1 and +1 @SaandeepSreerambatla $\endgroup$
    – malocho
    Mar 22 at 15:27

Your Answer

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

Browse other questions tagged or ask your own question.