BasicOptimizer.scala:89 executed in 132.70 seconds (1.665 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: 32315806544800
Reset training subject: 32318535102000
Adding measurement 25b2f371 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-70.2673546305861;dx=-4.692273374905935E-6
New Minimum: -70.2673546305861 > -70.26736193530775
END: th(2.154434690031884)=-70.26736193530775; dx=-3.215291369297881E-6 evalInputDelta=7.304721648893064E-6
Fitness changed from -70.2673546305861 to -70.26736193530775
Iteration 1 complete. Error: -70.26736193530775 Total: 13.2618; Orientation: 0.0627; Line Search: 5.2079
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/2165044c-ed2f-479b-bf8d-aa3055ccc1c2.jpg)
Adding measurement 63b5b63a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-70.26736193530775;dx=-3.1898087017967586E-6
New Minimum: -70.26736193530775 > -70.26738141456173
WOLFE (weak): th(4.641588833612779)=-70.26738141456173; dx=-3.1885935091907424E-6 evalInputDelta=1.947925397871586E-5
New Minimum: -70.26738141456173 > -70.26739845890454
WOLFE (weak): th(9.283177667225559)=-70.26739845890454; dx=-3.186534868256129E-6 evalInputDelta=3.652359679051642E-5
New Minimum: -70.26739845890454 > -70.26746663623442
WOLFE (weak): th(27.849533001676676)=-70.26746663623442; dx=-3.184791043791773E-6 evalInputDelta=1.0470092666992059E-4
New Minimum: -70.26746663623442 > -70.26776856361448
WOLFE (weak): th(111.3981320067067)=-70.26776856361448; dx=-3.1827353596233863E-6 evalInputDelta=4.0662830673454664E-4
New Minimum: -70.26776856361448 > -70.26939992298418
WOLFE (weak): th(556.9906600335335)=-70.26939992298418; dx=-3.1813746232058804E-6 evalInputDelta=0.00203798767643093
New Minimum: -70.26939992298418 > -70.27956463005518
WOLFE (weak): th(3341.9439602012008)=-70.27956463005518; dx=-3.1811771160364145E-6 evalInputDelta=0.012202694747429632
New Minimum: -70.27956463005518 > -70.35270959932227
WOLFE (weak): th(23393.607721408407)=-70.35270959932227; dx=-3.1752455041337613E-6 evalInputDelta=0.08534766401452032
New Minimum: -70.35270959932227 > -70.94474114571942
WOLFE (weak): th(187148.86177126726)=-70.94474114571942; dx=-3.1227168943106572E-6 evalInputDelta=0.6773792104116723
New Minimum: -70.94474114571942 > -75.83066878001375
END: th(1684339.7559414054)=-75.83066878001375; dx=-2.523893589116929E-6 evalInputDelta=5.5633068447060054
Fitness changed from -70.26736193530775 to -75.83066878001375
Iteration 2 complete. Error: -75.83066878001375 Total: 28.9476; Orientation: 0.0639; Line Search: 25.9630
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/fae66ca1-5fa7-4801-a017-fe849f3da8f4.jpg)
Adding measurement 4c858850 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-75.83066878001375;dx=-2.472149131284144E-6
New Minimum: -75.83066878001375 > -83.6727065432586
END: th(3628800.0000000005)=-83.6727065432586; dx=-1.3962328715922511E-6 evalInputDelta=7.842037763244846
Fitness changed from -75.83066878001375 to -83.6727065432586
Iteration 3 complete. Error: -83.6727065432586 Total: 8.3655; Orientation: 0.0624; Line Search: 5.2848
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5b4d453b-5caa-4083-99d3-4e2bf7c8e585.jpg)
Adding measurement 3746c872 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.023e+04, gradient 1.228e-03, dot -0.691; [3d8b2fc4-b7ae-4516-9388-3b89cb450b4c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -83.6727065432586, -75.83066878001375, -70.26736193530775, -70.2673546305861
LBFGS Accumulation History: 3 points
Removed measurement 3746c872 to history. Total: 3
th(0)=-83.6727065432586;dx=-1.5054624567293767E-6
New Minimum: -83.6727065432586 > -92.8465653702798
END: th(7818012.603187701)=-92.8465653702798; dx=-6.229429387042705E-7 evalInputDelta=9.173858827021206
Fitness changed from -83.6727065432586 to -92.8465653702798
Iteration 4 complete. Error: -92.8465653702798 Total: 9.4882; Orientation: 1.0854; Line Search: 5.1799
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/3720abc5-8934-4c55-8968-a919dc2c355e.jpg)
Adding measurement 797da96c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.249e+04, gradient 1.202e-03, dot -0.477; [3d8b2fc4-b7ae-4516-9388-3b89cb450b4c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.8465653702798, -75.83066878001375, -70.26736193530775, -70.2673546305861
LBFGS Accumulation History: 3 points
Removed measurement 797da96c to history. Total: 3
th(0)=-92.8465653702798;dx=-1.4435196119658972E-6
New Minimum: -92.8465653702798 > -95.8158878150422
WOLF (strong): th(1.6843397559414055E7)=-95.8158878150422; dx=3.1347357460080175E-7 evalInputDelta=2.9693224447623976
New Minimum: -95.8158878150422 > -98.01600579859965
WOLF (strong): th(8421698.779707028)=-98.01600579859965; dx=1.6983906781684718E-8 evalInputDelta=5.169440428319845
END: th(2807232.926569009)=-96.32566231316723; dx=-7.502412345885504E-7 evalInputDelta=3.4790969428874234
Fitness changed from -92.8465653702798 to -98.01600579859965
Iteration 5 complete. Error: -98.01600579859965 Total: 14.5984; Orientation: 1.0285; Line Search: 10.6546
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/bf1c1284-7f22-4f4f-ab7a-db9b12cd155f.jpg)
Adding measurement 7e74481f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.144e+04, gradient 1.442e-03, dot -0.307; [3d8b2fc4-b7ae-4516-9388-3b89cb450b4c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.01600579859965, -75.83066878001375, -70.26736193530775, -70.2673546305861
LBFGS Accumulation History: 3 points
Removed measurement 7e74481f to history. Total: 3
th(0)=-98.01600579859965;dx=-2.0776601516557327E-6
New Minimum: -98.01600579859965 > -103.66479610277435
WOLF (strong): th(6048000.000000001)=-103.66479610277435; dx=3.7892050018465326E-7 evalInputDelta=5.648790304174696
END: th(3024000.0000000005)=-103.18745716676965; dx=-8.292106432631551E-7 evalInputDelta=5.171451368169997
Fitness changed from -98.01600579859965 to -103.66479610277435
Iteration 6 complete. Error: -103.66479610277435 Total: 12.0683; Orientation: 1.0268; Line Search: 7.8454
Adding measurement 67e3f8b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.905e+04, gradient 1.296e-03, dot -0.374; [3d8b2fc4-b7ae-4516-9388-3b89cb450b4c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -103.66479610277435, -75.83066878001375, -70.26736193530775, -70.2673546305861
LBFGS Accumulation History: 3 points
Removed measurement 67e3f8b1 to history. Total: 3
th(0)=-103.66479610277435;dx=-1.6775041623769785E-6
New Minimum: -103.66479610277435 > -107.49031966000322
WOLF (strong): th(6515010.502656418)=-107.49031966000322; dx=4.6399495372375115E-7 evalInputDelta=3.825523557228877
New Minimum: -107.49031966000322 > -107.75969590446084
END: th(3257505.251328209)=-107.75969590446084; dx=-4.83511767118828E-7 evalInputDelta=4.094899801686495
Fitness changed from -103.66479610277435 to -107.75969590446084
Iteration 7 complete. Error: -107.75969590446084 Total: 11.4872; Orientation: 0.9987; Line Search: 7.8834
Adding measurement 4866c6a4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.614e+04, gradient 8.415e-04, dot -0.672; [3d8b2fc4-b7ae-4516-9388-3b89cb450b4c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -107.75969590446084, -75.83066878001375, -70.26736193530775, -70.2673546305861
LBFGS Accumulation History: 3 points
Removed measurement 4866c6a4 to history. Total: 3
th(0)=-107.75969590446084;dx=-7.06583016329973E-7
New Minimum: -107.75969590446084 > -111.8870440585818
END: th(7018082.316422524)=-111.8870440585818; dx=-3.777450335640266E-7 evalInputDelta=4.127348154120952
Fitness changed from -107.75969590446084 to -111.8870440585818
Iteration 8 complete. Error: -111.8870440585818 Total: 8.6005; Orientation: 1.0333; Line Search: 5.1272
Adding measurement 72aa2ee4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.931e+04, gradient 9.295e-04, dot -0.561; [3d8b2fc4-b7ae-4516-9388-3b89cb450b4c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.8870440585818, -75.83066878001375, -70.26736193530775, -70.2673546305861
LBFGS Accumulation History: 3 points
Removed measurement 72aa2ee4 to history. Total: 3
th(0)=-111.8870440585818;dx=-8.626525831183691E-7
New Minimum: -111.8870440585818 > -113.57954459993427
WOLF (strong): th(1.5120000000000006E7)=-113.57954459993427; dx=2.0403368553082166E-7 evalInputDelta=1.692500541352473
New Minimum: -113.57954459993427 > -114.82221444037617
END: th(7560000.000000003)=-114.82221444037617; dx=-1.2113861495563862E-8 evalInputDelta=2.9351703817943786
Fitness changed from -111.8870440585818 to -114.82221444037617
Iteration 9 complete. Error: -114.82221444037617 Total: 11.7820; Orientation: 1.0428; Line Search: 8.3101
Adding measurement 61be453e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.712e+04, gradient 1.149e-03, dot -0.392; [3d8b2fc4-b7ae-4516-9388-3b89cb450b4c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -114.82221444037617, -75.83066878001375, -70.26736193530775, -70.2673546305861
LBFGS Accumulation History: 3 points
Removed measurement 61be453e to history. Total: 3
th(0)=-114.82221444037617;dx=-1.3176593308105777E-6
Armijo: th(1.6287526256641047E7)=-109.7521312650809; dx=7.436327222936135E-7 evalInputDelta=-5.070083175295267
New Minimum: -114.82221444037617 > -116.81559790954631
WOLF (strong): th(8143763.128320524)=-116.81559790954631; dx=5.812667202307274E-7 evalInputDelta=1.9933834691701406
New Minimum: -116.81559790954631 > -117.79043515541275
END: th(2714587.7094401745)=-117.79043515541275; dx=-5.751048730047832E-7 evalInputDelta=2.96822071503658
Fitness changed from -114.82221444037617 to -117.79043515541275
Iteration 10 complete. Error: -117.79043515541275 Total: 13.6725; Orientation: 1.0297; Line Search: 10.1785
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/827c0754-c41e-43e2-987a-423e58f5db49.jpg)
Final threshold in iteration 11: -117.79043515541275 (> -Infinity) after 132.701s (< 5400.000s)
Returns
-117.79043515541275