machine learning - Neural Network Diverging instead of converging -
i have implemented neural network (using cuda) 2 layers. (2 neurons per layer). i'm trying make learn 2 simple quadratic polynomial functions using backpropagation.
but instead of converging, diverging (the output becoming infinity)
here more details i've tried:
- i had set initial weights 0, since diverging have randomized initial weights
- i read neural network might diverge if learning rate high reduced learning rate 0.000001
- the 2 functions trying add are:
3 * + 7 * j+9,j*j + i*i + 24(i giving layeri,jinput) - i had implemented single layer , approximate polynomial functions better
- i thinking of implementing momentum in network i'm not sure learn
- i using linear (as in no) activation function
- there oscillation in beginning output starts diverging moment of weights become greater 1
i have checked , rechecked code there doesn't seem kind of issue it.
so here's question: going wrong here?
any pointer appreciated.
if problem trying solve of classification type, try 3 layer network (3 enough accordingly kolmogorov) connections inputs , b hidden node c (c = a*wa + b*wb) represent line in ab space. line divides correct , incorrect half-spaces. connections hidden layer ouput, put hidden layer values in correlation each other giving desired output.
depending on data, error function may hair comb, implementing momentum should help. keeping learning rate @ 1 proved optimum me.
your training sessions stuck in local minima every once in while, network training consist of few subsequent sessions. if session exceeds max iterations or amplitude high, or error high - session has failed, start another.
at beginning of each, reinitialize weights random (-0.5 - +0.5) values.
it helps chart error descent. "aha!" factor.
Comments
Post a Comment