BasicOptimizer.scala:89 executed in 110.76 seconds (1.372 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: 41579788936500
Reset training subject: 41582255699800
Adding measurement 14549c01 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-49.37259578269753;dx=-1.6783180333280389E-6
New Minimum: -49.37259578269753 > -49.3725993252267
END: th(2.154434690031884)=-49.3725993252267; dx=-1.2569635651833035E-6 evalInputDelta=3.5425291713409024E-6
Fitness changed from -49.37259578269753 to -49.3725993252267
Iteration 1 complete. Error: -49.3725993252267 Total: 12.1838; Orientation: 0.0685; Line Search: 4.8863
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f23734cb-b0cc-4f93-9eb1-8d613c597e76.jpg)
Adding measurement 5c2cdea7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-49.3725993252267;dx=-1.2394419622605633E-6
New Minimum: -49.3725993252267 > -49.37260463902
WOLFE (weak): th(4.641588833612779)=-49.37260463902; dx=-1.2369631640032886E-6 evalInputDelta=5.313793295158575E-6
New Minimum: -49.37260463902 > -49.37261172407682
WOLFE (weak): th(9.283177667225559)=-49.37261172407682; dx=-1.2358036491587048E-6 evalInputDelta=1.2398850117278926E-5
New Minimum: -49.37261172407682 > -49.37263652176771
WOLFE (weak): th(27.849533001676676)=-49.37263652176771; dx=-1.2352134717552445E-6 evalInputDelta=3.71965410081998E-5
New Minimum: -49.37263652176771 > -49.37274988248174
WOLFE (weak): th(111.3981320067067)=-49.37274988248174; dx=-1.2331532637923242E-6 evalInputDelta=1.5055725503998474E-4
New Minimum: -49.37274988248174 > -49.373345021960276
WOLFE (weak): th(556.9906600335335)=-49.373345021960276; dx=-1.2321408570811414E-6 evalInputDelta=7.456967335741638E-4
New Minimum: -49.373345021960276 > -49.37707333670452
WOLFE (weak): th(3341.9439602012008)=-49.37707333670452; dx=-1.2337993490343885E-6 evalInputDelta=0.004474011477817896
New Minimum: -49.37707333670452 > -49.40390181651999
WOLFE (weak): th(23393.607721408407)=-49.40390181651999; dx=-1.2323512258231507E-6 evalInputDelta=0.03130249129328888
New Minimum: -49.40390181651999 > -49.62166273414899
WOLFE (weak): th(187148.86177126726)=-49.62166273414899; dx=-1.2178449049634746E-6 evalInputDelta=0.2490634089222894
New Minimum: -49.62166273414899 > -51.491746012673204
END: th(1684339.7559414054)=-51.491746012673204; dx=-1.0895380925727398E-6 evalInputDelta=2.119146687446502
Fitness changed from -49.3725993252267 to -51.491746012673204
Iteration 2 complete. Error: -51.491746012673204 Total: 25.5623; Orientation: 0.0643; Line Search: 22.6588
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/98481751-8f0b-4dc2-a7ce-7cef5cfca3b5.jpg)
Adding measurement 5fc0ff3c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-51.491746012673204;dx=-1.1035257988972399E-6
New Minimum: -51.491746012673204 > -55.14387051516729
END: th(3628800.0000000005)=-55.14387051516729; dx=-8.257182128369168E-7 evalInputDelta=3.6521245024940896
Fitness changed from -51.491746012673204 to -55.14387051516729
Iteration 3 complete. Error: -55.14387051516729 Total: 7.3847; Orientation: 0.0578; Line Search: 4.5471
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/6da8c40b-7746-4da7-98a6-738b9fe15115.jpg)
Adding measurement 44ccdb8c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.749e+04, gradient 8.859e-04, dot -0.894; [ad128f71-20cb-435b-bc3b-af2e1e0d312d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.14387051516729, -51.491746012673204, -49.3725993252267, -49.37259578269753
LBFGS Accumulation History: 3 points
Removed measurement 44ccdb8c to history. Total: 3
th(0)=-55.14387051516729;dx=-7.83168889915461E-7
New Minimum: -55.14387051516729 > -60.65398797861169
END: th(7818012.603187701)=-60.65398797861169; dx=-5.432569607226647E-7 evalInputDelta=5.510117463444395
Fitness changed from -55.14387051516729 to -60.65398797861169
Iteration 4 complete. Error: -60.65398797861169 Total: 8.3100; Orientation: 1.1248; Line Search: 4.3958
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b7139e31-3cc1-4dcd-8474-202ad5cfa075.jpg)
Adding measurement 2719e241 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.500e+04, gradient 7.487e-04, dot -0.777; [ad128f71-20cb-435b-bc3b-af2e1e0d312d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.65398797861169, -51.491746012673204, -49.3725993252267, -49.37259578269753
LBFGS Accumulation History: 3 points
Removed measurement 2719e241 to history. Total: 3
th(0)=-60.65398797861169;dx=-5.596452840491542E-7
New Minimum: -60.65398797861169 > -68.38685440177467
END: th(1.6843397559414055E7)=-68.38685440177467; dx=-3.2763754550192915E-7 evalInputDelta=7.732866423162982
Fitness changed from -60.65398797861169 to -68.38685440177467
Iteration 5 complete. Error: -68.38685440177467 Total: 8.2130; Orientation: 1.1176; Line Search: 4.4718
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8e3ed6ba-0e9e-4f29-9c08-86abee24753c.jpg)
Adding measurement 7659109e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.910e+04, gradient 6.682e-04, dot -0.635; [ad128f71-20cb-435b-bc3b-af2e1e0d312d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.38685440177467, -51.491746012673204, -49.3725993252267, -49.37259578269753
LBFGS Accumulation History: 3 points
Removed measurement 7659109e to history. Total: 3
th(0)=-68.38685440177467;dx=-4.4578665155725175E-7
New Minimum: -68.38685440177467 > -77.40001607880629
END: th(3.628800000000001E7)=-77.40001607880629; dx=-1.1583470675317226E-7 evalInputDelta=9.013161677031619
Fitness changed from -68.38685440177467 to -77.40001607880629
Iteration 6 complete. Error: -77.40001607880629 Total: 8.1778; Orientation: 1.0460; Line Search: 4.6200
Adding measurement 29043646 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.154e+04, gradient 7.845e-04, dot -0.336; [ad128f71-20cb-435b-bc3b-af2e1e0d312d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.40001607880629, -51.491746012673204, -49.3725993252267, -49.37259578269753
LBFGS Accumulation History: 3 points
Removed measurement 29043646 to history. Total: 3
th(0)=-77.40001607880629;dx=-6.143464227928743E-7
Armijo: th(7.818012603187701E7)=-74.3117013647619; dx=1.2944372837701624E-7 evalInputDelta=-3.0883147140443867
New Minimum: -77.40001607880629 > -80.99486604525475
WOLF (strong): th(3.9090063015938506E7)=-80.99486604525475; dx=1.3363061909777382E-7 evalInputDelta=3.5948499664484643
New Minimum: -80.99486604525475 > -82.63282226961657
END: th(1.3030021005312836E7)=-82.63282226961657; dx=-1.642458310453911E-7 evalInputDelta=5.23280619081028
Fitness changed from -77.40001607880629 to -82.63282226961657
Iteration 7 complete. Error: -82.63282226961657 Total: 12.3553; Orientation: 1.0703; Line Search: 9.1133
Adding measurement 5875a1be to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.380e+04, gradient 5.744e-04, dot -0.556; [ad128f71-20cb-435b-bc3b-af2e1e0d312d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.63282226961657, -51.491746012673204, -49.3725993252267, -49.37259578269753
LBFGS Accumulation History: 3 points
Removed measurement 5875a1be to history. Total: 3
th(0)=-82.63282226961657;dx=-3.2958245001518514E-7
New Minimum: -82.63282226961657 > -87.60688156806245
END: th(2.8072329265690096E7)=-87.60688156806245; dx=-6.695499218988507E-8 evalInputDelta=4.97405929844588
Fitness changed from -82.63282226961657 to -87.60688156806245
Iteration 8 complete. Error: -87.60688156806245 Total: 8.0500; Orientation: 1.0758; Line Search: 4.7016
Adding measurement 170bb48b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.690e+04, gradient 6.905e-04, dot -0.397; [ad128f71-20cb-435b-bc3b-af2e1e0d312d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.60688156806245, -51.491746012673204, -49.3725993252267, -49.37259578269753
LBFGS Accumulation History: 3 points
Removed measurement 170bb48b to history. Total: 3
th(0)=-87.60688156806245;dx=-4.7641424061507815E-7
Armijo: th(6.048000000000002E7)=-85.68571108354459; dx=1.2241708344288117E-7 evalInputDelta=-1.9211704845178588
New Minimum: -87.60688156806245 > -90.44356082478483
WOLF (strong): th(3.024000000000001E7)=-90.44356082478483; dx=1.116757297327337E-7 evalInputDelta=2.836679256722377
New Minimum: -90.44356082478483 > -91.05577094274147
END: th(1.0080000000000004E7)=-91.05577094274147; dx=-1.7428874172063903E-7 evalInputDelta=3.448889374679027
Fitness changed from -87.60688156806245 to -91.05577094274147
Iteration 9 complete. Error: -91.05577094274147 Total: 12.2604; Orientation: 1.0840; Line Search: 9.0301
Adding measurement 2b3e6c21 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.604e+04, gradient 4.784e-04, dot -0.622; [ad128f71-20cb-435b-bc3b-af2e1e0d312d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.05577094274147, -51.491746012673204, -49.3725993252267, -49.37259578269753
LBFGS Accumulation History: 3 points
Removed measurement 2b3e6c21 to history. Total: 3
th(0)=-91.05577094274147;dx=-2.2837244561580825E-7
New Minimum: -91.05577094274147 > -94.71781459535718
END: th(2.1716701675521396E7)=-94.71781459535718; dx=-1.2061293804057114E-7 evalInputDelta=3.662043652615708
Fitness changed from -91.05577094274147 to -94.71781459535718
Iteration 10 complete. Error: -94.71781459535718 Total: 7.8153; Orientation: 1.0382; Line Search: 4.4508
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/58752ced-011e-4043-83cf-cb387bf626e7.jpg)
Final threshold in iteration 11: -94.71781459535718 (> -Infinity) after 110.758s (< 5400.000s)
Returns
-94.71781459535718