BasicOptimizer.scala:89 executed in 206.93 seconds (2.002 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
val trainer = new IterativeTrainer(trainable)
trainer.setOrientation(orientation())
trainer.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = {
trainingMonitor.log(msg)
BasicOptimizer.this.log(msg)
}
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[Trainable], currentPoint)
}
override def onStepComplete(currentPoint: Step): Unit = {
if (0 < logEvery && (0 == currentPoint.iteration % logEvery || currentPoint.iteration < logEvery)) {
val image = currentImage()
timelineAnimation += image
val caption = "Iteration " + currentPoint.iteration
out.p(caption + "\n" + out.jpg(image, caption))
}
BasicOptimizer.this.onStepComplete(trainable.addRef().asInstanceOf[Trainable], currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
trainer.setMaxIterations(trainingIterations)
trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
val result = trainer.run.asInstanceOf[lang.Double]
trainer.freeRef()
result
Reset training subject: 9807084807295
Reset training subject: 9811016684297
Adding measurement 3c522eb4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=0.004130750894546509;dx=-5.650074611660171E-7
New Minimum: 0.004130750894546509 > 0.0041304826736450195
WOLFE (weak): th(2.154434690031884)=0.0041304826736450195; dx=-5.355111640071549E-7 evalInputDelta=2.682209014892578E-7
New Minimum: 0.0041304826736450195 > 0.004129946231842041
WOLFE (weak): th(4.308869380063768)=0.004129946231842041; dx=-5.355111376052456E-7 evalInputDelta=8.046627044677734E-7
New Minimum: 0.004129946231842041 > 0.004127383232116699
WOLFE (weak): th(12.926608140191302)=0.004127383232116699; dx=-5.355117044782906E-7 evalInputDelta=3.3676624298095703E-6
New Minimum: 0.004127383232116699 > 0.004116848111152649
WOLFE (weak): th(51.70643256076521)=0.004116848111152649; dx=-5.355147010845822E-7 evalInputDelta=1.3902783393859863E-5
New Minimum: 0.004116848111152649 > 0.004061460494995117
WOLFE (weak): th(258.53216280382605)=0.004061460494995117; dx=-5.35509045018004E-7 evalInputDelta=6.92903995513916E-5
New Minimum: 0.004061460494995117 > 0.0037153959274291992
WOLFE (weak): th(1551.1929768229563)=0.0037153959274291992; dx=-5.353292975321758E-7 evalInputDelta=4.1535496711730957E-4
New Minimum: 0.0037153959274291992 > 0.0012276619672775269
WOLFE (weak): th(10858.350837760694)=0.0012276619672775269; dx=-5.339163162962682E-7 evalInputDelta=0.002903088927268982
New Minimum: 0.0012276619672775269 > -0.01886540651321411
WOLFE (weak): th(86866.80670208555)=-0.01886540651321411; dx=-5.234418186628651E-7 evalInputDelta=0.02299615740776062
New Minimum: -0.01886540651321411 > -0.18255183100700378
END: th(781801.26031877)=-0.18255183100700378; dx=-4.164710071204726E-7 evalInputDelta=0.1866825819015503
Fitness changed from 0.004130750894546509 to -0.18255183100700378
Iteration 1 complete. Error: -0.18255183100700378 Total: 56.9871; Orientation: 0.0469; Line Search: 44.4874
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e5bf8e05-61b8-4c5f-bffb-00a14dfc6ff1.jpg)
Adding measurement 6a47667e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.18255183100700378;dx=-3.7385048270031893E-7
New Minimum: -0.18255183100700378 > -0.4413199871778488
END: th(1684339.7559414052)=-0.4413199871778488; dx=-2.4585074235587257E-7 evalInputDelta=0.25876815617084503
Fitness changed from -0.18255183100700378 to -0.4413199871778488
Iteration 2 complete. Error: -0.4413199871778488 Total: 12.2435; Orientation: 0.0456; Line Search: 8.0683
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a397629c-7af1-4222-b828-493dc08e7a33.jpg)
Adding measurement 28cb06ea to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.4413199871778488;dx=-2.2463140796218516E-7
New Minimum: -0.4413199871778488 > -0.7466630041599274
END: th(3628800.0)=-0.7466630041599274; dx=-1.242343690136093E-7 evalInputDelta=0.30534301698207855
Fitness changed from -0.4413199871778488 to -0.7466630041599274
Iteration 3 complete. Error: -0.7466630041599274 Total: 13.2516; Orientation: 0.0488; Line Search: 8.2722
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/554cbf9a-5b7f-4f49-9ea9-eb150e813df8.jpg)
Adding measurement 7874874c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.294e+03, gradient 3.754e-04, dot -0.817; [650b4216-2ce4-4752-a89a-d58fb774f26a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.7466630041599274, -0.4413199871778488, -0.18255183100700378, 0.004130750894546509
LBFGS Accumulation History: 3 points
Removed measurement 7874874c to history. Total: 3
th(0)=-0.7466630041599274;dx=-1.4093938035507964E-7
New Minimum: -0.7466630041599274 > -1.0652886927127838
END: th(7818012.6031877)=-1.0652886927127838; dx=-4.725226370048646E-8 evalInputDelta=0.31862568855285645
Fitness changed from -0.7466630041599274 to -1.0652886927127838
Iteration 4 complete. Error: -1.0652886927127838 Total: 13.6289; Orientation: 1.0196; Line Search: 8.6505
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/57705b21-1947-4f24-b6ef-54e8a082ec80.jpg)
Adding measurement 666ef1a6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.871e+03, gradient 3.254e-04, dot -0.620; [650b4216-2ce4-4752-a89a-d58fb774f26a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.0652886927127838, -0.4413199871778488, -0.18255183100700378, 0.004130750894546509
LBFGS Accumulation History: 3 points
Removed measurement 666ef1a6 to history. Total: 3
th(0)=-1.0652886927127838;dx=-1.0589517504389348E-7
New Minimum: -1.0652886927127838 > -1.2871322333812714
WOLF (strong): th(1.684339755941405E7)=-1.2871322333812714; dx=4.7878677828049736E-9 evalInputDelta=0.22184354066848755
END: th(8421698.779707026)=-1.2781962454319; dx=-1.3660389929587767E-8 evalInputDelta=0.2129075527191162
Fitness changed from -1.0652886927127838 to -1.2871322333812714
Iteration 5 complete. Error: -1.2871322333812714 Total: 19.0405; Orientation: 1.0199; Line Search: 13.9102
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/af856477-5a07-472e-ac0f-34ce713b45f1.jpg)
Adding measurement 5d1ff9dd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.923e+03, gradient 3.507e-04, dot -0.385; [650b4216-2ce4-4752-a89a-d58fb774f26a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2871322333812714, -0.4413199871778488, -0.18255183100700378, 0.004130750894546509
LBFGS Accumulation History: 3 points
Removed measurement 5d1ff9dd to history. Total: 3
th(0)=-1.2871322333812714;dx=-1.2300281367646234E-7
New Minimum: -1.2871322333812714 > -1.4310033917427063
WOLF (strong): th(1.8144E7)=-1.4310033917427063; dx=3.428479857663426E-8 evalInputDelta=0.14387115836143494
New Minimum: -1.4310033917427063 > -1.5143693536520004
END: th(9072000.0)=-1.5143693536520004; dx=-3.1278530215649715E-9 evalInputDelta=0.22723712027072906
Fitness changed from -1.2871322333812714 to -1.5143693536520004
Iteration 6 complete. Error: -1.5143693536520004 Total: 17.7498; Orientation: 1.0204; Line Search: 12.7099
Adding measurement 2187c660 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.321e+03, gradient 2.336e-04, dot -0.419; [650b4216-2ce4-4752-a89a-d58fb774f26a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5143693536520004, -0.4413199871778488, -0.18255183100700378, 0.004130750894546509
LBFGS Accumulation History: 3 points
Removed measurement 2187c660 to history. Total: 3
th(0)=-1.5143693536520004;dx=-5.454981434852008E-8
New Minimum: -1.5143693536520004 > -1.6390838027000427
WOLF (strong): th(1.954503150796925E7)=-1.6390838027000427; dx=1.7958530582576815E-8 evalInputDelta=0.1247144490480423
New Minimum: -1.6390838027000427 > -1.661331132054329
END: th(9772515.753984625)=-1.661331132054329; dx=-1.09891482730308E-8 evalInputDelta=0.1469617784023285
Fitness changed from -1.5143693536520004 to -1.661331132054329
Iteration 7 complete. Error: -1.661331132054329 Total: 17.8393; Orientation: 1.0731; Line Search: 12.3270
Adding measurement 5a0537d8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.712e+03, gradient 1.758e-04, dot -0.494; [650b4216-2ce4-4752-a89a-d58fb774f26a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.661331132054329, -0.4413199871778488, -0.18255183100700378, 0.004130750894546509
LBFGS Accumulation History: 3 points
Removed measurement 5a0537d8 to history. Total: 3
th(0)=-1.661331132054329;dx=-3.0902121252461594E-8
New Minimum: -1.661331132054329 > -1.7685445845127106
WOLF (strong): th(2.1054246949267566E7)=-1.7685445845127106; dx=3.973956725865983E-9 evalInputDelta=0.10721345245838165
END: th(1.0527123474633783E7)=-1.7596839517354965; dx=-8.394682815237851E-9 evalInputDelta=0.0983528196811676
Fitness changed from -1.661331132054329 to -1.7685445845127106
Iteration 8 complete. Error: -1.7685445845127106 Total: 18.5278; Orientation: 1.0118; Line Search: 13.0287
Adding measurement 2902237f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.232e+03, gradient 2.272e-04, dot -0.327; [650b4216-2ce4-4752-a89a-d58fb774f26a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7685445845127106, -0.4413199871778488, -0.18255183100700378, 0.004130750894546509
LBFGS Accumulation History: 3 points
Removed measurement 2902237f to history. Total: 3
th(0)=-1.7685445845127106;dx=-5.161073358385122E-8
New Minimum: -1.7685445845127106 > -1.7728408575057983
WOLF (strong): th(2.2680000000000004E7)=-1.7728408575057983; dx=2.6375493725264203E-8 evalInputDelta=0.0042962729930877686
New Minimum: -1.7728408575057983 > -1.8760592639446259
WOLF (strong): th(1.1340000000000002E7)=-1.8760592639446259; dx=4.766296185616503E-9 evalInputDelta=0.10751467943191528
END: th(3780000.0000000005)=-1.8412861824035645; dx=-2.6034590233096568E-8 evalInputDelta=0.07274159789085388
Fitness changed from -1.7685445845127106 to -1.8760592639446259
Iteration 9 complete. Error: -1.8760592639446259 Total: 22.7560; Orientation: 1.0244; Line Search: 17.6171
Adding measurement 1725be1b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.613e+03, gradient 1.629e-04, dot -0.394; [650b4216-2ce4-4752-a89a-d58fb774f26a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8760592639446259, -0.4413199871778488, -0.18255183100700378, 0.004130750894546509
LBFGS Accumulation History: 3 points
Removed measurement 1725be1b to history. Total: 3
th(0)=-1.8760592639446259;dx=-2.6520616065703396E-8
New Minimum: -1.8760592639446259 > -1.9433683604002
END: th(8143763.128320522)=-1.9433683604002; dx=-7.885958019543912E-9 evalInputDelta=0.06730909645557404
Fitness changed from -1.8760592639446259 to -1.9433683604002
Iteration 10 complete. Error: -1.9433683604002 Total: 14.8353; Orientation: 1.0132; Line Search: 9.3472
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b236c719-1d5a-4ebf-8bbf-ff41b2691715.jpg)
Final threshold in iteration 11: -1.9433683604002 (> -Infinity) after 206.931s (< 5400.000s)
Returns
-1.9433683604002