BasicOptimizer.scala:89 executed in 63.45 seconds (1.331 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: 141224494469600
Reset training subject: 141225473400400
Adding measurement 59d5df77 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1.9904208857244823;dx=-5.699384851078045E-5
New Minimum: -1.9904208857244823 > -1.9905853769918984
WOLFE (weak): th(2.154434690031884)=-1.9905853769918984; dx=-5.686278313507586E-5 evalInputDelta=1.6449126741613362E-4
New Minimum: -1.9905853769918984 > -1.9907497087308632
WOLFE (weak): th(4.308869380063768)=-1.9907497087308632; dx=-5.690549656274357E-5 evalInputDelta=3.2882300638092943E-4
New Minimum: -1.9907497087308632 > -1.991407775411759
WOLFE (weak): th(12.926608140191302)=-1.991407775411759; dx=-5.6924814380578204E-5 evalInputDelta=9.868896872766708E-4
New Minimum: -1.991407775411759 > -1.9943691561718506
WOLFE (weak): th(51.70643256076521)=-1.9943691561718506; dx=-5.68895958831424E-5 evalInputDelta=0.0039482704473683405
New Minimum: -1.9943691561718506 > -2.010164828338382
WOLFE (weak): th(258.53216280382605)=-2.010164828338382; dx=-5.69325237316655E-5 evalInputDelta=0.019743942613899668
New Minimum: -2.010164828338382 > -2.1095004652548868
WOLFE (weak): th(1551.1929768229563)=-2.1095004652548868; dx=-5.713620106723463E-5 evalInputDelta=0.11907957953040449
New Minimum: -2.1095004652548868 > -2.8178407822029707
WOLFE (weak): th(10858.350837760694)=-2.8178407822029707; dx=-5.325488796877512E-5 evalInputDelta=0.8274198964784885
New Minimum: -2.8178407822029707 > -6.0286262274259785
END: th(86866.80670208555)=-6.0286262274259785; dx=-1.5077916768901533E-5 evalInputDelta=4.038205341701496
Fitness changed from -1.9904208857244823 to -6.0286262274259785
Iteration 1 complete. Error: -6.0286262274259785 Total: 11.7467; Orientation: 0.0153; Line Search: 8.1231
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e8801f8b-5dff-4f3b-a918-6102660fddb9.jpg)
Adding measurement 1b744c7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-6.0286262274259785;dx=-1.1160155259841115E-4
New Minimum: -6.0286262274259785 > -11.813402748681964
END: th(187148.86177126726)=-11.813402748681964; dx=-1.3943648398245533E-6 evalInputDelta=5.784776521255986
Fitness changed from -6.0286262274259785 to -11.813402748681964
Iteration 2 complete. Error: -11.813402748681964 Total: 2.7973; Orientation: 0.0163; Line Search: 1.8730
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1619a807-5383-49e6-931a-e3ff6d010cab.jpg)
Adding measurement 77a567d0 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-11.813402748681964;dx=-8.943153926284153E-5
New Minimum: -11.813402748681964 > -17.355912551999513
WOLF (strong): th(403200.00000000006)=-17.355912551999513; dx=4.697276820995908E-6 evalInputDelta=5.542509803317548
New Minimum: -17.355912551999513 > -19.490720168737347
END: th(201600.00000000003)=-19.490720168737347; dx=-8.473642425900341E-8 evalInputDelta=7.677317420055383
Fitness changed from -11.813402748681964 to -19.490720168737347
Iteration 3 complete. Error: -19.490720168737347 Total: 3.4666; Orientation: 0.0146; Line Search: 2.5554
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/96f3de40-ccf2-4c7e-a13d-4e9bce59caa8.jpg)
Adding measurement 3fe49a71 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.608e+03, gradient 8.392e-03, dot -0.252; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.490720168737347, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 3fe49a71 to history. Total: 3
th(0)=-19.490720168737347;dx=-7.001096271241718E-5
New Minimum: -19.490720168737347 > -24.1691768002516
WOLF (strong): th(434334.03351042786)=-24.1691768002516; dx=8.917405372431504E-6 evalInputDelta=4.678456631514251
New Minimum: -24.1691768002516 > -27.472429378648147
END: th(217167.01675521393)=-27.472429378648147; dx=-3.198606499664413E-6 evalInputDelta=7.9817092099108
Fitness changed from -19.490720168737347 to -27.472429378648147
Iteration 4 complete. Error: -27.472429378648147 Total: 3.7668; Orientation: 0.2741; Line Search: 2.5813
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7ad16e41-5073-423a-b865-2a350b7d0b6d.jpg)
Adding measurement 280230f0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.431e+03, gradient 8.516e-03, dot -0.286; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -27.472429378648147, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 280230f0 to history. Total: 3
th(0)=-27.472429378648147;dx=-7.226813959916984E-5
New Minimum: -27.472429378648147 > -30.177170575619172
WOLF (strong): th(467872.15442816826)=-30.177170575619172; dx=8.207123492956942E-6 evalInputDelta=2.7047411969710247
New Minimum: -30.177170575619172 > -33.9514516888924
WOLF (strong): th(233936.07721408413)=-33.9514516888924; dx=2.2059537405558116E-6 evalInputDelta=6.47902231024425
END: th(77978.69240469471)=-32.99185310085414; dx=-2.789046264085337E-5 evalInputDelta=5.519423722205989
Fitness changed from -27.472429378648147 to -33.9514516888924
Iteration 5 complete. Error: -33.9514516888924 Total: 4.8075; Orientation: 0.2828; Line Search: 3.6422
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/13c2e784-e139-4f4f-86f7-0b5fe5a60023.jpg)
Adding measurement 10338a7f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.124e+03, gradient 8.915e-03, dot -0.280; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.9514516888924, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 10338a7f to history. Total: 3
th(0)=-33.9514516888924;dx=-7.921734832560502E-5
New Minimum: -33.9514516888924 > -40.5556592729269
WOLF (strong): th(168000.00000000006)=-40.5556592729269; dx=1.1864060178707008E-6 evalInputDelta=6.604207584034505
END: th(84000.00000000003)=-39.977808524050786; dx=-2.270308343047639E-5 evalInputDelta=6.0263568351583885
Fitness changed from -33.9514516888924 to -40.5556592729269
Iteration 6 complete. Error: -40.5556592729269 Total: 3.9014; Orientation: 0.2832; Line Search: 2.7031
Adding measurement 37882048 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.576e+03, gradient 8.230e-03, dot -0.335; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.5556592729269, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 37882048 to history. Total: 3
th(0)=-40.5556592729269;dx=-6.712535704906676E-5
New Minimum: -40.5556592729269 > -45.628187075299245
WOLF (strong): th(180972.5139626783)=-45.628187075299245; dx=1.809125402600641E-6 evalInputDelta=5.072527802372342
END: th(90486.25698133915)=-45.56111039595578; dx=-1.7285642317321403E-5 evalInputDelta=5.005451123028877
Fitness changed from -40.5556592729269 to -45.628187075299245
Iteration 7 complete. Error: -45.628187075299245 Total: 3.8302; Orientation: 0.2747; Line Search: 2.7775
Adding measurement 25112c82 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.458e+04, gradient 8.365e-03, dot -0.356; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.628187075299245, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 25112c82 to history. Total: 3
th(0)=-45.628187075299245;dx=-6.964263934767911E-5
New Minimum: -45.628187075299245 > -50.25913124601959
WOLF (strong): th(194946.7310117368)=-50.25913124601959; dx=2.914226079751417E-6 evalInputDelta=4.630944170720348
New Minimum: -50.25913124601959 > -50.60274120286111
END: th(97473.3655058684)=-50.60274120286111; dx=-1.3338778945780741E-5 evalInputDelta=4.974554127561866
Fitness changed from -45.628187075299245 to -50.60274120286111
Iteration 8 complete. Error: -50.60274120286111 Total: 3.6630; Orientation: 0.2686; Line Search: 2.5946
Adding measurement 4badd5ec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.085e+04, gradient 6.617e-03, dot -0.480; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.60274120286111, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 4badd5ec to history. Total: 3
th(0)=-50.60274120286111;dx=-4.36575281264644E-5
New Minimum: -50.60274120286111 > -54.82014958764116
END: th(210000.0000000001)=-54.82014958764116; dx=-1.0150020683509312E-5 evalInputDelta=4.21740838478005
Fitness changed from -50.60274120286111 to -54.82014958764116
Iteration 9 complete. Error: -54.82014958764116 Total: 2.8248; Orientation: 0.2746; Line Search: 1.7317
Adding measurement 5fa9d4fc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.045e+04, gradient 7.440e-03, dot -0.445; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.82014958764116, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 5fa9d4fc to history. Total: 3
th(0)=-54.82014958764116;dx=-5.528409707160059E-5
New Minimum: -54.82014958764116 > -56.104856686242655
WOLF (strong): th(452431.2849066958)=-56.104856686242655; dx=1.5027613862114778E-6 evalInputDelta=1.2847070986014941
New Minimum: -56.104856686242655 > -58.328781693883265
WOLF (strong): th(226215.6424533479)=-58.328781693883265; dx=8.804257830432805E-7 evalInputDelta=3.5086321062421035
END: th(75405.21415111596)=-58.226358612844784; dx=-1.8574547601344554E-5 evalInputDelta=3.406209025203623
Fitness changed from -54.82014958764116 to -58.328781693883265
Iteration 10 complete. Error: -58.328781693883265 Total: 4.6747; Orientation: 0.2776; Line Search: 3.5917
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/7e5281ea-8de5-488d-9747-288df2a54ca2.jpg)
Adding measurement 3ff3ac04 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.946e+04, gradient 8.505e-03, dot -0.390; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.328781693883265, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 3ff3ac04 to history. Total: 3
th(0)=-58.328781693883265;dx=-7.22539655343951E-5
New Minimum: -58.328781693883265 > -63.72217532493174
WOLF (strong): th(162455.60917644732)=-63.72217532493174; dx=1.2657837504794447E-6 evalInputDelta=5.393393631048475
END: th(81227.80458822366)=-63.29499776832191; dx=-2.3045660410660363E-5 evalInputDelta=4.966216074438648
Fitness changed from -58.328781693883265 to -63.72217532493174
Iteration 11 complete. Error: -63.72217532493174 Total: 3.8620; Orientation: 0.2731; Line Search: 2.6342
Adding measurement 770d5bc8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.211e+04, gradient 7.343e-03, dot -0.475; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.72217532493174, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 770d5bc8 to history. Total: 3
th(0)=-63.72217532493174;dx=-5.37889406669906E-5
New Minimum: -63.72217532493174 > -68.21395081643279
END: th(175000.0000000001)=-68.21395081643279; dx=-3.6797500526454027E-6 evalInputDelta=4.491775491501045
Fitness changed from -63.72217532493174 to -68.21395081643279
Iteration 12 complete. Error: -68.21395081643279 Total: 2.7991; Orientation: 0.2723; Line Search: 1.7031
Adding measurement 385ad4c5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.229e+05, gradient 7.240e-03, dot -0.491; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.21395081643279, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 385ad4c5 to history. Total: 3
th(0)=-68.21395081643279;dx=-5.198893349562251E-5
New Minimum: -68.21395081643279 > -69.65620589461706
WOLF (strong): th(377026.07075557986)=-69.65620589461706; dx=2.759686761746025E-6 evalInputDelta=1.4422550781842745
New Minimum: -69.65620589461706 > -71.97583381056015
END: th(188513.03537778993)=-71.97583381056015; dx=-1.5802595940841319E-7 evalInputDelta=3.7618829941273617
Fitness changed from -68.21395081643279 to -71.97583381056015
Iteration 13 complete. Error: -71.97583381056015 Total: 3.8769; Orientation: 0.2780; Line Search: 2.7861
Adding measurement 3a1eb69a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.999e+05, gradient 7.431e-03, dot -0.485; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -71.97583381056015, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 3a1eb69a to history. Total: 3
th(0)=-71.97583381056015;dx=-5.519620813574473E-5
New Minimum: -71.97583381056015 > -72.57596031430556
WOLF (strong): th(406139.0229411184)=-72.57596031430556; dx=5.489154377408432E-6 evalInputDelta=0.6001265037454147
New Minimum: -72.57596031430556 > -75.99907756343762
WOLF (strong): th(203069.5114705592)=-75.99907756343762; dx=1.6236723509657383E-6 evalInputDelta=4.023243752877477
END: th(67689.83715685307)=-75.2086787631929; dx=-2.4987031798741466E-5 evalInputDelta=3.2328449526327603
Fitness changed from -71.97583381056015 to -75.99907756343762
Iteration 14 complete. Error: -75.99907756343762 Total: 4.5089; Orientation: 0.2731; Line Search: 3.4491
Adding measurement 2688e7f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.311e+05, gradient 7.569e-03, dot -0.481; [a7d14732-69bb-4fbe-8eb6-7a35c3870c0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.99907756343762, -11.813402748681964, -6.0286262274259785, -1.9904208857244823
LBFGS Accumulation History: 3 points
Removed measurement 2688e7f7 to history. Total: 3
th(0)=-75.99907756343762;dx=-5.701162338775411E-5
New Minimum: -75.99907756343762 > -80.66645799746192
END: th(145833.33333333343)=-80.66645799746192; dx=-5.857776359166103E-6 evalInputDelta=4.667380434024295
Fitness changed from -75.99907756343762 to -80.66645799746192
Iteration 15 complete. Error: -80.66645799746192 Total: 2.8136; Orientation: 0.2773; Line Search: 1.7166
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/86f65e96-e139-4a03-bb7b-0230eb9bdb53.jpg)
Final threshold in iteration 16: -80.66645799746192 (> -Infinity) after 63.446s (< 5400.000s)
Returns
-80.66645799746192