BasicOptimizer.scala:89 executed in 131.06 seconds (1.795 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: 74747204838400
Reset training subject: 74749861226600
Adding measurement 4a316db0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-11.06578065897593;dx=-9.886558912688537E-7
New Minimum: -11.06578065897593 > -11.065782991727326
WOLFE (weak): th(2.154434690031884)=-11.065782991727326; dx=-9.059984054480812E-7 evalInputDelta=2.332751396494359E-6
New Minimum: -11.065782991727326 > -11.065785907665882
WOLFE (weak): th(4.308869380063768)=-11.065785907665882; dx=-9.060017413727245E-7 evalInputDelta=5.248689951997676E-6
New Minimum: -11.065785907665882 > -11.065794072289748
WOLFE (weak): th(12.926608140191302)=-11.065794072289748; dx=-9.06003131760735E-7 evalInputDelta=1.3413313817878247E-5
New Minimum: -11.065794072289748 > -11.06583372894855
WOLFE (weak): th(51.70643256076521)=-11.06583372894855; dx=-9.059055669453098E-7 evalInputDelta=5.3069972620889416E-5
New Minimum: -11.06583372894855 > -11.066042507249817
WOLFE (weak): th(258.53216280382605)=-11.066042507249817; dx=-9.055849954514485E-7 evalInputDelta=2.618482738867556E-4
New Minimum: -11.066042507249817 > -11.067344658427425
WOLFE (weak): th(1551.1929768229563)=-11.067344658427425; dx=-9.054851949885866E-7 evalInputDelta=0.0015639994514948796
New Minimum: -11.067344658427425 > -11.076717608935901
WOLFE (weak): th(10858.350837760694)=-11.076717608935901; dx=-9.039312523139214E-7 evalInputDelta=0.010936949959971187
New Minimum: -11.076717608935901 > -11.152585378605966
END: th(86866.80670208555)=-11.152585378605966; dx=-8.892554127949425E-7 evalInputDelta=0.08680471963003633
Fitness changed from -11.06578065897593 to -11.152585378605966
Iteration 1 complete. Error: -11.152585378605966 Total: 31.1288; Orientation: 0.0600; Line Search: 23.2783
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 4dec5475 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-11.152585378605966;dx=-8.776940693168717E-7
New Minimum: -11.152585378605966 > -11.331750615820559
WOLFE (weak): th(187148.86177126726)=-11.331750615820559; dx=-8.418452369760674E-7 evalInputDelta=0.1791652372145922
New Minimum: -11.331750615820559 > -11.50226977554667
WOLFE (weak): th(374297.7235425345)=-11.50226977554667; dx=-7.958514331334733E-7 evalInputDelta=0.3496843969407042
New Minimum: -11.50226977554667 > -12.068292943348208
END: th(1122893.1706276035)=-12.068292943348208; dx=-5.634631927831605E-7 evalInputDelta=0.9157075647422417
Fitness changed from -11.152585378605966 to -12.068292943348208
Iteration 2 complete. Error: -12.068292943348208 Total: 13.3388; Orientation: 0.0508; Line Search: 10.3635
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 608ad495 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-12.068292943348208;dx=-7.983281245432198E-7
New Minimum: -12.068292943348208 > -13.321695422046824
END: th(2419200.0000000005)=-13.321695422046824; dx=-3.093828040948384E-7 evalInputDelta=1.2534024786986162
Fitness changed from -12.068292943348208 to -13.321695422046824
Iteration 3 complete. Error: -13.321695422046824 Total: 8.5127; Orientation: 0.0583; Line Search: 5.2651
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 14512a5c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.189e+03, gradient 9.279e-04, dot -0.604; [cb85d3b4-a93f-4c53-b5bd-8ed644eb83c4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.321695422046824, -12.068292943348208, -11.152585378605966, -11.06578065897593
LBFGS Accumulation History: 3 points
Removed measurement 14512a5c to history. Total: 3
th(0)=-13.321695422046824;dx=-8.609195093174222E-7
New Minimum: -13.321695422046824 > -14.795514415932388
END: th(5212008.402125134)=-14.795514415932388; dx=-1.1671611056637125E-7 evalInputDelta=1.4738189938855637
Fitness changed from -13.321695422046824 to -14.795514415932388
Iteration 4 complete. Error: -14.795514415932388 Total: 9.1269; Orientation: 1.0438; Line Search: 5.1857
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 67017a2f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.161e+03, gradient 8.195e-04, dot -0.371; [cb85d3b4-a93f-4c53-b5bd-8ed644eb83c4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.795514415932388, -12.068292943348208, -11.152585378605966, -11.06578065897593
LBFGS Accumulation History: 3 points
Removed measurement 67017a2f to history. Total: 3
th(0)=-14.795514415932388;dx=-6.712405617879061E-7
New Minimum: -14.795514415932388 > -17.062107765408165
END: th(1.1228931706276037E7)=-17.062107765408165; dx=-9.389577831698598E-9 evalInputDelta=2.2665933494757766
Fitness changed from -14.795514415932388 to -17.062107765408165
Iteration 5 complete. Error: -17.062107765408165 Total: 9.1218; Orientation: 1.0117; Line Search: 5.0282
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 41beb73a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.865e+03, gradient 7.572e-04, dot -0.279; [cb85d3b4-a93f-4c53-b5bd-8ed644eb83c4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.062107765408165, -12.068292943348208, -11.152585378605966, -11.06578065897593
LBFGS Accumulation History: 3 points
Removed measurement 41beb73a to history. Total: 3
th(0)=-17.062107765408165;dx=-5.730271557182432E-7
New Minimum: -17.062107765408165 > -19.10089183973971
WOLF (strong): th(2.4192000000000004E7)=-19.10089183973971; dx=2.4678397587442987E-8 evalInputDelta=2.038784074331545
New Minimum: -19.10089183973971 > -19.588053809049523
WOLF (strong): th(1.2096000000000002E7)=-19.588053809049523; dx=3.087307433069441E-8 evalInputDelta=2.5259460436413583
END: th(4032000.0000000005)=-19.13410434583751; dx=-2.660393630629576E-7 evalInputDelta=2.071996580429346
Fitness changed from -17.062107765408165 to -19.588053809049523
Iteration 6 complete. Error: -19.588053809049523 Total: 14.2061; Orientation: 1.0333; Line Search: 10.2067
Adding measurement 7f712ec7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.029e+03, gradient 7.182e-04, dot -0.271; [cb85d3b4-a93f-4c53-b5bd-8ed644eb83c4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.588053809049523, -12.068292943348208, -11.152585378605966, -11.06578065897593
LBFGS Accumulation History: 3 points
Removed measurement 7f712ec7 to history. Total: 3
th(0)=-19.588053809049523;dx=-5.153294319287963E-7
New Minimum: -19.588053809049523 > -22.071935178098876
WOLF (strong): th(8686680.670208557)=-22.071935178098876; dx=1.1737461074758249E-8 evalInputDelta=2.483881369049353
END: th(4343340.335104278)=-21.63626124968728; dx=-2.4888126218322473E-7 evalInputDelta=2.048207440637757
Fitness changed from -19.588053809049523 to -22.071935178098876
Iteration 7 complete. Error: -22.071935178098876 Total: 11.3109; Orientation: 1.0604; Line Search: 7.7972
Adding measurement 5dd15077 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.383e+04, gradient 7.179e-04, dot -0.311; [cb85d3b4-a93f-4c53-b5bd-8ed644eb83c4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -22.071935178098876, -12.068292943348208, -11.152585378605966, -11.06578065897593
LBFGS Accumulation History: 3 points
Removed measurement 5dd15077 to history. Total: 3
th(0)=-22.071935178098876;dx=-5.149411330510436E-7
New Minimum: -22.071935178098876 > -23.293248834854676
WOLF (strong): th(9357443.088563364)=-23.293248834854676; dx=1.2627485240333377E-7 evalInputDelta=1.2213136567558003
New Minimum: -23.293248834854676 > -23.77306292548885
END: th(4678721.544281682)=-23.77306292548885; dx=-4.2626292889708976E-8 evalInputDelta=1.7011277473899753
Fitness changed from -22.071935178098876 to -23.77306292548885
Iteration 8 complete. Error: -23.77306292548885 Total: 11.4165; Orientation: 1.0030; Line Search: 7.9807
Adding measurement d90d8ed to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.897e+04, gradient 7.086e-04, dot -0.359; [cb85d3b4-a93f-4c53-b5bd-8ed644eb83c4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.77306292548885, -12.068292943348208, -11.152585378605966, -11.06578065897593
LBFGS Accumulation History: 3 points
Removed measurement d90d8ed to history. Total: 3
th(0)=-23.77306292548885;dx=-5.013529476044909E-7
New Minimum: -23.77306292548885 > -23.781803408209143
WOLF (strong): th(1.0080000000000002E7)=-23.781803408209143; dx=6.58850717657612E-8 evalInputDelta=0.008740482720291709
New Minimum: -23.781803408209143 > -24.338476327032275
WOLF (strong): th(5040000.000000001)=-24.338476327032275; dx=1.204579954771463E-7 evalInputDelta=0.5654134015434238
New Minimum: -24.338476327032275 > -24.499953618005495
END: th(1680000.0000000002)=-24.499953618005495; dx=-2.066276269628087E-7 evalInputDelta=0.7268906925166441
Fitness changed from -23.77306292548885 to -24.499953618005495
Iteration 9 complete. Error: -24.499953618005495 Total: 13.6585; Orientation: 1.0074; Line Search: 10.2155
Adding measurement 3b5345dd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.202e+04, gradient 5.848e-04, dot -0.461; [cb85d3b4-a93f-4c53-b5bd-8ed644eb83c4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.499953618005495, -12.068292943348208, -11.152585378605966, -11.06578065897593
LBFGS Accumulation History: 3 points
Removed measurement 3b5345dd to history. Total: 3
th(0)=-24.499953618005495;dx=-3.417161541561123E-7
New Minimum: -24.499953618005495 > -24.985578066638507
END: th(3619450.2792535652)=-24.985578066638507; dx=-5.4621626595447355E-9 evalInputDelta=0.48562444863301124
Fitness changed from -24.499953618005495 to -24.985578066638507
Iteration 10 complete. Error: -24.985578066638507 Total: 8.6516; Orientation: 1.1077; Line Search: 5.0971
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -24.985578066638507 (> -Infinity) after 131.061s (< 5400.000s)
Returns
-24.985578066638507