BasicOptimizer.scala:89 executed in 579.04 seconds (4.274 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: 2048639688703
Reset training subject: 2061228613572
Adding measurement 2357457d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-38.68963637948036;dx=-9.74039566377394E-7
New Minimum: -38.68963637948036 > -38.68963676691055
END: th(2.154434690031884)=-38.68963676691055; dx=-6.418532539611536E-7 evalInputDelta=3.8743019104003906E-7
Fitness changed from -38.68963637948036 to -38.68963676691055
Iteration 1 complete. Error: -38.68963676691055 Total: 61.7543; Orientation: 0.0735; Line Search: 24.9633
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b863d8f7-6607-4a42-8c8a-d0d9c3ab0cc9.jpg)
Adding measurement ce328df to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-38.68963676691055;dx=-6.362379761744921E-7
New Minimum: -38.68963676691055 > -38.689641028642654
WOLFE (weak): th(4.641588833612779)=-38.689641028642654; dx=-6.359569793235173E-7 evalInputDelta=4.26173210144043E-6
New Minimum: -38.689641028642654 > -38.68964496254921
WOLFE (weak): th(9.283177667225559)=-38.68964496254921; dx=-6.357468295055668E-7 evalInputDelta=8.195638656616211E-6
New Minimum: -38.68964496254921 > -38.68965822458267
WOLFE (weak): th(27.849533001676676)=-38.68965822458267; dx=-6.35227717019277E-7 evalInputDelta=2.1457672119140625E-5
New Minimum: -38.68965822458267 > -38.68971890211105
WOLFE (weak): th(111.3981320067067)=-38.68971890211105; dx=-6.347254809553483E-7 evalInputDelta=8.213520050048828E-5
New Minimum: -38.68971890211105 > -38.69004160165787
WOLFE (weak): th(556.9906600335335)=-38.69004160165787; dx=-6.346048311615569E-7 evalInputDelta=4.048347473144531E-4
New Minimum: -38.69004160165787 > -38.69205552339554
WOLFE (weak): th(3341.9439602012008)=-38.69205552339554; dx=-6.343768534341391E-7 evalInputDelta=0.0024187564849853516
New Minimum: -38.69205552339554 > -38.706535279750824
WOLFE (weak): th(23393.607721408407)=-38.706535279750824; dx=-6.325952475445639E-7 evalInputDelta=0.016898512840270996
New Minimum: -38.706535279750824 > -38.823329985141754
WOLFE (weak): th(187148.86177126726)=-38.823329985141754; dx=-6.173938779862175E-7 evalInputDelta=0.13369321823120117
New Minimum: -38.823329985141754 > -39.7356251180172
END: th(1684339.7559414054)=-39.7356251180172; dx=-4.4695860704006096E-7 evalInputDelta=1.0459883511066437
Fitness changed from -38.68963676691055 to -39.7356251180172
Iteration 2 complete. Error: -39.7356251180172 Total: 137.5656; Orientation: 0.0743; Line Search: 125.0114
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/625391d7-09a8-4386-ad2b-ba6cd475b5b5.jpg)
Adding measurement 39097400 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-39.7356251180172;dx=-4.670172156823131E-7
New Minimum: -39.7356251180172 > -41.16596645116806
END: th(3628800.0000000005)=-41.16596645116806; dx=-2.692229850239381E-7 evalInputDelta=1.4303413331508636
Fitness changed from -39.7356251180172 to -41.16596645116806
Iteration 3 complete. Error: -41.16596645116806 Total: 38.6309; Orientation: 0.0748; Line Search: 25.1599
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d0d8a638-2aa8-4ec5-9930-6a3e7c1ec278.jpg)
Adding measurement 21057e1f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.987e+03, gradient 5.611e-04, dot -0.720; [c121b911-5ee9-4f9f-a42b-d56a387ee3e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -41.16596645116806, -39.7356251180172, -38.68963676691055, -38.68963637948036
LBFGS Accumulation History: 3 points
Removed measurement 21057e1f to history. Total: 3
th(0)=-41.16596645116806;dx=-3.1480989507717157E-7
New Minimum: -41.16596645116806 > -42.9452269077301
END: th(7818012.603187701)=-42.9452269077301; dx=-1.3361001547835497E-7 evalInputDelta=1.7792604565620422
Fitness changed from -41.16596645116806 to -42.9452269077301
Iteration 4 complete. Error: -42.9452269077301 Total: 39.7363; Orientation: 1.5875; Line Search: 25.3247
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/9db71225-b42d-4a71-b9f6-8e1e074d70c7.jpg)
Adding measurement 590186b4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.120e+03, gradient 5.210e-04, dot -0.540; [c121b911-5ee9-4f9f-a42b-d56a387ee3e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -42.9452269077301, -39.7356251180172, -38.68963676691055, -38.68963637948036
LBFGS Accumulation History: 3 points
Removed measurement 590186b4 to history. Total: 3
th(0)=-42.9452269077301;dx=-2.7141167925392674E-7
New Minimum: -42.9452269077301 > -44.33868137001991
END: th(1.6843397559414055E7)=-44.33868137001991; dx=-8.652369967788565E-9 evalInputDelta=1.3934544622898102
Fitness changed from -42.9452269077301 to -44.33868137001991
Iteration 5 complete. Error: -44.33868137001991 Total: 39.7423; Orientation: 1.5829; Line Search: 24.2436
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/096dc945-fb54-463c-8b11-a70fc99d99e0.jpg)
Adding measurement 64029d6b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.474e+03, gradient 6.055e-04, dot -0.215; [c121b911-5ee9-4f9f-a42b-d56a387ee3e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.33868137001991, -39.7356251180172, -38.68963676691055, -38.68963637948036
LBFGS Accumulation History: 3 points
Removed measurement 64029d6b to history. Total: 3
th(0)=-44.33868137001991;dx=-3.6664850070623593E-7
Armijo: th(3.628800000000001E7)=-43.37651491165161; dx=7.00145389427591E-8 evalInputDelta=-0.9621664583683014
New Minimum: -44.33868137001991 > -45.20856124162674
WOLF (strong): th(1.8144000000000004E7)=-45.20856124162674; dx=8.936324187691985E-8 evalInputDelta=0.8698798716068268
New Minimum: -45.20856124162674 > -45.77385115623474
END: th(6048000.000000001)=-45.77385115623474; dx=-6.991042753868624E-8 evalInputDelta=1.4351697862148285
Fitness changed from -44.33868137001991 to -45.77385115623474
Iteration 6 complete. Error: -45.77385115623474 Total: 66.0672; Orientation: 1.5904; Line Search: 50.9330
Adding measurement 18ef5d5f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.063e+03, gradient 4.089e-04, dot -0.418; [c121b911-5ee9-4f9f-a42b-d56a387ee3e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.77385115623474, -39.7356251180172, -38.68963676691055, -38.68963637948036
LBFGS Accumulation History: 3 points
Removed measurement 18ef5d5f to history. Total: 3
th(0)=-45.77385115623474;dx=-1.6713328093181237E-7
New Minimum: -45.77385115623474 > -46.77944457530975
END: th(1.3030021005312836E7)=-46.77944457530975; dx=-1.0043612419261858E-9 evalInputDelta=1.0055934190750122
Fitness changed from -45.77385115623474 to -46.77944457530975
Iteration 7 complete. Error: -46.77944457530975 Total: 38.7793; Orientation: 1.5785; Line Search: 24.6052
Adding measurement 2ccbfa60 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.090e+03, gradient 4.273e-04, dot -0.342; [c121b911-5ee9-4f9f-a42b-d56a387ee3e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.77944457530975, -39.7356251180172, -38.68963676691055, -38.68963637948036
LBFGS Accumulation History: 3 points
Removed measurement 2ccbfa60 to history. Total: 3
th(0)=-46.77944457530975;dx=-1.8256243257662212E-7
Armijo: th(2.8072329265690096E7)=-46.45233905315399; dx=6.542664604590391E-8 evalInputDelta=-0.3271055221557617
New Minimum: -46.77944457530975 > -47.53098928928375
WOLF (strong): th(1.4036164632845048E7)=-47.53098928928375; dx=4.33714771176574E-8 evalInputDelta=0.751544713973999
END: th(4678721.544281683)=-47.47453570365906; dx=-7.830866272655504E-8 evalInputDelta=0.6950911283493042
Fitness changed from -46.77944457530975 to -47.53098928928375
Iteration 8 complete. Error: -47.53098928928375 Total: 64.2677; Orientation: 1.5615; Line Search: 50.6761
Adding measurement 531eba38 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.157e+03, gradient 4.304e-04, dot -0.291; [c121b911-5ee9-4f9f-a42b-d56a387ee3e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.53098928928375, -39.7356251180172, -38.68963676691055, -38.68963637948036
LBFGS Accumulation History: 3 points
Removed measurement 531eba38 to history. Total: 3
th(0)=-47.53098928928375;dx=-1.8517789788869343E-7
New Minimum: -47.53098928928375 > -48.497335851192474
WOLF (strong): th(1.0080000000000004E7)=-48.497335851192474; dx=9.724454342206262E-10 evalInputDelta=0.9663465619087219
END: th(5040000.000000002)=-48.28948849439621; dx=-7.995934237452978E-8 evalInputDelta=0.7584992051124573
Fitness changed from -47.53098928928375 to -48.497335851192474
Iteration 9 complete. Error: -48.497335851192474 Total: 52.0108; Orientation: 1.5566; Line Search: 38.1913
Adding measurement 880e1a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.852e+03, gradient 2.931e-04, dot -0.465; [c121b911-5ee9-4f9f-a42b-d56a387ee3e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.497335851192474, -39.7356251180172, -38.68963676691055, -38.68963637948036
LBFGS Accumulation History: 3 points
Removed measurement 880e1a2 to history. Total: 3
th(0)=-48.497335851192474;dx=-8.586677385991275E-8
New Minimum: -48.497335851192474 > -49.10537391901016
END: th(1.0858350837760698E7)=-49.10537391901016; dx=-1.5542274229977997E-8 evalInputDelta=0.608038067817688
Fitness changed from -48.497335851192474 to -49.10537391901016
Iteration 10 complete. Error: -49.10537391901016 Total: 39.7713; Orientation: 1.5583; Line Search: 25.4286
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e9b3a4e0-5dfc-471b-92db-c49751e52851.jpg)
Final threshold in iteration 11: -49.10537391901016 (> -Infinity) after 579.034s (< 5400.000s)
Returns
-49.10537391901016