BasicOptimizer.scala:89 executed in 209.06 seconds (1.865 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: 1911369564194
Reset training subject: 1915321498229
Adding measurement 6b19179e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.7918207198381424;dx=-2.349115845212519E-6
New Minimum: 2.7918207198381424 > 2.7918188869953156
END: th(2.154434690031884)=2.7918188869953156; dx=-2.032211066878444E-6 evalInputDelta=1.8328428268432617E-6
Fitness changed from 2.7918207198381424 to 2.7918188869953156
Iteration 1 complete. Error: 2.7918188869953156 Total: 21.0368; Orientation: 0.0466; Line Search: 8.3034
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ddee11b7-8735-4f88-a648-b319ea3d61c7.jpg)
Adding measurement 250ce2f9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=2.7918188869953156;dx=-2.069339038907009E-6
New Minimum: 2.7918188869953156 > 2.7918137460947037
WOLFE (weak): th(4.641588833612779)=2.7918137460947037; dx=-1.999832080336041E-6 evalInputDelta=5.140900611877441E-6
New Minimum: 2.7918137460947037 > 2.7918092161417007
WOLFE (weak): th(9.283177667225559)=2.7918092161417007; dx=-1.9999190988120744E-6 evalInputDelta=9.670853614807129E-6
New Minimum: 2.7918092161417007 > 2.791790693998337
WOLFE (weak): th(27.849533001676676)=2.791790693998337; dx=-1.995670338125095E-6 evalInputDelta=2.8192996978759766E-5
New Minimum: 2.791790693998337 > 2.791707530617714
WOLFE (weak): th(111.3981320067067)=2.791707530617714; dx=-1.99430525161028E-6 evalInputDelta=1.1135637760162354E-4
New Minimum: 2.791707530617714 > 2.7912632450461388
WOLFE (weak): th(556.9906600335335)=2.7912632450461388; dx=-1.9938078566981762E-6 evalInputDelta=5.556419491767883E-4
New Minimum: 2.7912632450461388 > 2.7884890288114548
WOLFE (weak): th(3341.9439602012008)=2.7884890288114548; dx=-1.9908201568616717E-6 evalInputDelta=0.003329858183860779
New Minimum: 2.7884890288114548 > 2.768641009926796
WOLFE (weak): th(23393.607721408407)=2.768641009926796; dx=-1.9745751784135097E-6 evalInputDelta=0.023177877068519592
New Minimum: 2.768641009926796 > 2.6001655608415604
WOLFE (weak): th(187148.86177126726)=2.6001655608415604; dx=-2.0410274839906485E-6 evalInputDelta=0.1916533261537552
New Minimum: 2.6001655608415604 > 1.6278434544801712
END: th(1684339.7559414054)=1.6278434544801712; dx=-7.466757888795728E-7 evalInputDelta=1.1639754325151443
Fitness changed from 2.7918188869953156 to 1.6278434544801712
Iteration 2 complete. Error: 1.6278434544801712 Total: 46.9123; Orientation: 0.0437; Line Search: 42.6280
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e40a3e87-437e-497b-8e7c-2f71399ff896.jpg)
Adding measurement 77136f0b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=1.6278434544801712;dx=-2.054064425391587E-6
New Minimum: 1.6278434544801712 > 0.4640022814273834
END: th(3628800.0000000005)=0.4640022814273834; dx=-1.4953402440451803E-7 evalInputDelta=1.1638411730527878
Fitness changed from 1.6278434544801712 to 0.4640022814273834
Iteration 3 complete. Error: 0.4640022814273834 Total: 13.5490; Orientation: 0.0443; Line Search: 9.0727
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/52f2e4b5-873f-4995-963b-a16cd5c7fbbc.jpg)
Adding measurement e12d1c5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.386e+03, gradient 7.909e-04, dot -0.340; [01f1124f-969a-4198-ad6b-206a79e7b5ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.4640022814273834, 1.6278434544801712, 2.7918188869953156, 2.7918207198381424
LBFGS Accumulation History: 3 points
Removed measurement e12d1c5 to history. Total: 3
th(0)=0.4640022814273834;dx=-6.255295398813563E-7
New Minimum: 0.4640022814273834 > -0.2527904808521271
END: th(7818012.603187701)=-0.2527904808521271; dx=-1.7151635040728408E-8 evalInputDelta=0.7167927622795105
Fitness changed from 0.4640022814273834 to -0.2527904808521271
Iteration 4 complete. Error: -0.2527904808521271 Total: 13.7091; Orientation: 0.9894; Line Search: 8.5511
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/fa53ebf1-ae46-48f6-8233-898f9cd33c9c.jpg)
Adding measurement 2412abcd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.135e+03, gradient 5.758e-04, dot -0.204; [01f1124f-969a-4198-ad6b-206a79e7b5ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.2527904808521271, 1.6278434544801712, 2.7918188869953156, 2.7918207198381424
LBFGS Accumulation History: 3 points
Removed measurement 2412abcd to history. Total: 3
th(0)=-0.2527904808521271;dx=-3.3151751198525604E-7
New Minimum: -0.2527904808521271 > -0.7100166454911232
WOLF (strong): th(1.6843397559414055E7)=-0.7100166454911232; dx=4.116843017240142E-8 evalInputDelta=0.4572261646389961
New Minimum: -0.7100166454911232 > -0.7834016010165215
END: th(8421698.779707028)=-0.7834016010165215; dx=-1.979943504102784E-8 evalInputDelta=0.5306111201643944
Fitness changed from -0.2527904808521271 to -0.7834016010165215
Iteration 5 complete. Error: -0.7834016010165215 Total: 18.2149; Orientation: 0.9729; Line Search: 12.9122
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8821c743-13f6-42ac-aed3-60498175bef8.jpg)
Adding measurement 6f098cc1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.179e+03, gradient 3.860e-04, dot -0.251; [01f1124f-969a-4198-ad6b-206a79e7b5ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.7834016010165215, 1.6278434544801712, 2.7918188869953156, 2.7918207198381424
LBFGS Accumulation History: 3 points
Removed measurement 6f098cc1 to history. Total: 3
th(0)=-0.7834016010165215;dx=-1.4896256063192136E-7
New Minimum: -0.7834016010165215 > -1.1386063396930695
WOLF (strong): th(1.8144000000000004E7)=-1.1386063396930695; dx=1.671792817981102E-8 evalInputDelta=0.355204738676548
END: th(9072000.000000002)=-1.1257004365324974; dx=-2.892463603268335E-8 evalInputDelta=0.34229883551597595
Fitness changed from -0.7834016010165215 to -1.1386063396930695
Iteration 6 complete. Error: -1.1386063396930695 Total: 18.3584; Orientation: 0.9954; Line Search: 12.6499
Adding measurement 59384ef3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.299e+03, gradient 3.532e-04, dot -0.132; [01f1124f-969a-4198-ad6b-206a79e7b5ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1386063396930695, 1.6278434544801712, 2.7918188869953156, 2.7918207198381424
LBFGS Accumulation History: 3 points
Removed measurement 59384ef3 to history. Total: 3
th(0)=-1.1386063396930695;dx=-1.2472092466326588E-7
New Minimum: -1.1386063396930695 > -1.3567374274134636
WOLF (strong): th(1.9545031507969253E7)=-1.3567374274134636; dx=3.0847776379628984E-8 evalInputDelta=0.21813108772039413
New Minimum: -1.3567374274134636 > -1.4068387299776077
END: th(9772515.753984626)=-1.4068387299776077; dx=-1.1957884327835779E-8 evalInputDelta=0.26823239028453827
Fitness changed from -1.1386063396930695 to -1.4068387299776077
Iteration 7 complete. Error: -1.4068387299776077 Total: 18.5773; Orientation: 0.9649; Line Search: 13.7004
Adding measurement 1387ccfd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.126e+03, gradient 2.154e-04, dot -0.185; [01f1124f-969a-4198-ad6b-206a79e7b5ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4068387299776077, 1.6278434544801712, 2.7918188869953156, 2.7918207198381424
LBFGS Accumulation History: 3 points
Removed measurement 1387ccfd to history. Total: 3
th(0)=-1.4068387299776077;dx=-4.6413018141875556E-8
New Minimum: -1.4068387299776077 > -1.5466367155313492
WOLF (strong): th(2.105424694926757E7)=-1.5466367155313492; dx=1.1407075038484237E-8 evalInputDelta=0.13979798555374146
New Minimum: -1.5466367155313492 > -1.5532054901123047
END: th(1.0527123474633785E7)=-1.5532054901123047; dx=-1.0985113906487293E-8 evalInputDelta=0.14636676013469696
Fitness changed from -1.4068387299776077 to -1.5532054901123047
Iteration 8 complete. Error: -1.5532054901123047 Total: 18.6179; Orientation: 1.0432; Line Search: 13.0048
Adding measurement 51a7447d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.431e+03, gradient 1.893e-04, dot -0.245; [01f1124f-969a-4198-ad6b-206a79e7b5ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5532054901123047, 1.6278434544801712, 2.7918188869953156, 2.7918207198381424
LBFGS Accumulation History: 3 points
Removed measurement 51a7447d to history. Total: 3
th(0)=-1.5532054901123047;dx=-3.58361440374676E-8
New Minimum: -1.5532054901123047 > -1.656566932797432
WOLF (strong): th(2.2680000000000007E7)=-1.656566932797432; dx=2.8038734549737295E-9 evalInputDelta=0.10336144268512726
END: th(1.1340000000000004E7)=-1.6521748304367065; dx=-5.200022629925776E-9 evalInputDelta=0.09896934032440186
Fitness changed from -1.5532054901123047 to -1.656566932797432
Iteration 9 complete. Error: -1.656566932797432 Total: 18.3401; Orientation: 0.9947; Line Search: 13.2297
Adding measurement 20896110 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.190e+02, gradient 2.244e-04, dot -0.099; [01f1124f-969a-4198-ad6b-206a79e7b5ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.656566932797432, 1.6278434544801712, 2.7918188869953156, 2.7918207198381424
LBFGS Accumulation History: 3 points
Removed measurement 20896110 to history. Total: 3
th(0)=-1.656566932797432;dx=-5.033894913990784E-8
Armijo: th(2.443128938496157E7)=-1.6486931070685387; dx=3.241479529596299E-8 evalInputDelta=-0.00787382572889328
New Minimum: -1.656566932797432 > -1.7791806533932686
WOLF (strong): th(1.2215644692480786E7)=-1.7791806533932686; dx=5.662114966134326E-9 evalInputDelta=0.12261372059583664
END: th(4071881.564160262)=-1.7371158823370934; dx=-2.8852104880633744E-8 evalInputDelta=0.08054894953966141
Fitness changed from -1.656566932797432 to -1.7791806533932686
Iteration 10 complete. Error: -1.7791806533932686 Total: 21.6536; Orientation: 0.9704; Line Search: 16.4307
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1b0bfa45-dcc3-407b-b7d0-c26af59d6602.jpg)
Final threshold in iteration 11: -1.7791806533932686 (> -Infinity) after 209.054s (< 5400.000s)
Returns
-1.7791806533932686