BasicOptimizer.scala:89 executed in 203.44 seconds (2.046 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: 22768583596992
Reset training subject: 22773219727403
Adding measurement 472d8859 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.6340445727109909;dx=-7.923226409190705E-7
New Minimum: -0.6340445727109909 > -0.6340451389551163
END: th(2.154434690031884)=-0.6340451389551163; dx=-6.750169227140106E-7 evalInputDelta=5.662441253662109E-7
Fitness changed from -0.6340445727109909 to -0.6340451389551163
Iteration 1 complete. Error: -0.6340451389551163 Total: 22.8634; Orientation: 0.0517; Line Search: 8.9942
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/119630e7-f3fb-4d2d-8169-c91d218f3c64.jpg)
Adding measurement 8f0508 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.6340451389551163;dx=-6.750096409087556E-7
New Minimum: -0.6340451389551163 > -0.6340468376874924
WOLFE (weak): th(4.641588833612779)=-0.6340468376874924; dx=-6.750031520228104E-7 evalInputDelta=1.6987323760986328E-6
New Minimum: -0.6340468376874924 > -0.6340483725070953
WOLFE (weak): th(9.283177667225559)=-0.6340483725070953; dx=-6.750024522976187E-7 evalInputDelta=3.2335519790649414E-6
New Minimum: -0.6340483725070953 > -0.6340546756982803
WOLFE (weak): th(27.849533001676676)=-0.6340546756982803; dx=-6.749951912870093E-7 evalInputDelta=9.5367431640625E-6
New Minimum: -0.6340546756982803 > -0.6340829282999039
WOLFE (weak): th(111.3981320067067)=-0.6340829282999039; dx=-6.749633865744895E-7 evalInputDelta=3.7789344787597656E-5
New Minimum: -0.6340829282999039 > -0.6342332661151886
WOLFE (weak): th(556.9906600335335)=-0.6342332661151886; dx=-6.748541140598766E-7 evalInputDelta=1.8812716007232666E-4
New Minimum: -0.6342332661151886 > -0.6351724565029144
WOLFE (weak): th(3341.9439602012008)=-0.6351724565029144; dx=-6.742038168091935E-7 evalInputDelta=0.0011273175477981567
New Minimum: -0.6351724565029144 > -0.6419048756361008
WOLFE (weak): th(23393.607721408407)=-0.6419048756361008; dx=-6.688837464954262E-7 evalInputDelta=0.007859736680984497
New Minimum: -0.6419048756361008 > -0.6948585361242294
WOLFE (weak): th(187148.86177126726)=-0.6948585361242294; dx=-6.23253959975239E-7 evalInputDelta=0.06081339716911316
New Minimum: -0.6948585361242294 > -1.0133237540721893
END: th(1684339.7559414054)=-1.0133237540721893; dx=-2.678093947827979E-7 evalInputDelta=0.37927861511707306
Fitness changed from -0.6340451389551163 to -1.0133237540721893
Iteration 2 complete. Error: -1.0133237540721893 Total: 47.0735; Orientation: 0.0467; Line Search: 42.4744
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/681e6955-89c3-4840-bb5d-62dbbc2b0e13.jpg)
Adding measurement 276f3409 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.0133237540721893;dx=-2.7091568226297615E-7
New Minimum: -1.0133237540721893 > -1.3251530677080154
END: th(3628800.0000000005)=-1.3251530677080154; dx=-1.0255079818812433E-7 evalInputDelta=0.3118293136358261
Fitness changed from -1.0133237540721893 to -1.3251530677080154
Iteration 3 complete. Error: -1.3251530677080154 Total: 13.4476; Orientation: 0.0442; Line Search: 8.9877
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ed62d618-e29e-4803-bff7-b027b4bab56f.jpg)
Adding measurement f9338c6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.567e+03, gradient 3.845e-04, dot -0.555; [5624b858-65a0-4439-85a6-7a684e82f20a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3251530677080154, -1.0133237540721893, -0.6340451389551163, -0.6340445727109909
LBFGS Accumulation History: 3 points
Removed measurement f9338c6 to history. Total: 3
th(0)=-1.3251530677080154;dx=-1.4782257668455695E-7
New Minimum: -1.3251530677080154 > -1.5934161618351936
END: th(7818012.603187701)=-1.5934161618351936; dx=-2.441102990761297E-8 evalInputDelta=0.2682630941271782
Fitness changed from -1.3251530677080154 to -1.5934161618351936
Iteration 4 complete. Error: -1.5934161618351936 Total: 13.7820; Orientation: 1.0127; Line Search: 8.4541
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b4854e2b-f6c0-4113-945c-5c709286262d.jpg)
Adding measurement 294a96cb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.477e+03, gradient 3.572e-04, dot -0.336; [5624b858-65a0-4439-85a6-7a684e82f20a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5934161618351936, -1.0133237540721893, -0.6340451389551163, -0.6340445727109909
LBFGS Accumulation History: 3 points
Removed measurement 294a96cb to history. Total: 3
th(0)=-1.5934161618351936;dx=-1.275583754203058E-7
New Minimum: -1.5934161618351936 > -1.691124550998211
WOLF (strong): th(1.6843397559414055E7)=-1.691124550998211; dx=2.3572412678167827E-8 evalInputDelta=0.09770838916301727
New Minimum: -1.691124550998211 > -1.76754629611969
WOLF (strong): th(8421698.779707028)=-1.76754629611969; dx=6.9061910234683684E-9 evalInputDelta=0.1741301342844963
END: th(2807232.926569009)=-1.7159814164042473; dx=-5.3698248995620786E-8 evalInputDelta=0.12256525456905365
Fitness changed from -1.5934161618351936 to -1.76754629611969
Iteration 5 complete. Error: -1.76754629611969 Total: 24.1217; Orientation: 1.0133; Line Search: 18.6596
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/362bb22a-3c7f-4360-8607-a622bc69a0db.jpg)
Adding measurement 7f54ea45 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.547e+03, gradient 3.178e-04, dot -0.273; [5624b858-65a0-4439-85a6-7a684e82f20a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.76754629611969, -1.0133237540721893, -0.6340451389551163, -0.6340445727109909
LBFGS Accumulation History: 3 points
Removed measurement 7f54ea45 to history. Total: 3
th(0)=-1.76754629611969;dx=-1.0100067044143089E-7
New Minimum: -1.76754629611969 > -1.915099136531353
END: th(6048000.000000001)=-1.915099136531353; dx=-1.409186647810364E-8 evalInputDelta=0.14755284041166306
Fitness changed from -1.76754629611969 to -1.915099136531353
Iteration 6 complete. Error: -1.915099136531353 Total: 13.9854; Orientation: 0.9958; Line Search: 8.5119
Adding measurement 59ff958d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.084e+03, gradient 2.154e-04, dot -0.452; [5624b858-65a0-4439-85a6-7a684e82f20a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.915099136531353, -1.0133237540721893, -0.6340451389551163, -0.6340445727109909
LBFGS Accumulation History: 3 points
Removed measurement 59ff958d to history. Total: 3
th(0)=-1.915099136531353;dx=-4.640345033054439E-8
New Minimum: -1.915099136531353 > -2.0233325883746147
WOLF (strong): th(1.3030021005312836E7)=-2.0233325883746147; dx=4.214507435819875E-9 evalInputDelta=0.10823345184326172
END: th(6515010.502656418)=-2.0095872059464455; dx=-1.4245060200585226E-8 evalInputDelta=0.09448806941509247
Fitness changed from -1.915099136531353 to -2.0233325883746147
Iteration 7 complete. Error: -2.0233325883746147 Total: 17.8491; Orientation: 1.0057; Line Search: 12.9249
Adding measurement 5f1eec9c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.715e+03, gradient 2.692e-04, dot -0.235; [5624b858-65a0-4439-85a6-7a684e82f20a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0233325883746147, -1.0133237540721893, -0.6340451389551163, -0.6340445727109909
LBFGS Accumulation History: 3 points
Removed measurement 5f1eec9c to history. Total: 3
th(0)=-2.0233325883746147;dx=-7.247990862877132E-8
New Minimum: -2.0233325883746147 > -2.054048351943493
WOLF (strong): th(1.4036164632845048E7)=-2.054048351943493; dx=2.623670346006028E-8 evalInputDelta=0.030715763568878174
New Minimum: -2.054048351943493 > -2.116320699453354
WOLF (strong): th(7018082.316422524)=-2.116320699453354; dx=4.067719376642014E-9 evalInputDelta=0.09298811107873917
END: th(2339360.7721408415)=-2.0860619097948074; dx=-3.562867737032849E-8 evalInputDelta=0.06272932142019272
Fitness changed from -2.0233325883746147 to -2.116320699453354
Iteration 8 complete. Error: -2.116320699453354 Total: 22.3101; Orientation: 1.0287; Line Search: 17.5017
Adding measurement 336e66a5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.072e+03, gradient 1.869e-04, dot -0.366; [5624b858-65a0-4439-85a6-7a684e82f20a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.116320699453354, -1.0133237540721893, -0.6340451389551163, -0.6340445727109909
LBFGS Accumulation History: 3 points
Removed measurement 336e66a5 to history. Total: 3
th(0)=-2.116320699453354;dx=-3.4922644701963395E-8
New Minimum: -2.116320699453354 > -2.1735319197177887
END: th(5040000.000000002)=-2.1735319197177887; dx=-1.1466464675831307E-8 evalInputDelta=0.057211220264434814
Fitness changed from -2.116320699453354 to -2.1735319197177887
Iteration 9 complete. Error: -2.1735319197177887 Total: 13.9715; Orientation: 1.0244; Line Search: 8.7304
Adding measurement 1b69115d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.331e+03, gradient 1.389e-04, dot -0.511; [5624b858-65a0-4439-85a6-7a684e82f20a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.1735319197177887, -1.0133237540721893, -0.6340451389551163, -0.6340445727109909
LBFGS Accumulation History: 3 points
Removed measurement 1b69115d to history. Total: 3
th(0)=-2.1735319197177887;dx=-1.9282802206008297E-8
New Minimum: -2.1735319197177887 > -2.2317019924521446
END: th(1.0858350837760698E7)=-2.2317019924521446; dx=-4.500144517095161E-9 evalInputDelta=0.058170072734355927
Fitness changed from -2.1735319197177887 to -2.2317019924521446
Iteration 10 complete. Error: -2.2317019924521446 Total: 13.9639; Orientation: 1.0146; Line Search: 8.6738
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/4a12187f-3713-4ccb-9732-72a3b040b698.jpg)
Final threshold in iteration 11: -2.2317019924521446 (> -Infinity) after 203.439s (< 5400.000s)
Returns
-2.2317019924521446