File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -412,21 +412,7 @@ export function updateNode (node: Node): void {
412412 link . weight = link . weight - ( learningRate / link . numAccumulatedDers ) * link . accErrorDer ;
413413
414414 // Further update the weight based on regularization.
415- let newLinkWeight = link . weight - ( learningRate * regularizationRate ) * regulDer ;
416-
417- // todo investigate
418- if (
419- regularization === RegularizationFunction . L1
420- && link . weight * newLinkWeight < 0
421- ) {
422- // The weight crossed 0 due to the regularization term. Set it to 0.
423- link . weight = 0 ;
424- link . isDead = true ;
425- }
426- else {
427- link . weight = newLinkWeight ;
428- }
429-
415+ link . weight = link . weight - ( learningRate * regularizationRate ) * regulDer ;
430416 link . accErrorDer = 0 ;
431417 link . numAccumulatedDers = 0 ;
432418 }
You can’t perform that action at this time.
0 commit comments