MATLAB neural nets: trainbfg problems when using a custom performance function -
MATLAB neural nets: trainbfg problems when using a custom performance function -
i have written own custom performance function, cross entropy function modifications, called augmented cross entropy function.
my performance function itselft sum of 2 functions: cross entropy function f , penalty function p, formula given below:
where b , vectors e1 , e2 constants , w
weight matrix (i
hidden layer neurons, j
input layer neurons).
i've implemented dy , dx derivatives, not beingness sure dx derivative (where x result of getx function - holds weight , bias information). assumed dx derivative of performance function weight wij
equal derivative of penalty function:
then started training neural network trainbfg function , found out not larn anything. message "line search did not find new minimum". trainbfg description:
each variable adjusted according following: x = x + a*dx; dx search direction. parameter selected minimize performance along search direction.
it turned out parameter a
calculated 0 default search function, srchbac (line search). assume has performance function beingness wrongfully implemented, because when set mse performance function, a
calculated properly.
what reason of problems during locating new minimum srchbac
function? know should sec day found nothing.
edit:
the x vector consists of input-hidden connections' weight values first , rest biases , weights. calculate dx derivative of weights vector next formula:
res = 2 .* e1 .* b .* w ./( 1 + b .* w.^2).^2 + 2 .* e2 .* w ;
and rest of values set 0 (so res
has same length x vector).
neural-network matlab
Comments
Post a Comment