BasicOptimizer.scala:89 executed in 130.46 seconds (1.703 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: 31329816809000
Reset training subject: 31332441591500
Adding measurement 36ac07ba to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-70.83215034014452;dx=-4.803286208458989E-6
New Minimum: -70.83215034014452 > -70.83216000211215
END: th(2.154434690031884)=-70.83216000211215; dx=-3.42431023013054E-6 evalInputDelta=9.661967624197132E-6
Fitness changed from -70.83215034014452 to -70.83216000211215
Iteration 1 complete. Error: -70.83216000211215 Total: 13.0091; Orientation: 0.0614; Line Search: 5.1827
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/986e7b3a-edcf-4956-a3cb-c83cca066a6d.jpg)
Adding measurement b692479 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-70.83216000211215;dx=-3.3999909910104563E-6
New Minimum: -70.83216000211215 > -70.83217449506111
WOLFE (weak): th(4.641588833612779)=-70.83217449506111; dx=-3.3987102231669177E-6 evalInputDelta=1.4492948963606977E-5
New Minimum: -70.83217449506111 > -70.83219140349782
WOLFE (weak): th(9.283177667225559)=-70.83219140349782; dx=-3.3978165719830376E-6 evalInputDelta=3.1401385669482806E-5
New Minimum: -70.83219140349782 > -70.8322614526926
WOLFE (weak): th(27.849533001676676)=-70.8322614526926; dx=-3.3967278906037403E-6 evalInputDelta=1.0145058045907263E-4
New Minimum: -70.8322614526926 > -70.83258754285994
WOLFE (weak): th(111.3981320067067)=-70.83258754285994; dx=-3.3949804836996815E-6 evalInputDelta=4.275407477933868E-4
New Minimum: -70.83258754285994 > -70.83431941881196
WOLFE (weak): th(556.9906600335335)=-70.83431941881196; dx=-3.395039621788383E-6 evalInputDelta=0.002159416699811345
New Minimum: -70.83431941881196 > -70.84513966549538
WOLFE (weak): th(3341.9439602012008)=-70.84513966549538; dx=-3.394468995678606E-6 evalInputDelta=0.012979663383234197
New Minimum: -70.84513966549538 > -70.9229339884498
WOLFE (weak): th(23393.607721408407)=-70.9229339884498; dx=-3.3874429772611126E-6 evalInputDelta=0.09077398633765199
New Minimum: -70.9229339884498 > -71.55174894603573
WOLFE (weak): th(187148.86177126726)=-71.55174894603573; dx=-3.3247139296898204E-6 evalInputDelta=0.7195889439235827
New Minimum: -71.55174894603573 > -76.6024381813248
END: th(1684339.7559414054)=-76.6024381813248; dx=-2.5253938632511176E-6 evalInputDelta=5.770278179212653
Fitness changed from -70.83216000211215 to -76.6024381813248
Iteration 2 complete. Error: -76.6024381813248 Total: 29.3676; Orientation: 0.0542; Line Search: 26.3543
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d935c57c-1367-4a43-8ed3-c232aedf8e94.jpg)
Adding measurement 461b4d8c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-76.6024381813248;dx=-2.376049284780085E-6
New Minimum: -76.6024381813248 > -84.02553830915267
END: th(3628800.0000000005)=-84.02553830915267; dx=-1.2938470823995354E-6 evalInputDelta=7.423100127827865
Fitness changed from -76.6024381813248 to -84.02553830915267
Iteration 3 complete. Error: -84.02553830915267 Total: 8.4808; Orientation: 0.0633; Line Search: 5.3968
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4331611a-1301-4554-bff5-1359043f4221.jpg)
Adding measurement 593df85f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.450e+03, gradient 1.218e-03, dot -0.654; [3dbc9f75-08cd-4ee2-8e32-0c0ff9b69904 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.02553830915267, -76.6024381813248, -70.83216000211215, -70.83215034014452
LBFGS Accumulation History: 3 points
Removed measurement 593df85f to history. Total: 3
th(0)=-84.02553830915267;dx=-1.4836820642767536E-6
New Minimum: -84.02553830915267 > -92.83334442541668
END: th(7818012.603187701)=-92.83334442541668; dx=-5.983051499400971E-7 evalInputDelta=8.807806116264018
Fitness changed from -84.02553830915267 to -92.83334442541668
Iteration 4 complete. Error: -92.83334442541668 Total: 9.4697; Orientation: 1.0669; Line Search: 5.2699
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0f4694c3-db30-4e56-892d-f749736b1975.jpg)
Adding measurement 2a4cd959 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.330e+04, gradient 1.263e-03, dot -0.497; [3dbc9f75-08cd-4ee2-8e32-0c0ff9b69904 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.83334442541668, -76.6024381813248, -70.83216000211215, -70.83215034014452
LBFGS Accumulation History: 3 points
Removed measurement 2a4cd959 to history. Total: 3
th(0)=-92.83334442541668;dx=-1.5957491634233746E-6
New Minimum: -92.83334442541668 > -93.16485150839735
WOLF (strong): th(1.6843397559414055E7)=-93.16485150839735; dx=4.896402834390072E-7 evalInputDelta=0.33150708298066434
New Minimum: -93.16485150839735 > -97.29249592275086
WOLF (strong): th(8421698.779707028)=-97.29249592275086; dx=2.130226704485802E-7 evalInputDelta=4.459151497334176
END: th(2807232.926569009)=-96.47971760534895; dx=-7.141718924650509E-7 evalInputDelta=3.6463731799322687
Fitness changed from -92.83334442541668 to -97.29249592275086
Iteration 5 complete. Error: -97.29249592275086 Total: 14.8408; Orientation: 1.0790; Line Search: 10.5727
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b40a7960-22c3-4609-9624-8a40c57ef550.jpg)
Adding measurement 6bff35d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.148e+03, gradient 1.612e-03, dot -0.244; [3dbc9f75-08cd-4ee2-8e32-0c0ff9b69904 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.29249592275086, -76.6024381813248, -70.83216000211215, -70.83215034014452
LBFGS Accumulation History: 3 points
Removed measurement 6bff35d to history. Total: 3
th(0)=-97.29249592275086;dx=-2.596297919925091E-6
New Minimum: -97.29249592275086 > -103.4725373990621
WOLF (strong): th(6048000.000000001)=-103.4725373990621; dx=6.791327757982148E-7 evalInputDelta=6.180041476311246
New Minimum: -103.4725373990621 > -103.51946704358684
END: th(3024000.0000000005)=-103.51946704358684; dx=-8.976508390224056E-7 evalInputDelta=6.226971120835984
Fitness changed from -97.29249592275086 to -103.51946704358684
Iteration 6 complete. Error: -103.51946704358684 Total: 12.1928; Orientation: 1.0624; Line Search: 7.7937
Adding measurement 5376da3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.241e+04, gradient 9.629e-04, dot -0.644; [3dbc9f75-08cd-4ee2-8e32-0c0ff9b69904 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -103.51946704358684, -76.6024381813248, -70.83216000211215, -70.83215034014452
LBFGS Accumulation History: 3 points
Removed measurement 5376da3 to history. Total: 3
th(0)=-103.51946704358684;dx=-9.266665141575455E-7
New Minimum: -103.51946704358684 > -108.15184666740718
END: th(6515010.502656418)=-108.15184666740718; dx=-3.8485976967340726E-7 evalInputDelta=4.632379623820341
Fitness changed from -103.51946704358684 to -108.15184666740718
Iteration 7 complete. Error: -108.15184666740718 Total: 8.6017; Orientation: 1.0252; Line Search: 5.0491
Adding measurement 5acbb084 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.785e+04, gradient 1.017e-03, dot -0.567; [3dbc9f75-08cd-4ee2-8e32-0c0ff9b69904 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -108.15184666740718, -76.6024381813248, -70.83216000211215, -70.83215034014452
LBFGS Accumulation History: 3 points
Removed measurement 5acbb084 to history. Total: 3
th(0)=-108.15184666740718;dx=-1.0325676658881937E-6
New Minimum: -108.15184666740718 > -110.51673582200193
WOLF (strong): th(1.4036164632845048E7)=-110.51673582200193; dx=2.4923174304217233E-7 evalInputDelta=2.3648891545947492
New Minimum: -110.51673582200193 > -111.7306901680173
END: th(7018082.316422524)=-111.7306901680173; dx=-4.5142029011905016E-8 evalInputDelta=3.5788435006101196
Fitness changed from -108.15184666740718 to -111.7306901680173
Iteration 8 complete. Error: -111.7306901680173 Total: 11.6604; Orientation: 1.2079; Line Search: 8.0648
Adding measurement 1f2d02dd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.680e+04, gradient 1.192e-03, dot -0.427; [3dbc9f75-08cd-4ee2-8e32-0c0ff9b69904 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.7306901680173, -76.6024381813248, -70.83216000211215, -70.83215034014452
LBFGS Accumulation History: 3 points
Removed measurement 1f2d02dd to history. Total: 3
th(0)=-111.7306901680173;dx=-1.4200222026434528E-6
Armijo: th(1.5120000000000006E7)=-108.15017607933753; dx=7.808779094963737E-7 evalInputDelta=-3.5805140886797773
New Minimum: -111.7306901680173 > -114.52701333402385
WOLF (strong): th(7560000.000000003)=-114.52701333402385; dx=4.966496559068257E-7 evalInputDelta=2.7963231660065446
New Minimum: -114.52701333402385 > -114.76000753354586
END: th(2520000.000000001)=-114.76000753354586; dx=-6.809036568985263E-7 evalInputDelta=3.0293173655285557
Fitness changed from -111.7306901680173 to -114.76000753354586
Iteration 9 complete. Error: -114.76000753354586 Total: 13.6747; Orientation: 1.0351; Line Search: 10.1381
Adding measurement 2321a31 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.493e+04, gradient 8.027e-04, dot -0.696; [3dbc9f75-08cd-4ee2-8e32-0c0ff9b69904 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -114.76000753354586, -76.6024381813248, -70.83216000211215, -70.83215034014452
LBFGS Accumulation History: 3 points
Removed measurement 2321a31 to history. Total: 3
th(0)=-114.76000753354586;dx=-6.434939599963634E-7
New Minimum: -114.76000753354586 > -117.91446265965853
END: th(5429175.418880349)=-117.91446265965853; dx=-4.193529116678257E-7 evalInputDelta=3.1544551261126657
Fitness changed from -114.76000753354586 to -117.91446265965853
Iteration 10 complete. Error: -117.91446265965853 Total: 8.6730; Orientation: 1.0285; Line Search: 5.2068
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/77ae1521-e2df-4bcd-ad5e-66068ae2799a.jpg)
Final threshold in iteration 11: -117.91446265965853 (> -Infinity) after 130.454s (< 5400.000s)
Returns
-117.91446265965853