BasicOptimizer.scala:89 executed in 125.95 seconds (1.081 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: 28718492543900
Reset training subject: 28721094237200
Adding measurement 6d0d8da1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-75.58520668715724;dx=-4.814716518188477E-6
New Minimum: -75.58520668715724 > -75.58521574154736
END: th(2.154434690031884)=-75.58521574154736; dx=-3.769254810912711E-6 evalInputDelta=9.054390119445088E-6
Fitness changed from -75.58520668715724 to -75.58521574154736
Iteration 1 complete. Error: -75.58521574154736 Total: 12.9008; Orientation: 0.0635; Line Search: 5.2180
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f29a67e2-b0b4-471d-bdd0-a1fea4a2a517.jpg)
Adding measurement 6879ec37 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-75.58521574154736;dx=-3.736347480953145E-6
New Minimum: -75.58521574154736 > -75.58523611392117
WOLFE (weak): th(4.641588833612779)=-75.58523611392117; dx=-3.7354510070083906E-6 evalInputDelta=2.037237381102841E-5
New Minimum: -75.58523611392117 > -75.5852564862895
WOLFE (weak): th(9.283177667225559)=-75.5852564862895; dx=-3.7359157690443735E-6 evalInputDelta=4.07447421366669E-5
New Minimum: -75.5852564862895 > -75.58533344852026
WOLFE (weak): th(27.849533001676676)=-75.58533344852026; dx=-3.7362307878582704E-6 evalInputDelta=1.1770697290103271E-4
New Minimum: -75.58533344852026 > -75.5856888319224
WOLFE (weak): th(111.3981320067067)=-75.5856888319224; dx=-3.7343562870978473E-6 evalInputDelta=4.730903750385096E-4
New Minimum: -75.5856888319224 > -75.58758795439196
WOLFE (weak): th(556.9906600335335)=-75.58758795439196; dx=-3.7348101792604508E-6 evalInputDelta=0.002372212844605315
New Minimum: -75.58758795439196 > -75.59945921791589
WOLFE (weak): th(3341.9439602012008)=-75.59945921791589; dx=-3.7328920980150994E-6 evalInputDelta=0.014243476368534402
New Minimum: -75.59945921791589 > -75.68466032890811
WOLFE (weak): th(23393.607721408407)=-75.68466032890811; dx=-3.7109096149313905E-6 evalInputDelta=0.09944458736075035
New Minimum: -75.68466032890811 > -76.35137010923332
WOLFE (weak): th(187148.86177126726)=-76.35137010923332; dx=-3.4339735699596487E-6 evalInputDelta=0.7661543676859566
New Minimum: -76.35137010923332 > -80.72679590045537
END: th(1684339.7559414054)=-80.72679590045537; dx=-1.7567309772036755E-6 evalInputDelta=5.141580158908013
Fitness changed from -75.58521574154736 to -80.72679590045537
Iteration 2 complete. Error: -80.72679590045537 Total: 28.0862; Orientation: 0.0639; Line Search: 25.1006
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3beef0af-55b2-46c6-b06c-6fe6a2b1db27.jpg)
Adding measurement 5e6775fd to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-80.72679590045537;dx=-1.810781506352177E-6
New Minimum: -80.72679590045537 > -86.53334503902141
END: th(3628800.0000000005)=-86.53334503902141; dx=-1.0984132858682966E-6 evalInputDelta=5.806549138566041
Fitness changed from -80.72679590045537 to -86.53334503902141
Iteration 3 complete. Error: -86.53334503902141 Total: 7.9511; Orientation: 0.0633; Line Search: 5.0037
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/df6de445-65b9-4318-a4da-bb5c2accc258.jpg)
Adding measurement 74d7c00a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.545e+03, gradient 1.181e-03, dot -0.710; [9823ca80-3b90-4193-ae93-7d3d0cd4bd34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.53334503902141, -80.72679590045537, -75.58521574154736, -75.58520668715724
LBFGS Accumulation History: 3 points
Removed measurement 74d7c00a to history. Total: 3
th(0)=-86.53334503902141;dx=-1.393069980395158E-6
New Minimum: -86.53334503902141 > -93.2692221024127
END: th(7818012.603187701)=-93.2692221024127; dx=-3.8576256284793214E-7 evalInputDelta=6.7358770633912854
Fitness changed from -86.53334503902141 to -93.2692221024127
Iteration 4 complete. Error: -93.2692221024127 Total: 9.1913; Orientation: 1.2915; Line Search: 5.1304
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/319b6195-196e-4c59-91b2-0f340e4e57a2.jpg)
Adding measurement 7b67aaa2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.515e+03, gradient 1.471e-03, dot -0.366; [9823ca80-3b90-4193-ae93-7d3d0cd4bd34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.2692221024127, -80.72679590045537, -75.58521574154736, -75.58520668715724
LBFGS Accumulation History: 3 points
Removed measurement 7b67aaa2 to history. Total: 3
th(0)=-93.2692221024127;dx=-2.161410588415996E-6
Armijo: th(1.6843397559414055E7)=-86.75090854837946; dx=7.425392631754443E-7 evalInputDelta=-6.5183135540332415
New Minimum: -93.2692221024127 > -94.69951146846836
WOLF (strong): th(8421698.779707028)=-94.69951146846836; dx=8.176790117192345E-7 evalInputDelta=1.4302893660556606
New Minimum: -94.69951146846836 > -97.51928956441049
END: th(2807232.926569009)=-97.51928956441049; dx=-4.7102795424189667E-7 evalInputDelta=4.250067461997787
Fitness changed from -93.2692221024127 to -97.51928956441049
Iteration 5 complete. Error: -97.51928956441049 Total: 13.9848; Orientation: 1.0671; Line Search: 9.9686
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c6784812-48bb-4fd1-8b35-d626b6bb5d4c.jpg)
Adding measurement 4b6e75f1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.905e+04, gradient 1.015e-03, dot -0.677; [9823ca80-3b90-4193-ae93-7d3d0cd4bd34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.51928956441049, -80.72679590045537, -75.58521574154736, -75.58520668715724
LBFGS Accumulation History: 3 points
Removed measurement 4b6e75f1 to history. Total: 3
th(0)=-97.51928956441049;dx=-1.0302328756318042E-6
New Minimum: -97.51928956441049 > -101.43567432395396
END: th(6048000.000000001)=-101.43567432395396; dx=-2.2681155712431803E-7 evalInputDelta=3.916384759543476
Fitness changed from -97.51928956441049 to -101.43567432395396
Iteration 6 complete. Error: -101.43567432395396 Total: 8.9760; Orientation: 1.1085; Line Search: 5.0758
Adding measurement 27d60a52 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.023e+04, gradient 1.283e-03, dot -0.475; [9823ca80-3b90-4193-ae93-7d3d0cd4bd34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -101.43567432395396, -80.72679590045537, -75.58521574154736, -75.58520668715724
LBFGS Accumulation History: 3 points
Removed measurement 27d60a52 to history. Total: 3
th(0)=-101.43567432395396;dx=-1.6447280067914192E-6
Armijo: th(1.3030021005312836E7)=-98.15238711865547; dx=7.191116194819911E-7 evalInputDelta=-3.2832872052984925
New Minimum: -101.43567432395396 > -103.45727423133253
WOLF (strong): th(6515010.502656418)=-103.45727423133253; dx=5.604418318579966E-7 evalInputDelta=2.0215999073785724
New Minimum: -103.45727423133253 > -104.22620129270344
END: th(2171670.167552139)=-104.22620129270344; dx=-5.835158762153342E-7 evalInputDelta=2.790526968749475
Fitness changed from -101.43567432395396 to -104.22620129270344
Iteration 7 complete. Error: -104.22620129270344 Total: 13.7023; Orientation: 1.1000; Line Search: 10.2055
Adding measurement 3756acb1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.852e+04, gradient 8.420e-04, dot -0.800; [9823ca80-3b90-4193-ae93-7d3d0cd4bd34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -104.22620129270344, -80.72679590045537, -75.58521574154736, -75.58520668715724
LBFGS Accumulation History: 3 points
Removed measurement 3756acb1 to history. Total: 3
th(0)=-104.22620129270344;dx=-7.086953998716522E-7
New Minimum: -104.22620129270344 > -107.42458062002001
END: th(4678721.544281682)=-107.42458062002001; dx=-5.262267162431966E-7 evalInputDelta=3.198379327316573
Fitness changed from -104.22620129270344 to -107.42458062002001
Iteration 8 complete. Error: -107.42458062002001 Total: 8.6279; Orientation: 1.0742; Line Search: 5.1501
Adding measurement 31f3d1ce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.252e+04, gradient 8.643e-04, dot -0.756; [9823ca80-3b90-4193-ae93-7d3d0cd4bd34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -107.42458062002001, -80.72679590045537, -75.58521574154736, -75.58520668715724
LBFGS Accumulation History: 3 points
Removed measurement 31f3d1ce to history. Total: 3
th(0)=-107.42458062002001;dx=-7.465197331648634E-7
New Minimum: -107.42458062002001 > -111.89205962922651
END: th(1.0080000000000002E7)=-111.89205962922651; dx=-1.907465311773204E-7 evalInputDelta=4.4674790092064995
Fitness changed from -107.42458062002001 to -111.89205962922651
Iteration 9 complete. Error: -111.89205962922651 Total: 8.6129; Orientation: 1.0916; Line Search: 5.0512
Adding measurement 733b45cf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.090e+04, gradient 1.281e-03, dot -0.414; [9823ca80-3b90-4193-ae93-7d3d0cd4bd34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.89205962922651, -80.72679590045537, -75.58521574154736, -75.58520668715724
LBFGS Accumulation History: 3 points
Removed measurement 733b45cf to history. Total: 3
th(0)=-111.89205962922651;dx=-1.6407714313707112E-6
Armijo: th(2.1716701675521392E7)=-98.95518271044723; dx=7.961428913859998E-7 evalInputDelta=-12.936876918779276
Armijo: th(1.0858350837760696E7)=-110.31445134975093; dx=9.203918219225899E-7 evalInputDelta=-1.5776082794755837
New Minimum: -111.89205962922651 > -115.62572208069447
END: th(3619450.2792535652)=-115.62572208069447; dx=-1.207641792069016E-7 evalInputDelta=3.733662451467964
Fitness changed from -111.89205962922651 to -115.62572208069447
Iteration 10 complete. Error: -115.62572208069447 Total: 13.5060; Orientation: 1.0946; Line Search: 10.0212
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/15c4bb2c-5445-4576-aa87-c9c68f34d36c.jpg)
Final threshold in iteration 11: -115.62572208069447 (> -Infinity) after 125.952s (< 5400.000s)
Returns
-115.62572208069447