BasicOptimizer.scala:89 executed in 111.76 seconds (1.961 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: 45327433040600
Reset training subject: 45329766987300
Adding measurement 5f138b46 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-50.04248854999232;dx=-1.6379914085707342E-6
New Minimum: -50.04248854999232 > -50.04249204509951
END: th(2.154434690031884)=-50.04249204509951; dx=-1.2812187768336693E-6 evalInputDelta=3.495107186779478E-6
Fitness changed from -50.04248854999232 to -50.04249204509951
Iteration 1 complete. Error: -50.04249204509951 Total: 11.4217; Orientation: 0.0620; Line Search: 4.5156
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/27e818b6-3ce5-415d-b32d-b1c703192eb2.jpg)
Adding measurement 59889dbc to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-50.04249204509951;dx=-1.2671833240677995E-6
New Minimum: -50.04249204509951 > -50.0425007828664
WOLFE (weak): th(4.641588833612779)=-50.0425007828664; dx=-1.2650930893323033E-6 evalInputDelta=8.73776689047645E-6
New Minimum: -50.0425007828664 > -50.042506025525796
WOLFE (weak): th(9.283177667225559)=-50.042506025525796; dx=-1.2642330846353527E-6 evalInputDelta=1.3980426288640047E-5
New Minimum: -50.042506025525796 > -50.04253223881457
WOLFE (weak): th(27.849533001676676)=-50.04253223881457; dx=-1.2629829124206735E-6 evalInputDelta=4.0193715065584E-5
New Minimum: -50.04253223881457 > -50.042645829573935
WOLFE (weak): th(111.3981320067067)=-50.042645829573935; dx=-1.2602073583758883E-6 evalInputDelta=1.5378447442770948E-4
New Minimum: -50.042645829573935 > -50.04325572016551
WOLFE (weak): th(556.9906600335335)=-50.04325572016551; dx=-1.2614038558959586E-6 evalInputDelta=7.636750660040548E-4
New Minimum: -50.04325572016551 > -50.047063436337886
WOLFE (weak): th(3341.9439602012008)=-50.047063436337886; dx=-1.2604629577483276E-6 evalInputDelta=0.004571391238378908
New Minimum: -50.047063436337886 > -50.07446031613761
WOLFE (weak): th(23393.607721408407)=-50.07446031613761; dx=-1.260321690559836E-6 evalInputDelta=0.03196827103810307
New Minimum: -50.07446031613761 > -50.296883407270414
WOLFE (weak): th(187148.86177126726)=-50.296883407270414; dx=-1.2453306964257977E-6 evalInputDelta=0.25439136217090663
New Minimum: -50.296883407270414 > -52.20772547356087
END: th(1684339.7559414054)=-52.20772547356087; dx=-1.1133405281549838E-6 evalInputDelta=2.165233428461363
Fitness changed from -50.04249204509951 to -52.20772547356087
Iteration 2 complete. Error: -52.20772547356087 Total: 25.6747; Orientation: 0.0624; Line Search: 22.6946
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/83b2540c-8979-452d-9e83-afa2b78d01d9.jpg)
Adding measurement 6ec68734 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-52.20772547356087;dx=-1.1092883309340024E-6
New Minimum: -52.20772547356087 > -55.8965184097206
END: th(3628800.0000000005)=-55.8965184097206; dx=-8.298715114150889E-7 evalInputDelta=3.6887929361597287
Fitness changed from -52.20772547356087 to -55.8965184097206
Iteration 3 complete. Error: -55.8965184097206 Total: 7.2358; Orientation: 0.0613; Line Search: 4.4269
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1e9578e7-e445-4516-b90e-dc191cb078b2.jpg)
Adding measurement 7c66c1dd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.544e+04, gradient 8.848e-04, dot -0.891; [7554605c-31af-4e9d-a2ca-ee7610054875 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.8965184097206, -52.20772547356087, -50.04249204509951, -50.04248854999232
LBFGS Accumulation History: 3 points
Removed measurement 7c66c1dd to history. Total: 3
th(0)=-55.8965184097206;dx=-7.802226567187608E-7
New Minimum: -55.8965184097206 > -61.35905617174766
END: th(7818012.603187701)=-61.35905617174766; dx=-5.358868547307897E-7 evalInputDelta=5.462537762027061
Fitness changed from -55.8965184097206 to -61.35905617174766
Iteration 4 complete. Error: -61.35905617174766 Total: 8.3415; Orientation: 1.0752; Line Search: 4.3995
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c952c3dd-f06b-462c-a8a1-126b12f504a7.jpg)
Adding measurement 44d50a7c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.375e+04, gradient 7.478e-04, dot -0.767; [7554605c-31af-4e9d-a2ca-ee7610054875 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.35905617174766, -52.20772547356087, -50.04249204509951, -50.04248854999232
LBFGS Accumulation History: 3 points
Removed measurement 44d50a7c to history. Total: 3
th(0)=-61.35905617174766;dx=-5.585426844743339E-7
New Minimum: -61.35905617174766 > -68.97008571491708
END: th(1.6843397559414055E7)=-68.97008571491708; dx=-3.221991644702605E-7 evalInputDelta=7.6110295431694155
Fitness changed from -61.35905617174766 to -68.97008571491708
Iteration 5 complete. Error: -68.97008571491708 Total: 8.2663; Orientation: 1.0515; Line Search: 4.4056
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/19084795-1f03-43be-9a99-a09270c058f9.jpg)
Adding measurement 21f5d734 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.834e+04, gradient 6.793e-04, dot -0.622; [7554605c-31af-4e9d-a2ca-ee7610054875 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.97008571491708, -52.20772547356087, -50.04249204509951, -50.04248854999232
LBFGS Accumulation History: 3 points
Removed measurement 21f5d734 to history. Total: 3
th(0)=-68.97008571491708;dx=-4.613190740259026E-7
New Minimum: -68.97008571491708 > -77.43933459692242
END: th(3.628800000000001E7)=-77.43933459692242; dx=-9.12302804071176E-8 evalInputDelta=8.469248882005346
Fitness changed from -68.97008571491708 to -77.43933459692242
Iteration 6 complete. Error: -77.43933459692242 Total: 8.6207; Orientation: 1.0274; Line Search: 4.7022
Adding measurement 625dcab6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.947e+04, gradient 8.472e-04, dot -0.292; [7554605c-31af-4e9d-a2ca-ee7610054875 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.43933459692242, -52.20772547356087, -50.04249204509951, -50.04248854999232
LBFGS Accumulation History: 3 points
Removed measurement 625dcab6 to history. Total: 3
th(0)=-77.43933459692242;dx=-7.169290538523334E-7
Armijo: th(7.818012603187701E7)=-70.25038473290708; dx=1.647989017770713E-7 evalInputDelta=-7.188949864015342
New Minimum: -77.43933459692242 > -79.47851074378009
WOLF (strong): th(3.9090063015938506E7)=-79.47851074378009; dx=2.1083864663970002E-7 evalInputDelta=2.0391761468576703
New Minimum: -79.47851074378009 > -83.22192508128623
END: th(1.3030021005312836E7)=-83.22192508128623; dx=-1.3917014018743711E-7 evalInputDelta=5.7825904843638085
Fitness changed from -77.43933459692242 to -83.22192508128623
Iteration 7 complete. Error: -83.22192508128623 Total: 13.2923; Orientation: 1.0212; Line Search: 10.0858
Adding measurement 2ad88337 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.315e+04, gradient 6.008e-04, dot -0.529; [7554605c-31af-4e9d-a2ca-ee7610054875 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -83.22192508128623, -52.20772547356087, -50.04249204509951, -50.04248854999232
LBFGS Accumulation History: 3 points
Removed measurement 2ad88337 to history. Total: 3
th(0)=-83.22192508128623;dx=-3.6031197468051457E-7
New Minimum: -83.22192508128623 > -87.98827813125666
END: th(2.8072329265690096E7)=-87.98827813125666; dx=-3.2422602432551156E-8 evalInputDelta=4.766353049970434
Fitness changed from -83.22192508128623 to -87.98827813125666
Iteration 8 complete. Error: -87.98827813125666 Total: 7.8811; Orientation: 1.0295; Line Search: 4.6355
Adding measurement 3bb02a30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.555e+04, gradient 7.610e-04, dot -0.352; [7554605c-31af-4e9d-a2ca-ee7610054875 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.98827813125666, -52.20772547356087, -50.04249204509951, -50.04248854999232
LBFGS Accumulation History: 3 points
Removed measurement 3bb02a30 to history. Total: 3
th(0)=-87.98827813125666;dx=-5.782868127433007E-7
Armijo: th(6.048000000000002E7)=-82.70174516301013; dx=1.8254188083651162E-7 evalInputDelta=-5.286532968246533
New Minimum: -87.98827813125666 > -90.03566325018078
WOLF (strong): th(3.024000000000001E7)=-90.03566325018078; dx=1.9048794552923102E-7 evalInputDelta=2.0473851189241117
New Minimum: -90.03566325018078 > -91.99614671147167
END: th(1.0080000000000004E7)=-91.99614671147167; dx=-1.7317034378102807E-7 evalInputDelta=4.007868580215003
Fitness changed from -87.98827813125666 to -91.99614671147167
Iteration 9 complete. Error: -91.99614671147167 Total: 12.4904; Orientation: 1.0208; Line Search: 9.2832
Adding measurement 7f6732c7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.705e+04, gradient 4.947e-04, dot -0.608; [7554605c-31af-4e9d-a2ca-ee7610054875 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.99614671147167, -52.20772547356087, -50.04249204509951, -50.04248854999232
LBFGS Accumulation History: 3 points
Removed measurement 7f6732c7 to history. Total: 3
th(0)=-91.99614671147167;dx=-2.437766074962573E-7
New Minimum: -91.99614671147167 > -95.76218388669291
END: th(2.1716701675521396E7)=-95.76218388669291; dx=-1.1785850473058407E-7 evalInputDelta=3.7660371752212427
Fitness changed from -91.99614671147167 to -95.76218388669291
Iteration 10 complete. Error: -95.76218388669291 Total: 8.0112; Orientation: 0.9915; Line Search: 4.5114
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3cef9a5f-b4dd-4109-af4c-e49e0e8dac43.jpg)
Final threshold in iteration 11: -95.76218388669291 (> -Infinity) after 111.761s (< 5400.000s)
Returns
-95.76218388669291