BasicOptimizer.scala:89 executed in 154.73 seconds (3.035 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: 468209393655000
Reset training subject: 468212489835400
Adding measurement 185cbca3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-82.0424897727294;dx=-1.1974188997928501E-5
New Minimum: -82.0424897727294 > -82.04251347727575
END: th(2.154434690031884)=-82.04251347727575; dx=-1.0188453785863735E-5 evalInputDelta=2.3704546350700184E-5
Fitness changed from -82.0424897727294 to -82.04251347727575
Iteration 1 complete. Error: -82.04251347727575 Total: 14.7416; Orientation: 0.1051; Line Search: 5.7556
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5fc937da-89f3-40d6-9f0d-8a9d4e2b165e.jpg)
Adding measurement 7338bd14 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-82.04251347727575;dx=-1.0188068986779442E-5
New Minimum: -82.04251347727575 > -82.04256427270916
WOLFE (weak): th(4.641588833612779)=-82.04256427270916; dx=-1.0172113349225595E-5 evalInputDelta=5.0795433409689394E-5
New Minimum: -82.04256427270916 > -82.0426150681111
WOLFE (weak): th(9.283177667225559)=-82.0426150681111; dx=-1.0141648725619388E-5 evalInputDelta=1.0159083535654645E-4
New Minimum: -82.0426150681111 > -82.04281486305366
WOLFE (weak): th(27.849533001676676)=-82.04281486305366; dx=-1.0166170867302392E-5 evalInputDelta=3.0138577791660737E-4
New Minimum: -82.04281486305366 > -82.04370885480344
WOLFE (weak): th(111.3981320067067)=-82.04370885480344; dx=-1.0132343385457927E-5 evalInputDelta=0.0011953775276936085
New Minimum: -82.04370885480344 > -82.04849019075773
WOLFE (weak): th(556.9906600335335)=-82.04849019075773; dx=-1.0099212619836132E-5 evalInputDelta=0.00597671348198503
New Minimum: -82.04849019075773 > -82.07836384517442
WOLFE (weak): th(3341.9439602012008)=-82.07836384517442; dx=-1.0141569728747717E-5 evalInputDelta=0.03585036789867502
New Minimum: -82.07836384517442 > -82.29294901756471
WOLFE (weak): th(23393.607721408407)=-82.29294901756471; dx=-1.0114724964283573E-5 evalInputDelta=0.25043554028896153
New Minimum: -82.29294901756471 > -84.00902641020525
WOLFE (weak): th(187148.86177126726)=-84.00902641020525; dx=-9.726783310054606E-6 evalInputDelta=1.9665129329295041
New Minimum: -84.00902641020525 > -96.47979170723362
END: th(1684339.7559414054)=-96.47979170723362; dx=-6.146854917970157E-6 evalInputDelta=14.437278229957869
Fitness changed from -82.04251347727575 to -96.47979170723362
Iteration 2 complete. Error: -96.47979170723362 Total: 33.3727; Orientation: 0.2327; Line Search: 29.7046
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f87270d1-eee7-4a35-8aec-51b0c67ea6ec.jpg)
Adding measurement 249bd13b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-96.47979170723362;dx=-6.446687749104302E-6
New Minimum: -96.47979170723362 > -112.99324610024628
END: th(3628800.0000000005)=-112.99324610024628; dx=-2.8326578783301636E-6 evalInputDelta=16.513454393012665
Fitness changed from -96.47979170723362 to -112.99324610024628
Iteration 3 complete. Error: -112.99324610024628 Total: 9.6036; Orientation: 0.1116; Line Search: 5.8767
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5725cca6-1eeb-43e8-9c44-ef8d16dfbf7c.jpg)
Adding measurement 61627578 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.271e+03, gradient 2.129e-03, dot -0.535; [646c6622-3e42-4727-a34b-0c4c9b1b7501 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -112.99324610024628, -96.47979170723362, -82.04251347727575, -82.0424897727294
LBFGS Accumulation History: 3 points
Removed measurement 61627578 to history. Total: 3
th(0)=-112.99324610024628;dx=-4.516167987116763E-6
New Minimum: -112.99324610024628 > -129.50518913259475
END: th(7818012.603187701)=-129.50518913259475; dx=-7.422777536061647E-7 evalInputDelta=16.51194303234847
Fitness changed from -112.99324610024628 to -129.50518913259475
Iteration 4 complete. Error: -129.50518913259475 Total: 11.3417; Orientation: 1.8790; Line Search: 5.7691
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c0496eb8-0497-4628-ba31-e17004bce569.jpg)
Adding measurement 36611bb0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.052e+04, gradient 2.355e-03, dot -0.298; [646c6622-3e42-4727-a34b-0c4c9b1b7501 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -129.50518913259475, -96.47979170723362, -82.04251347727575, -82.0424897727294
LBFGS Accumulation History: 3 points
Removed measurement 36611bb0 to history. Total: 3
th(0)=-129.50518913259475;dx=-5.529443296759551E-6
New Minimum: -129.50518913259475 > -130.96722998779373
WOLF (strong): th(1.6843397559414055E7)=-130.96722998779373; dx=1.1711226761573294E-6 evalInputDelta=1.4620408551989783
New Minimum: -130.96722998779373 > -142.10815375889098
WOLF (strong): th(8421698.779707028)=-142.10815375889098; dx=7.775779333688202E-7 evalInputDelta=12.602964626296227
END: th(2807232.926569009)=-140.9133542800305; dx=-2.2551269430725973E-6 evalInputDelta=11.408165147435739
Fitness changed from -129.50518913259475 to -142.10815375889098
Iteration 5 complete. Error: -142.10815375889098 Total: 17.4070; Orientation: 1.8411; Line Search: 11.8401
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/194c3eb2-1a04-4a8b-9bb0-e8d1599a8ea4.jpg)
Adding measurement 7dd04910 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.389e+04, gradient 2.447e-03, dot -0.232; [646c6622-3e42-4727-a34b-0c4c9b1b7501 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -142.10815375889098, -96.47979170723362, -82.04251347727575, -82.0424897727294
LBFGS Accumulation History: 3 points
Removed measurement 7dd04910 to history. Total: 3
th(0)=-142.10815375889098;dx=-5.984050080234533E-6
New Minimum: -142.10815375889098 > -159.71595826519962
WOLF (strong): th(6048000.000000001)=-159.71595826519962; dx=6.137879117419077E-8 evalInputDelta=17.60780450630864
END: th(3024000.0000000005)=-156.07135020041332; dx=-2.692823904596113E-6 evalInputDelta=13.963196441522342
Fitness changed from -142.10815375889098 to -159.71595826519962
Iteration 6 complete. Error: -159.71595826519962 Total: 14.2184; Orientation: 1.8953; Line Search: 8.8346
Adding measurement 39f4f492 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.659e+04, gradient 1.847e-03, dot -0.413; [646c6622-3e42-4727-a34b-0c4c9b1b7501 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -159.71595826519962, -96.47979170723362, -82.04251347727575, -82.0424897727294
LBFGS Accumulation History: 3 points
Removed measurement 39f4f492 to history. Total: 3
th(0)=-159.71595826519962;dx=-3.4095329438909748E-6
New Minimum: -159.71595826519962 > -170.34876653705646
END: th(6515010.502656418)=-170.34876653705646; dx=-1.3684756613917092E-7 evalInputDelta=10.632808271856845
Fitness changed from -159.71595826519962 to -170.34876653705646
Iteration 7 complete. Error: -170.34876653705646 Total: 11.4360; Orientation: 1.9644; Line Search: 6.7253
Adding measurement 63b84da7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.282e+04, gradient 1.763e-03, dot -0.432; [646c6622-3e42-4727-a34b-0c4c9b1b7501 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -170.34876653705646, -96.47979170723362, -82.04251347727575, -82.0424897727294
LBFGS Accumulation History: 3 points
Removed measurement 63b84da7 to history. Total: 3
th(0)=-170.34876653705646;dx=-3.107005010561916E-6
New Minimum: -170.34876653705646 > -173.41286553476306
WOLF (strong): th(1.4036164632845048E7)=-173.41286553476306; dx=9.63104201543527E-7 evalInputDelta=3.064098997706594
New Minimum: -173.41286553476306 > -179.25351343254965
WOLF (strong): th(7018082.316422524)=-179.25351343254965; dx=1.7278150983452673E-7 evalInputDelta=8.90474689549319
END: th(2339360.7721408415)=-176.30734232788657; dx=-1.7471917328175361E-6 evalInputDelta=5.9585757908301105
Fitness changed from -170.34876653705646 to -179.25351343254965
Iteration 8 complete. Error: -179.25351343254965 Total: 18.0146; Orientation: 1.9346; Line Search: 12.9737
Adding measurement 6b823ac7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.721e+04, gradient 1.795e-03, dot -0.401; [646c6622-3e42-4727-a34b-0c4c9b1b7501 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -179.25351343254965, -96.47979170723362, -82.04251347727575, -82.0424897727294
LBFGS Accumulation History: 3 points
Removed measurement 6b823ac7 to history. Total: 3
th(0)=-179.25351343254965;dx=-3.215165949133248E-6
New Minimum: -179.25351343254965 > -188.22663158118047
END: th(5040000.000000002)=-188.22663158118047; dx=-3.1935203198736113E-7 evalInputDelta=8.973118148630817
Fitness changed from -179.25351343254965 to -188.22663158118047
Iteration 9 complete. Error: -188.22663158118047 Total: 10.5242; Orientation: 1.7955; Line Search: 5.7441
Adding measurement 7c4592b6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.463e+04, gradient 1.429e-03, dot -0.524; [646c6622-3e42-4727-a34b-0c4c9b1b7501 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -188.22663158118047, -96.47979170723362, -82.04251347727575, -82.0424897727294
LBFGS Accumulation History: 3 points
Removed measurement 7c4592b6 to history. Total: 3
th(0)=-188.22663158118047;dx=-2.0365976095508444E-6
New Minimum: -188.22663158118047 > -195.1196357536597
WOLF (strong): th(1.0858350837760698E7)=-195.1196357536597; dx=1.7487016997407572E-7 evalInputDelta=6.8930041724792375
END: th(5429175.418880349)=-194.90012178572272; dx=-5.073642322343891E-7 evalInputDelta=6.673490204542247
Fitness changed from -188.22663158118047 to -195.1196357536597
Iteration 10 complete. Error: -195.1196357536597 Total: 13.4592; Orientation: 1.8188; Line Search: 8.8073
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c8510e64-3c4b-45f2-ab40-31eeabd246a3.jpg)
Final threshold in iteration 11: -195.1196357536597 (> -Infinity) after 154.731s (< 5400.000s)
Returns
-195.1196357536597