BasicOptimizer.scala:89 executed in 112.56 seconds (1.545 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: 47521614384000
Reset training subject: 47523899945500
Adding measurement 2ea2e440 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-47.843397652171575;dx=-1.661793291708683E-6
New Minimum: -47.843397652171575 > -47.843399480050365
END: th(2.154434690031884)=-47.843399480050365; dx=-1.324619694648627E-6 evalInputDelta=1.8278787905501304E-6
Fitness changed from -47.843397652171575 to -47.843399480050365
Iteration 1 complete. Error: -47.843399480050365 Total: 11.3800; Orientation: 0.0660; Line Search: 4.5437
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0f46dce5-56b7-46fb-9f08-6cb702c6bbe3.jpg)
Adding measurement 3c7474a3 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-47.843399480050365;dx=-1.3115014192656827E-6
New Minimum: -47.843399480050365 > -47.84340861944329
WOLFE (weak): th(4.641588833612779)=-47.84340861944329; dx=-1.3095763835699317E-6 evalInputDelta=9.139392922463685E-6
New Minimum: -47.84340861944329 > -47.84341593095637
WOLFE (weak): th(9.283177667225559)=-47.84341593095637; dx=-1.3083650723669317E-6 evalInputDelta=1.645090600277399E-5
New Minimum: -47.84341593095637 > -47.84344152124335
WOLFE (weak): th(27.849533001676676)=-47.84344152124335; dx=-1.3073040297195535E-6 evalInputDelta=4.204119298378828E-5
New Minimum: -47.84344152124335 > -47.843558505238114
WOLFE (weak): th(111.3981320067067)=-47.843558505238114; dx=-1.3052476724499138E-6 evalInputDelta=1.5902518774879582E-4
New Minimum: -47.843558505238114 > -47.84419094500653
WOLFE (weak): th(556.9906600335335)=-47.84419094500653; dx=-1.3059407810915987E-6 evalInputDelta=7.914649561655551E-4
New Minimum: -47.84419094500653 > -47.84813710722548
WOLFE (weak): th(3341.9439602012008)=-47.84813710722548; dx=-1.3042995720080173E-6 evalInputDelta=0.004737627175117609
New Minimum: -47.84813710722548 > -47.87653475908803
WOLFE (weak): th(23393.607721408407)=-47.87653475908803; dx=-1.3036979197217467E-6 evalInputDelta=0.033135279037665555
New Minimum: -47.87653475908803 > -48.10709918473351
WOLFE (weak): th(187148.86177126726)=-48.10709918473351; dx=-1.2882364860570322E-6 evalInputDelta=0.2636997046831411
New Minimum: -48.10709918473351 > -50.0843371946376
END: th(1684339.7559414054)=-50.0843371946376; dx=-1.1495043450920184E-6 evalInputDelta=2.2409377145872327
Fitness changed from -47.843399480050365 to -50.0843371946376
Iteration 2 complete. Error: -50.0843371946376 Total: 25.5587; Orientation: 0.0660; Line Search: 22.7864
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7b4556c5-00c4-4cda-bef1-a0fb050e745c.jpg)
Adding measurement 34d876fc to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-50.0843371946376;dx=-1.1611501665137304E-6
New Minimum: -50.0843371946376 > -53.94366035512687
END: th(3628800.0000000005)=-53.94366035512687; dx=-8.682213294743882E-7 evalInputDelta=3.859323160489275
Fitness changed from -50.0843371946376 to -53.94366035512687
Iteration 3 complete. Error: -53.94366035512687 Total: 7.5195; Orientation: 0.0644; Line Search: 4.6140
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/374fa913-db85-4073-b579-0d377bd03372.jpg)
Adding measurement 38f24fbe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.668e+04, gradient 9.123e-04, dot -0.886; [1d34e5f9-1381-426a-bc0a-81af5c3dbccb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.94366035512687, -50.0843371946376, -47.843399480050365, -47.843397652171575
LBFGS Accumulation History: 3 points
Removed measurement 38f24fbe to history. Total: 3
th(0)=-53.94366035512687;dx=-8.31717285294587E-7
New Minimum: -53.94366035512687 > -59.748232172711255
END: th(7818012.603187701)=-59.748232172711255; dx=-5.678517632955992E-7 evalInputDelta=5.804571817584382
Fitness changed from -53.94366035512687 to -59.748232172711255
Iteration 4 complete. Error: -59.748232172711255 Total: 8.8010; Orientation: 1.2688; Line Search: 4.7724
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b7fe478b-0fc7-4ccc-b8f3-ab1647918d98.jpg)
Adding measurement 79ba3f9c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.533e+04, gradient 7.683e-04, dot -0.769; [1d34e5f9-1381-426a-bc0a-81af5c3dbccb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.748232172711255, -50.0843371946376, -47.843399480050365, -47.843397652171575
LBFGS Accumulation History: 3 points
Removed measurement 79ba3f9c to history. Total: 3
th(0)=-59.748232172711255;dx=-5.896681506856913E-7
New Minimum: -59.748232172711255 > -67.7018348605191
END: th(1.6843397559414055E7)=-67.7018348605191; dx=-3.297804667739033E-7 evalInputDelta=7.9536026878078445
Fitness changed from -59.748232172711255 to -67.7018348605191
Iteration 5 complete. Error: -67.7018348605191 Total: 8.9820; Orientation: 1.0534; Line Search: 4.5811
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/fa3a2f2a-fa07-4760-95f4-f432b99bd842.jpg)
Adding measurement 74819af3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.913e+04, gradient 6.894e-04, dot -0.612; [1d34e5f9-1381-426a-bc0a-81af5c3dbccb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.7018348605191, -50.0843371946376, -47.843399480050365, -47.843397652171575
LBFGS Accumulation History: 3 points
Removed measurement 74819af3 to history. Total: 3
th(0)=-67.7018348605191;dx=-4.742268146132809E-7
New Minimum: -67.7018348605191 > -76.14942667696732
END: th(3.628800000000001E7)=-76.14942667696732; dx=-9.335142455697949E-8 evalInputDelta=8.447591816448224
Fitness changed from -67.7018348605191 to -76.14942667696732
Iteration 6 complete. Error: -76.14942667696732 Total: 8.4469; Orientation: 1.0608; Line Search: 4.6402
Adding measurement 6de39232 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.983e+04, gradient 8.320e-04, dot -0.299; [1d34e5f9-1381-426a-bc0a-81af5c3dbccb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -76.14942667696732, -50.0843371946376, -47.843399480050365, -47.843397652171575
LBFGS Accumulation History: 3 points
Removed measurement 6de39232 to history. Total: 3
th(0)=-76.14942667696732;dx=-6.914596169396968E-7
Armijo: th(7.818012603187701E7)=-71.51063355328854; dx=1.4587714708166325E-7 evalInputDelta=-4.638793123678781
New Minimum: -76.14942667696732 > -79.4131908095926
WOLF (strong): th(3.9090063015938506E7)=-79.4131908095926; dx=1.714587101034931E-7 evalInputDelta=3.2637641326252833
New Minimum: -79.4131908095926 > -81.98677924079063
END: th(1.3030021005312836E7)=-81.98677924079063; dx=-1.6523630464339442E-7 evalInputDelta=5.837352563823302
Fitness changed from -76.14942667696732 to -81.98677924079063
Iteration 7 complete. Error: -81.98677924079063 Total: 12.5293; Orientation: 1.0289; Line Search: 9.3023
Adding measurement 33211931 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.192e+04, gradient 5.847e-04, dot -0.533; [1d34e5f9-1381-426a-bc0a-81af5c3dbccb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.98677924079063, -50.0843371946376, -47.843399480050365, -47.843397652171575
LBFGS Accumulation History: 3 points
Removed measurement 33211931 to history. Total: 3
th(0)=-81.98677924079063;dx=-3.4133051427983413E-7
New Minimum: -81.98677924079063 > -87.01725455238676
END: th(2.8072329265690096E7)=-87.01725455238676; dx=-5.715941131968639E-8 evalInputDelta=5.030475311596135
Fitness changed from -81.98677924079063 to -87.01725455238676
Iteration 8 complete. Error: -87.01725455238676 Total: 7.8961; Orientation: 0.9977; Line Search: 4.6422
Adding measurement 2eb59b8e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.550e+04, gradient 7.071e-04, dot -0.383; [1d34e5f9-1381-426a-bc0a-81af5c3dbccb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.01725455238676, -50.0843371946376, -47.843399480050365, -47.843397652171575
LBFGS Accumulation History: 3 points
Removed measurement 2eb59b8e to history. Total: 3
th(0)=-87.01725455238676;dx=-4.997093991903991E-7
Armijo: th(6.048000000000002E7)=-84.05842554002531; dx=1.430701193134369E-7 evalInputDelta=-2.9588290123614485
New Minimum: -87.01725455238676 > -89.59845937934759
WOLF (strong): th(3.024000000000001E7)=-89.59845937934759; dx=1.325582239312619E-7 evalInputDelta=2.5812048269608283
New Minimum: -89.59845937934759 > -90.57599802351697
END: th(1.0080000000000004E7)=-90.57599802351697; dx=-1.7178115342439323E-7 evalInputDelta=3.5587434711302137
Fitness changed from -87.01725455238676 to -90.57599802351697
Iteration 9 complete. Error: -90.57599802351697 Total: 12.8520; Orientation: 1.0457; Line Search: 9.3600
Adding measurement 52dd44ab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.410e+04, gradient 4.830e-04, dot -0.610; [1d34e5f9-1381-426a-bc0a-81af5c3dbccb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.57599802351697, -50.0843371946376, -47.843399480050365, -47.843397652171575
LBFGS Accumulation History: 3 points
Removed measurement 52dd44ab to history. Total: 3
th(0)=-90.57599802351697;dx=-2.3267678461616324E-7
New Minimum: -90.57599802351697 > -94.23691922662319
END: th(2.1716701675521396E7)=-94.23691922662319; dx=-1.1813641214954095E-7 evalInputDelta=3.660921203106213
Fitness changed from -90.57599802351697 to -94.23691922662319
Iteration 10 complete. Error: -94.23691922662319 Total: 8.0950; Orientation: 1.0632; Line Search: 4.5555
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/7c396204-1373-4f9c-9866-2275accf2c31.jpg)
Final threshold in iteration 11: -94.23691922662319 (> -Infinity) after 112.556s (< 5400.000s)
Returns
-94.23691922662319