Skip to content
Discussion options

You must be logged in to vote

The issue you're experiencing is a classic case of the vanishing gradient problem.
When you use sigmoid as a hidden layer activation, it squashes all values into a narrow range (0, 1). During backpropagation, gradients are multiplied at each layer - and since sigmoid derivatives max out at 0.25, after just 2–3 layers those gradients become extremely small. The weights barely update, and the model appears stuck.
ReLU avoids this because its gradient is simply 1 for any positive input - it passes the signal through without squashing it.

Why did it work on TensorFlow Playground?
The Playground uses very clean, well-scaled 2D data and a relatively forgiving optimizer setup. It masks the vanis…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cleverll
Comment options

Answer selected by cleverll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants