BasicOptimizer.scala:89 executed in 138.06 seconds (1.679 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: 70065395473800
Reset training subject: 70068041592400
Adding measurement eb14489 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-17.380095340641578;dx=-1.1377175915276406E-6
New Minimum: -17.380095340641578 > -17.380097568510514
END: th(2.154434690031884)=-17.380097568510514; dx=-9.723953763261474E-7 evalInputDelta=2.2278689364441107E-6
Fitness changed from -17.380095340641578 to -17.380097568510514
Iteration 1 complete. Error: -17.380097568510514 Total: 13.0195; Orientation: 0.0630; Line Search: 5.2448
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 6e0a28b4 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-17.380097568510514;dx=-9.703134804802144E-7
New Minimum: -17.380097568510514 > -17.38010276687026
WOLFE (weak): th(4.641588833612779)=-17.38010276687026; dx=-9.696091287976087E-7 evalInputDelta=5.198359744440495E-6
New Minimum: -17.38010276687026 > -17.38010870785092
WOLFE (weak): th(9.283177667225559)=-17.38010870785092; dx=-9.695086865593206E-7 evalInputDelta=1.1139340404753284E-5
New Minimum: -17.38010870785092 > -17.380128758645654
WOLFE (weak): th(27.849533001676676)=-17.380128758645654; dx=-9.692338465619857E-7 evalInputDelta=3.1190135139524955E-5
New Minimum: -17.380128758645654 > -17.380221586097612
WOLFE (weak): th(111.3981320067067)=-17.380221586097612; dx=-9.68834206620899E-7 evalInputDelta=1.2401758709756905E-4
New Minimum: -17.380221586097612 > -17.380714677210904
WOLFE (weak): th(556.9906600335335)=-17.380714677210904; dx=-9.684936796320513E-7 evalInputDelta=6.171087003892239E-4
New Minimum: -17.380714677210904 > -17.38379914964629
WOLFE (weak): th(3341.9439602012008)=-17.38379914964629; dx=-9.67725234579771E-7 evalInputDelta=0.0037015811357754558
New Minimum: -17.38379914964629 > -17.40591424604406
WOLFE (weak): th(23393.607721408407)=-17.40591424604406; dx=-9.61147668888743E-7 evalInputDelta=0.025816677533544663
New Minimum: -17.40591424604406 > -17.579482140410544
WOLFE (weak): th(187148.86177126726)=-17.579482140410544; dx=-8.874258775077637E-7 evalInputDelta=0.19938457190002978
New Minimum: -17.579482140410544 > -18.251884043866063
END: th(1684339.7559414054)=-18.251884043866063; dx=-8.002841581093133E-8 evalInputDelta=0.8717864753555489
Fitness changed from -17.380097568510514 to -18.251884043866063
Iteration 2 complete. Error: -18.251884043866063 Total: 29.4103; Orientation: 0.0641; Line Search: 26.4207
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 72d0b9b6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-18.251884043866063;dx=-1.0558977067070763E-6
New Minimum: -18.251884043866063 > -18.722327875649526
WOLF (strong): th(3628800.0000000005)=-18.722327875649526; dx=4.620972081027163E-8 evalInputDelta=0.47044383178346294
New Minimum: -18.722327875649526 > -18.962514617233094
WOLF (strong): th(1814400.0000000002)=-18.962514617233094; dx=1.5431688596888922E-7 evalInputDelta=0.7106305733670304
END: th(604800.0000000001)=-18.857993670412675; dx=-6.12555626037074E-7 evalInputDelta=0.6061096265466119
Fitness changed from -18.251884043866063 to -18.962514617233094
Iteration 3 complete. Error: -18.962514617233094 Total: 13.5389; Orientation: 0.0635; Line Search: 10.3535
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 23521591 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.519e+03, gradient 1.053e-03, dot -0.600; [c586c330-0dcd-4e2f-a8ac-19766418f7a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.962514617233094, -18.251884043866063, -17.380097568510514, -17.380095340641578
LBFGS Accumulation History: 3 points
Removed measurement 23521591 to history. Total: 3
th(0)=-18.962514617233094;dx=-1.1089304920493377E-6
New Minimum: -18.962514617233094 > -19.879602631383154
WOLF (strong): th(1303002.1005312835)=-19.879602631383154; dx=8.239467721710052E-8 evalInputDelta=0.9170880141500604
END: th(651501.0502656418)=-19.67251000555824; dx=-7.008575402730163E-7 evalInputDelta=0.7099953883251473
Fitness changed from -18.962514617233094 to -19.879602631383154
Iteration 4 complete. Error: -19.879602631383154 Total: 12.0065; Orientation: 1.0928; Line Search: 7.6555
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 100e5904 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.874e+03, gradient 9.049e-04, dot -0.541; [c586c330-0dcd-4e2f-a8ac-19766418f7a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.879602631383154, -18.251884043866063, -17.380097568510514, -17.380095340641578
LBFGS Accumulation History: 3 points
Removed measurement 100e5904 to history. Total: 3
th(0)=-19.879602631383154;dx=-8.182739321121E-7
New Minimum: -19.879602631383154 > -20.283794806843016
WOLF (strong): th(1403616.4632845046)=-20.283794806843016; dx=1.6406384551271802E-7 evalInputDelta=0.40419217545986186
New Minimum: -20.283794806843016 > -20.31570502458086
END: th(701808.2316422523)=-20.31570502458086; dx=-1.884594471665712E-7 evalInputDelta=0.43610239319770727
Fitness changed from -19.879602631383154 to -20.31570502458086
Iteration 5 complete. Error: -20.31570502458086 Total: 11.9000; Orientation: 1.1694; Line Search: 7.8256
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 472f46db to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.437e+03, gradient 7.159e-04, dot -0.733; [c586c330-0dcd-4e2f-a8ac-19766418f7a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.31570502458086, -18.251884043866063, -17.380097568510514, -17.380095340641578
LBFGS Accumulation History: 3 points
Removed measurement 472f46db to history. Total: 3
th(0)=-20.31570502458086;dx=-5.124197926844962E-7
New Minimum: -20.31570502458086 > -20.712501798292884
END: th(1512000.0000000002)=-20.712501798292884; dx=-8.892706245330998E-8 evalInputDelta=0.3967967737120226
Fitness changed from -20.31570502458086 to -20.712501798292884
Iteration 6 complete. Error: -20.712501798292884 Total: 9.2376; Orientation: 1.0920; Line Search: 5.1670
Adding measurement 9f38982 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.103e+03, gradient 8.951e-04, dot -0.521; [c586c330-0dcd-4e2f-a8ac-19766418f7a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.712501798292884, -18.251884043866063, -17.380097568510514, -17.380095340641578
LBFGS Accumulation History: 3 points
Removed measurement 9f38982 to history. Total: 3
th(0)=-20.712501798292884;dx=-8.004701491269119E-7
New Minimum: -20.712501798292884 > -20.77803258336136
WOLF (strong): th(3257505.251328209)=-20.77803258336136; dx=6.937876756163335E-8 evalInputDelta=0.06553078506847498
New Minimum: -20.77803258336136 > -21.0666671230719
WOLF (strong): th(1628752.6256641045)=-21.0666671230719; dx=2.1386938317756548E-7 evalInputDelta=0.3541653247790144
New Minimum: -21.0666671230719 > -21.106456600469745
END: th(542917.5418880348)=-21.106456600469745; dx=-4.064158235653346E-7 evalInputDelta=0.39395480217686085
Fitness changed from -20.712501798292884 to -21.106456600469745
Iteration 7 complete. Error: -21.106456600469745 Total: 14.1036; Orientation: 1.1416; Line Search: 10.5071
Adding measurement 7d83a77a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.037e+03, gradient 6.664e-04, dot -0.763; [c586c330-0dcd-4e2f-a8ac-19766418f7a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.106456600469745, -18.251884043866063, -17.380097568510514, -17.380095340641578
LBFGS Accumulation History: 3 points
Removed measurement 7d83a77a to history. Total: 3
th(0)=-21.106456600469745;dx=-4.436208831467732E-7
New Minimum: -21.106456600469745 > -21.472377587586227
END: th(1169680.3860704205)=-21.472377587586227; dx=-1.5224178680867372E-7 evalInputDelta=0.3659209871164819
Fitness changed from -21.106456600469745 to -21.472377587586227
Iteration 8 complete. Error: -21.472377587586227 Total: 8.7930; Orientation: 1.0927; Line Search: 5.2481
Adding measurement 3164c059 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.132e+03, gradient 7.609e-04, dot -0.631; [c586c330-0dcd-4e2f-a8ac-19766418f7a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.472377587586227, -18.251884043866063, -17.380097568510514, -17.380095340641578
LBFGS Accumulation History: 3 points
Removed measurement 3164c059 to history. Total: 3
th(0)=-21.472377587586227;dx=-5.789165057811498E-7
New Minimum: -21.472377587586227 > -21.73101075647725
WOLF (strong): th(2520000.0000000005)=-21.73101075647725; dx=1.602553626147087E-8 evalInputDelta=0.2586331688910235
New Minimum: -21.73101075647725 > -21.788541773962493
WOLF (strong): th(1260000.0000000002)=-21.788541773962493; dx=2.9783226401838835E-8 evalInputDelta=0.3161641863762661
END: th(420000.00000000006)=-21.699971993438652; dx=-3.4991863268500715E-7 evalInputDelta=0.2275944058524253
Fitness changed from -21.472377587586227 to -21.788541773962493
Iteration 9 complete. Error: -21.788541773962493 Total: 14.1578; Orientation: 1.0357; Line Search: 10.5966
Adding measurement 3d60e1b7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.549e+03, gradient 8.787e-04, dot -0.510; [c586c330-0dcd-4e2f-a8ac-19766418f7a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.788541773962493, -18.251884043866063, -17.380097568510514, -17.380095340641578
LBFGS Accumulation History: 3 points
Removed measurement 3d60e1b7 to history. Total: 3
th(0)=-21.788541773962493;dx=-7.70799879862443E-7
New Minimum: -21.788541773962493 > -22.206332667672037
WOLF (strong): th(904862.5698133913)=-22.206332667672037; dx=7.15933112080108E-8 evalInputDelta=0.4177908937095438
END: th(452431.28490669566)=-22.119563056673577; dx=-4.6188127427172586E-7 evalInputDelta=0.33102128271108455
Fitness changed from -21.788541773962493 to -22.206332667672037
Iteration 10 complete. Error: -22.206332667672037 Total: 11.4339; Orientation: 1.0277; Line Search: 7.6969
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -22.206332667672037 (> -Infinity) after 138.063s (< 5400.000s)
Returns
-22.206332667672037