BasicOptimizer.scala:89 executed in 315.72 seconds (4.100 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: 647762541883100
Reset training subject: 647768813641100
Adding measurement 15a54a7f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-37.17923686855344;dx=-1.7475724503693926E-6
New Minimum: -37.17923686855344 > -37.17924093142575
WOLFE (weak): th(2.154434690031884)=-37.17924093142575; dx=-1.578210456144189E-6 evalInputDelta=4.062872314136712E-6
New Minimum: -37.17924093142575 > -37.179244994297626
WOLFE (weak): th(4.308869380063768)=-37.179244994297626; dx=-1.578215933653428E-6 evalInputDelta=8.125744187736927E-6
New Minimum: -37.179244994297626 > -37.17925921434566
WOLFE (weak): th(12.926608140191302)=-37.17925921434566; dx=-1.5780395643338734E-6 evalInputDelta=2.2345792224598426E-5
New Minimum: -37.17925921434566 > -37.17932828307309
WOLFE (weak): th(51.70643256076521)=-37.17932828307309; dx=-1.5776886858891628E-6 evalInputDelta=9.141451965177794E-5
New Minimum: -37.17932828307309 > -37.17969190749272
WOLFE (weak): th(258.53216280382605)=-37.17969190749272; dx=-1.5782675870721808E-6 evalInputDelta=4.550389392790066E-4
New Minimum: -37.17969190749272 > -37.18196092479467
WOLFE (weak): th(1551.1929768229563)=-37.18196092479467; dx=-1.5780702542760799E-6 evalInputDelta=0.002724056241234507
New Minimum: -37.18196092479467 > -37.198294981882995
WOLFE (weak): th(10858.350837760694)=-37.198294981882995; dx=-1.577087722915357E-6 evalInputDelta=0.019058113329556647
New Minimum: -37.198294981882995 > -37.33131403354176
END: th(86866.80670208555)=-37.33131403354176; dx=-1.5691547490199544E-6 evalInputDelta=0.15207716498832013
Fitness changed from -37.17923686855344 to -37.33131403354176
Iteration 1 complete. Error: -37.33131403354176 Total: 72.6615; Orientation: 0.1602; Line Search: 54.6933
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/064291ba-8dce-49a4-8223-79139ff201fb.jpg)
Adding measurement 5326e9f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-37.33131403354176;dx=-1.5588545782139468E-6
New Minimum: -37.33131403354176 > -37.6535521226629
WOLFE (weak): th(187148.86177126726)=-37.6535521226629; dx=-1.5392613137976871E-6 evalInputDelta=0.32223808912114293
New Minimum: -37.6535521226629 > -37.97137907020874
WOLFE (weak): th(374297.7235425345)=-37.97137907020874; dx=-1.5175941383519623E-6 evalInputDelta=0.6400650366669822
New Minimum: -37.97137907020874 > -39.19626932396669
WOLFE (weak): th(1122893.1706276035)=-39.19626932396669; dx=-1.4266864199875216E-6 evalInputDelta=1.8649552904249305
New Minimum: -39.19626932396669 > -43.63695817829454
END: th(4491572.682510414)=-43.63695817829454; dx=-9.317956669075094E-7 evalInputDelta=6.305644144752783
Fitness changed from -37.33131403354176 to -43.63695817829454
Iteration 2 complete. Error: -43.63695817829454 Total: 38.2189; Orientation: 0.1441; Line Search: 30.9684
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f6de0a43-5799-422d-b918-8bd567842538.jpg)
Adding measurement 2d98e57d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-43.63695817829454;dx=-8.804833472276824E-7
New Minimum: -43.63695817829454 > -50.090093995154746
END: th(9676800.000000002)=-50.090093995154746; dx=-3.5708397210209307E-7 evalInputDelta=6.453135816860204
Fitness changed from -43.63695817829454 to -50.090093995154746
Iteration 3 complete. Error: -50.090093995154746 Total: 19.8738; Orientation: 0.1444; Line Search: 12.4475
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b68bc5c2-de9c-4283-8f4f-b0b46a8017de.jpg)
Adding measurement 388a9683 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.250e+03, gradient 8.029e-04, dot -0.479; [dde6ef0a-869c-462e-a671-a5606dce791f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.090093995154746, -43.63695817829454, -37.33131403354176, -37.17923686855344
LBFGS Accumulation History: 3 points
Removed measurement 388a9683 to history. Total: 3
th(0)=-50.090093995154746;dx=-6.444376331074111E-7
New Minimum: -50.090093995154746 > -55.376505951315686
END: th(2.0848033608500537E7)=-55.376505951315686; dx=-3.639893452677351E-8 evalInputDelta=5.28641195616094
Fitness changed from -50.090093995154746 to -55.376505951315686
Iteration 4 complete. Error: -55.376505951315686 Total: 21.9772; Orientation: 2.6612; Line Search: 12.5151
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/8b891e48-f74c-406d-81e6-7faf9696cda1.jpg)
Adding measurement 21c58ae4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.727e+03, gradient 1.010e-03, dot -0.286; [dde6ef0a-869c-462e-a671-a5606dce791f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.376505951315686, -43.63695817829454, -37.33131403354176, -37.17923686855344
LBFGS Accumulation History: 3 points
Removed measurement 21c58ae4 to history. Total: 3
th(0)=-55.376505951315686;dx=-1.0195855493217024E-6
Armijo: th(4.491572682510415E7)=-49.33224884801004; dx=2.511677954767609E-7 evalInputDelta=-6.044257103305647
New Minimum: -55.376505951315686 > -57.84102677230722
WOLF (strong): th(2.2457863412552074E7)=-57.84102677230722; dx=3.7375219856185903E-7 evalInputDelta=2.464520820991531
New Minimum: -57.84102677230722 > -61.07215499457425
END: th(7485954.470850691)=-61.07215499457425; dx=-2.9752237431820637E-7 evalInputDelta=5.6956490432585625
Fitness changed from -55.376505951315686 to -61.07215499457425
Iteration 5 complete. Error: -61.07215499457425 Total: 33.9649; Orientation: 2.5159; Line Search: 24.5825
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/13474216-630b-4858-9d84-34184415279c.jpg)
Adding measurement 71f4ce32 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.367e+04, gradient 6.988e-04, dot -0.573; [dde6ef0a-869c-462e-a671-a5606dce791f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.07215499457425, -43.63695817829454, -37.33131403354176, -37.17923686855344
LBFGS Accumulation History: 3 points
Removed measurement 71f4ce32 to history. Total: 3
th(0)=-61.07215499457425;dx=-4.87416531307046E-7
New Minimum: -61.07215499457425 > -65.54359004208405
END: th(1.6128000000000004E7)=-65.54359004208405; dx=-7.970123226005772E-8 evalInputDelta=4.4714350475098
Fitness changed from -61.07215499457425 to -65.54359004208405
Iteration 6 complete. Error: -65.54359004208405 Total: 21.5527; Orientation: 2.5373; Line Search: 11.7806
Adding measurement 47867e05 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.045e+04, gradient 8.434e-04, dot -0.427; [dde6ef0a-869c-462e-a671-a5606dce791f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.54359004208405, -43.63695817829454, -37.33131403354176, -37.17923686855344
LBFGS Accumulation History: 3 points
Removed measurement 47867e05 to history. Total: 3
th(0)=-65.54359004208405;dx=-7.109383439555742E-7
Armijo: th(3.4746722680834234E7)=-63.41479361157153; dx=2.2244076464080397E-7 evalInputDelta=-2.1287964305125158
New Minimum: -65.54359004208405 > -68.26815725828749
WOLF (strong): th(1.7373361340417117E7)=-68.26815725828749; dx=2.0473841399279539E-7 evalInputDelta=2.7245672162034396
New Minimum: -68.26815725828749 > -68.81337987307307
END: th(5791120.446805705)=-68.81337987307307; dx=-2.888303579538923E-7 evalInputDelta=3.2697898309890263
Fitness changed from -65.54359004208405 to -68.81337987307307
Iteration 7 complete. Error: -68.81337987307307 Total: 32.5717; Orientation: 2.5323; Line Search: 24.2550
Adding measurement 28ff4706 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.461e+04, gradient 5.799e-04, dot -0.713; [dde6ef0a-869c-462e-a671-a5606dce791f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.81337987307307, -43.63695817829454, -37.33131403354176, -37.17923686855344
LBFGS Accumulation History: 3 points
Removed measurement 28ff4706 to history. Total: 3
th(0)=-68.81337987307307;dx=-3.357164882265972E-7
New Minimum: -68.81337987307307 > -72.37734482049045
END: th(1.2476590784751154E7)=-72.37734482049045; dx=-2.0548461403398155E-7 evalInputDelta=3.563964947417375
Fitness changed from -68.81337987307307 to -72.37734482049045
Iteration 8 complete. Error: -72.37734482049045 Total: 20.9581; Orientation: 2.5281; Line Search: 12.6024
Adding measurement 136fdced to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.396e+04, gradient 6.206e-04, dot -0.643; [dde6ef0a-869c-462e-a671-a5606dce791f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.37734482049045, -43.63695817829454, -37.33131403354176, -37.17923686855344
LBFGS Accumulation History: 3 points
Removed measurement 136fdced to history. Total: 3
th(0)=-72.37734482049045;dx=-3.8458803391193657E-7
New Minimum: -72.37734482049045 > -76.06754852186629
END: th(2.688000000000001E7)=-76.06754852186629; dx=-1.2741738782153883E-8 evalInputDelta=3.690203701375836
Fitness changed from -72.37734482049045 to -76.06754852186629
Iteration 9 complete. Error: -76.06754852186629 Total: 19.9961; Orientation: 2.4765; Line Search: 11.7349
Adding measurement 3661ef8a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.652e+04, gradient 9.055e-04, dot -0.327; [dde6ef0a-869c-462e-a671-a5606dce791f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -76.06754852186629, -43.63695817829454, -37.33131403354176, -37.17923686855344
LBFGS Accumulation History: 3 points
Removed measurement 3661ef8a to history. Total: 3
th(0)=-76.06754852186629;dx=-8.196262393117151E-7
Armijo: th(5.791120446805706E7)=-64.72023149302917; dx=2.5532549681539925E-7 evalInputDelta=-11.34731702883711
Armijo: th(2.895560223402853E7)=-75.92336235453051; dx=3.878506544058994E-7 evalInputDelta=-0.14418616733577494
New Minimum: -76.06754852186629 > -81.5731779683162
END: th(9651867.411342843)=-81.5731779683162; dx=-1.554748937551163E-7 evalInputDelta=5.505629446449916
Fitness changed from -76.06754852186629 to -81.5731779683162
Iteration 10 complete. Error: -81.5731779683162 Total: 32.8904; Orientation: 2.4779; Line Search: 24.4755
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6f1049cd-f81f-46d5-93fe-da4e4bc1c50e.jpg)
Final threshold in iteration 11: -81.5731779683162 (> -Infinity) after 315.724s (< 5400.000s)
Returns
-81.5731779683162