BasicOptimizer.scala:89 executed in 129.64 seconds (1.415 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: 27371979567800
Reset training subject: 27374610295800
Adding measurement 6b767c6c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-81.20863796255146;dx=-4.92635173860336E-6
New Minimum: -81.20863796255146 > -81.20864217625329
END: th(2.154434690031884)=-81.20864217625329; dx=-3.276525666803696E-6 evalInputDelta=4.2137018283483485E-6
Fitness changed from -81.20863796255146 to -81.20864217625329
Iteration 1 complete. Error: -81.20864217625329 Total: 12.8430; Orientation: 0.0619; Line Search: 5.0537
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0c82f27f-35db-4b22-bc84-3b9f65b54736.jpg)
Adding measurement 57566063 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-81.20864217625329;dx=-3.247196358985859E-6
New Minimum: -81.20864217625329 > -81.20866324475914
WOLFE (weak): th(4.641588833612779)=-81.20866324475914; dx=-3.2455719917291624E-6 evalInputDelta=2.106850584482345E-5
New Minimum: -81.20866324475914 > -81.20867588586002
WOLFE (weak): th(9.283177667225559)=-81.20867588586002; dx=-3.2446199345006904E-6 evalInputDelta=3.3709606725551566E-5
New Minimum: -81.20867588586002 > -81.20874751872788
WOLFE (weak): th(27.849533001676676)=-81.20874751872788; dx=-3.243113097312267E-6 evalInputDelta=1.0534247458338086E-4
New Minimum: -81.20874751872788 > -81.2090551179716
WOLFE (weak): th(111.3981320067067)=-81.2090551179716; dx=-3.2409595186342107E-6 evalInputDelta=4.1294171830941195E-4
New Minimum: -81.2090551179716 > -81.21071529103627
WOLFE (weak): th(556.9906600335335)=-81.21071529103627; dx=-3.2410086822302836E-6 evalInputDelta=0.002073114782973562
New Minimum: -81.21071529103627 > -81.2210716451144
WOLFE (weak): th(3341.9439602012008)=-81.2210716451144; dx=-3.2400306555821914E-6 evalInputDelta=0.012429468861114401
New Minimum: -81.2210716451144 > -81.29558329536263
WOLFE (weak): th(23393.607721408407)=-81.29558329536263; dx=-3.2342478490434195E-6 evalInputDelta=0.08694111910934055
New Minimum: -81.29558329536263 > -81.89885871648863
WOLFE (weak): th(187148.86177126726)=-81.89885871648863; dx=-3.185388670887526E-6 evalInputDelta=0.6902165402353404
New Minimum: -81.89885871648863 > -86.91830547473994
END: th(1684339.7559414054)=-86.91830547473994; dx=-2.627540134681048E-6 evalInputDelta=5.709663298486646
Fitness changed from -81.20864217625329 to -86.91830547473994
Iteration 2 complete. Error: -86.91830547473994 Total: 28.4738; Orientation: 0.0610; Line Search: 25.4885
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e186671d-eaa1-4885-beb4-f7648f36cc43.jpg)
Adding measurement 897912d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-86.91830547473994;dx=-2.5653781291115002E-6
New Minimum: -86.91830547473994 > -95.31157981101785
END: th(3628800.0000000005)=-95.31157981101785; dx=-1.557499818489299E-6 evalInputDelta=8.393274336277912
Fitness changed from -86.91830547473994 to -95.31157981101785
Iteration 3 complete. Error: -95.31157981101785 Total: 8.0707; Orientation: 0.0582; Line Search: 5.0772
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/8c456132-480b-49ab-b2eb-5dd63d25d4d4.jpg)
Adding measurement 4ad49f94 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.245e+04, gradient 1.272e-03, dot -0.736; [bd9d797c-7a0e-4e40-bb0a-3e00299d0c6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.31157981101785, -86.91830547473994, -81.20864217625329, -81.20863796255146
LBFGS Accumulation History: 3 points
Removed measurement 4ad49f94 to history. Total: 3
th(0)=-95.31157981101785;dx=-1.6153304098542498E-6
New Minimum: -95.31157981101785 > -105.68470811648822
END: th(7818012.603187701)=-105.68470811648822; dx=-7.563238273805037E-7 evalInputDelta=10.373128305470374
Fitness changed from -95.31157981101785 to -105.68470811648822
Iteration 4 complete. Error: -105.68470811648822 Total: 9.1088; Orientation: 1.0703; Line Search: 4.9534
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/14793de6-45b5-458c-8d70-07f0426ffc17.jpg)
Adding measurement 402cc553 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.388e+04, gradient 1.185e-03, dot -0.518; [bd9d797c-7a0e-4e40-bb0a-3e00299d0c6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -105.68470811648822, -86.91830547473994, -81.20864217625329, -81.20863796255146
LBFGS Accumulation History: 3 points
Removed measurement 402cc553 to history. Total: 3
th(0)=-105.68470811648822;dx=-1.4038986016059285E-6
New Minimum: -105.68470811648822 > -111.00285147662369
WOLF (strong): th(1.6843397559414055E7)=-111.00285147662369; dx=2.1931935225642627E-7 evalInputDelta=5.3181433601354655
New Minimum: -111.00285147662369 > -111.86441002857934
END: th(8421698.779707028)=-111.86441002857934; dx=-1.524986340200138E-7 evalInputDelta=6.179701912091119
Fitness changed from -105.68470811648822 to -111.86441002857934
Iteration 5 complete. Error: -111.86441002857934 Total: 11.7848; Orientation: 1.0476; Line Search: 7.5910
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0cca0f45-fba0-491d-9cee-293781a7ffe8.jpg)
Adding measurement 4c8d6829 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.422e+04, gradient 1.375e-03, dot -0.362; [bd9d797c-7a0e-4e40-bb0a-3e00299d0c6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.86441002857934, -86.91830547473994, -81.20864217625329, -81.20863796255146
LBFGS Accumulation History: 3 points
Removed measurement 4c8d6829 to history. Total: 3
th(0)=-111.86441002857934;dx=-1.8898591436776986E-6
Armijo: th(1.8144000000000004E7)=-106.91153368432136; dx=8.322325800243277E-7 evalInputDelta=-4.952876344257987
New Minimum: -111.86441002857934 > -115.64882127056367
WOLF (strong): th(9072000.000000002)=-115.64882127056367; dx=6.374438510208586E-7 evalInputDelta=3.78441124198433
New Minimum: -115.64882127056367 > -116.58205083471937
END: th(3024000.0000000005)=-116.58205083471937; dx=-7.959875297712202E-7 evalInputDelta=4.717640806140025
Fitness changed from -111.86441002857934 to -116.58205083471937
Iteration 6 complete. Error: -116.58205083471937 Total: 14.3665; Orientation: 1.0633; Line Search: 10.3368
Adding measurement 266c2207 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.279e+04, gradient 9.128e-04, dot -0.664; [bd9d797c-7a0e-4e40-bb0a-3e00299d0c6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -116.58205083471937, -86.91830547473994, -81.20864217625329, -81.20863796255146
LBFGS Accumulation History: 3 points
Removed measurement 266c2207 to history. Total: 3
th(0)=-116.58205083471937;dx=-8.308915710492886E-7
New Minimum: -116.58205083471937 > -121.18428949260279
END: th(6515010.502656418)=-121.18428949260279; dx=-4.607106768586789E-7 evalInputDelta=4.602238657883419
Fitness changed from -116.58205083471937 to -121.18428949260279
Iteration 7 complete. Error: -121.18428949260279 Total: 8.5670; Orientation: 1.0085; Line Search: 5.1181
Adding measurement 2147e70b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.539e+04, gradient 9.273e-04, dot -0.597; [bd9d797c-7a0e-4e40-bb0a-3e00299d0c6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -121.18428949260279, -86.91830547473994, -81.20864217625329, -81.20863796255146
LBFGS Accumulation History: 3 points
Removed measurement 2147e70b to history. Total: 3
th(0)=-121.18428949260279;dx=-8.596176408767412E-7
New Minimum: -121.18428949260279 > -125.40834881149391
WOLF (strong): th(1.4036164632845048E7)=-125.40834881149391; dx=2.6773168422619887E-8 evalInputDelta=4.224059318891122
END: th(7018082.316422524)=-124.96987693344843; dx=-2.117345365564782E-7 evalInputDelta=3.785587440845646
Fitness changed from -121.18428949260279 to -125.40834881149391
Iteration 8 complete. Error: -125.40834881149391 Total: 11.2421; Orientation: 1.0354; Line Search: 7.6882
Adding measurement 518a8ebd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.896e+04, gradient 1.376e-03, dot -0.258; [bd9d797c-7a0e-4e40-bb0a-3e00299d0c6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -125.40834881149391, -86.91830547473994, -81.20864217625329, -81.20863796255146
LBFGS Accumulation History: 3 points
Removed measurement 518a8ebd to history. Total: 3
th(0)=-125.40834881149391;dx=-1.8917304399178392E-6
Armijo: th(1.5120000000000006E7)=-121.34275400791375; dx=1.1873107917490455E-6 evalInputDelta=-4.065594803580154
New Minimum: -125.40834881149391 > -130.72130735499354
WOLF (strong): th(7560000.000000003)=-130.72130735499354; dx=6.041053322779671E-7 evalInputDelta=5.312958543499633
END: th(2520000.000000001)=-129.78068758435575; dx=-1.118165921629788E-6 evalInputDelta=4.372338772861838
Fitness changed from -125.40834881149391 to -130.72130735499354
Iteration 9 complete. Error: -130.72130735499354 Total: 13.5541; Orientation: 1.1125; Line Search: 9.9850
Adding measurement 7f2634b7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.351e+04, gradient 1.275e-03, dot -0.290; [bd9d797c-7a0e-4e40-bb0a-3e00299d0c6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -130.72130735499354, -86.91830547473994, -81.20864217625329, -81.20863796255146
LBFGS Accumulation History: 3 points
Removed measurement 7f2634b7 to history. Total: 3
th(0)=-130.72130735499354;dx=-1.6232811101617952E-6
New Minimum: -130.72130735499354 > -135.13037278372846
WOLF (strong): th(5429175.418880349)=-135.13037278372846; dx=2.157869180302189E-7 evalInputDelta=4.40906542873492
END: th(2714587.7094401745)=-134.45462360611756; dx=-7.341963338808593E-7 evalInputDelta=3.733316251124023
Fitness changed from -130.72130735499354 to -135.13037278372846
Iteration 10 complete. Error: -135.13037278372846 Total: 11.1849; Orientation: 1.0897; Line Search: 7.6460
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ceb58788-7b2f-4084-b710-72bce25156de.jpg)
Final threshold in iteration 11: -135.13037278372846 (> -Infinity) after 129.641s (< 5400.000s)
Returns
-135.13037278372846