Which is better for regression problems create a neural net with tanh/sigmoid and exp(like) activations or ReLU and linear? Standard is to use ReLU but it's brute force solution that requires certain net size and I would like to avoid creating a very big net, also sigmoid is much more prefered but in my case regression will output values from range (0, 1e7)... maybe also sigmoid net with linear head will work? I am curious about your take on the subject.


2 Answers 2


There are two points that have to be considered.

  1. Take care of the output of your network. If that's a Real number and can take any value, you have to use linear activation as the output.
  2. The inner activations highly depend on your task and the size of the network that you use. What I'm going to tell you is based on experience. If you don't have a very deep network, $tanh$ and $ReLU$ may not differ very much in convergence time. If you're using very deep networks, don't use $tahn$ at all. $ReLU$ is also not recommended in some contexts. You can employ $PReLU$ in very deep networks. It does not add too many parameters to learn. You can also use $leaky-ReLU$ in order to avoid dying ReLU problem which may occur.

Finally, about the other nonlinearity that you've referred; try not to use $Sigmoid$ due to that fact that it's expected value is not equal to zero but half. It's a bit statistical stuff, but you can consider it's roughly hard for a network to learn shifted weights.


The issue with sigmoid and tanh activations is that their gradients saturate for extreme values of their arguments. This may occur if you do not normalize your inputs. If the learned weights of the unit are such that the gradient of its activation is close to zero, it will take longer for any updates to be reflected in the unit's weights. A final layer with no non-linearity will help you scale up your hidden layers' outputs.

In the end, the performance is application specific. You should try out both kinds of activations on a subset of your data and see which performs better.

Credit: https://medium.com/@krishnakalyan3/introduction-to-exponential-linear-unit-d3e2904b366c


Your Answer

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

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