NeuralNetworkLearnsSinFunction this repository helped me https://github.com/MorvanZhou/simple-neural-networks here's a demo: