BasicOptimizer.scala:89 executed in 581.93 seconds (4.499 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: 6582189628775
Reset training subject: 6594328241183
Adding measurement 7d7854d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-42.99221384525299;dx=-9.711686538735694E-7
New Minimum: -42.99221384525299 > -42.99221450090408
END: th(2.154434690031884)=-42.99221450090408; dx=-6.194056468302383E-7 evalInputDelta=6.556510925292969E-7
Fitness changed from -42.99221384525299 to -42.99221450090408
Iteration 1 complete. Error: -42.99221450090408 Total: 61.0684; Orientation: 0.0739; Line Search: 24.1532
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c1cab4e3-da83-4931-a457-3e0531ae97a6.jpg)
Adding measurement 48b1afae to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-42.99221450090408;dx=-6.15961415363622E-7
New Minimum: -42.99221450090408 > -42.99221861362457
WOLFE (weak): th(4.641588833612779)=-42.99221861362457; dx=-6.15509426698619E-7 evalInputDelta=4.112720489501953E-6
New Minimum: -42.99221861362457 > -42.99222141504288
WOLFE (weak): th(9.283177667225559)=-42.99222141504288; dx=-6.153000244145822E-7 evalInputDelta=6.9141387939453125E-6
New Minimum: -42.99222141504288 > -42.99223482608795
WOLFE (weak): th(27.849533001676676)=-42.99223482608795; dx=-6.147677146836227E-7 evalInputDelta=2.0325183868408203E-5
New Minimum: -42.99223482608795 > -42.992291033267975
WOLFE (weak): th(111.3981320067067)=-42.992291033267975; dx=-6.1431511087585E-7 evalInputDelta=7.653236389160156E-5
New Minimum: -42.992291033267975 > -42.99259912967682
WOLFE (weak): th(556.9906600335335)=-42.99259912967682; dx=-6.141848221868724E-7 evalInputDelta=3.846287727355957E-4
New Minimum: -42.99259912967682 > -42.99452221393585
WOLFE (weak): th(3341.9439602012008)=-42.99452221393585; dx=-6.139068929389294E-7 evalInputDelta=0.002307713031768799
New Minimum: -42.99452221393585 > -43.00834274291992
WOLFE (weak): th(23393.607721408407)=-43.00834274291992; dx=-6.117501438036235E-7 evalInputDelta=0.016128242015838623
New Minimum: -43.00834274291992 > -43.11937701702118
WOLFE (weak): th(187148.86177126726)=-43.11937701702118; dx=-5.932139249702515E-7 evalInputDelta=0.12716251611709595
New Minimum: -43.11937701702118 > -43.95976370573044
END: th(1684339.7559414054)=-43.95976370573044; dx=-4.0548075775518657E-7 evalInputDelta=0.967549204826355
Fitness changed from -42.99221450090408 to -43.95976370573044
Iteration 2 complete. Error: -43.95976370573044 Total: 140.2418; Orientation: 0.0737; Line Search: 126.9009
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e5497bf3-6a3f-40e4-bfa6-d745cca2455c.jpg)
Adding measurement 2f0bea4a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-43.95976370573044;dx=-3.804787161012038E-7
New Minimum: -43.95976370573044 > -45.081084847450256
END: th(3628800.0000000005)=-45.081084847450256; dx=-2.0047752669325547E-7 evalInputDelta=1.1213211417198181
Fitness changed from -43.95976370573044 to -45.081084847450256
Iteration 3 complete. Error: -45.081084847450256 Total: 38.9755; Orientation: 0.0757; Line Search: 25.5162
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f8f7b22f-acec-448f-b683-b7a09b7dbe80.jpg)
Adding measurement c98bde to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.655e+03, gradient 4.606e-04, dot -0.697; [7906a576-05a7-4c7c-bcdd-385982046c32 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.081084847450256, -43.95976370573044, -42.99221450090408, -42.99221384525299
LBFGS Accumulation History: 3 points
Removed measurement c98bde to history. Total: 3
th(0)=-45.081084847450256;dx=-2.1215530623918893E-7
New Minimum: -45.081084847450256 > -46.35017412900925
END: th(7818012.603187701)=-46.35017412900925; dx=-9.812785242038811E-8 evalInputDelta=1.2690892815589905
Fitness changed from -45.081084847450256 to -46.35017412900925
Iteration 4 complete. Error: -46.35017412900925 Total: 39.9804; Orientation: 1.6323; Line Search: 25.4620
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/058a118a-eaaa-4a00-9872-77da8d39b3a5.jpg)
Adding measurement 6cf32b61 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.489e+03, gradient 3.910e-04, dot -0.592; [7906a576-05a7-4c7c-bcdd-385982046c32 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.35017412900925, -43.95976370573044, -42.99221450090408, -42.99221384525299
LBFGS Accumulation History: 3 points
Removed measurement 6cf32b61 to history. Total: 3
th(0)=-46.35017412900925;dx=-1.5282293075867735E-7
New Minimum: -46.35017412900925 > -47.563261926174164
END: th(1.6843397559414055E7)=-47.563261926174164; dx=-2.306235625540704E-8 evalInputDelta=1.213087797164917
Fitness changed from -46.35017412900925 to -47.563261926174164
Iteration 5 complete. Error: -47.563261926174164 Total: 40.8286; Orientation: 1.5625; Line Search: 25.4497
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/885e8fba-1037-4a85-ac7d-df68d9ca78f8.jpg)
Adding measurement 6fa2a891 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.421e+03, gradient 4.257e-04, dot -0.298; [7906a576-05a7-4c7c-bcdd-385982046c32 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.563261926174164, -43.95976370573044, -42.99221450090408, -42.99221384525299
LBFGS Accumulation History: 3 points
Removed measurement 6fa2a891 to history. Total: 3
th(0)=-47.563261926174164;dx=-1.812289278677891E-7
Armijo: th(3.628800000000001E7)=-47.43001866340637; dx=3.806960744785161E-8 evalInputDelta=-0.13324326276779175
New Minimum: -47.563261926174164 > -48.28125882148743
WOLF (strong): th(1.8144000000000004E7)=-48.28125882148743; dx=3.35057167906978E-8 evalInputDelta=0.7179968953132629
New Minimum: -48.28125882148743 > -48.336116790771484
END: th(6048000.000000001)=-48.336116790771484; dx=-5.4256318469630094E-8 evalInputDelta=0.7728548645973206
Fitness changed from -47.563261926174164 to -48.336116790771484
Iteration 6 complete. Error: -48.336116790771484 Total: 65.5398; Orientation: 1.5421; Line Search: 50.3404
Adding measurement 7c4eca19 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.385e+03, gradient 2.850e-04, dot -0.564; [7906a576-05a7-4c7c-bcdd-385982046c32 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.336116790771484, -43.95976370573044, -42.99221450090408, -42.99221384525299
LBFGS Accumulation History: 3 points
Removed measurement 7c4eca19 to history. Total: 3
th(0)=-48.336116790771484;dx=-8.122883476706102E-8
New Minimum: -48.336116790771484 > -49.04221171140671
END: th(1.3030021005312836E7)=-49.04221171140671; dx=-2.2565734926257192E-8 evalInputDelta=0.7060949206352234
Fitness changed from -48.336116790771484 to -49.04221171140671
Iteration 7 complete. Error: -49.04221171140671 Total: 38.0708; Orientation: 1.5815; Line Search: 24.3572
Adding measurement 5a724ed1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.064e+03, gradient 2.912e-04, dot -0.484; [7906a576-05a7-4c7c-bcdd-385982046c32 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.04221171140671, -43.95976370573044, -42.99221450090408, -42.99221384525299
LBFGS Accumulation History: 3 points
Removed measurement 5a724ed1 to history. Total: 3
th(0)=-49.04221171140671;dx=-8.481224411782881E-8
New Minimum: -49.04221171140671 > -49.335450410842896
WOLF (strong): th(2.8072329265690096E7)=-49.335450410842896; dx=1.6407059559676178E-8 evalInputDelta=0.29323869943618774
New Minimum: -49.335450410842896 > -49.54428941011429
WOLF (strong): th(1.4036164632845048E7)=-49.54428941011429; dx=2.211237947981781E-9 evalInputDelta=0.5020776987075806
END: th(4678721.544281683)=-49.38256913423538; dx=-4.552973904414412E-8 evalInputDelta=0.3403574228286743
Fitness changed from -49.04221171140671 to -49.54428941011429
Iteration 8 complete. Error: -49.54428941011429 Total: 64.1457; Orientation: 1.7594; Line Search: 50.2588
Adding measurement 33e524d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.238e+03, gradient 3.011e-04, dot -0.405; [7906a576-05a7-4c7c-bcdd-385982046c32 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.54428941011429, -43.95976370573044, -42.99221450090408, -42.99221384525299
LBFGS Accumulation History: 3 points
Removed measurement 33e524d1 to history. Total: 3
th(0)=-49.54428941011429;dx=-9.062345983886428E-8
New Minimum: -49.54428941011429 > -50.096732914447784
END: th(1.0080000000000004E7)=-50.096732914447784; dx=-8.727953557176718E-9 evalInputDelta=0.5524435043334961
Fitness changed from -49.54428941011429 to -50.096732914447784
Iteration 9 complete. Error: -50.096732914447784 Total: 39.3427; Orientation: 1.5408; Line Search: 24.9020
Adding measurement 79ed94a4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.377e+03, gradient 2.253e-04, dot -0.558; [7906a576-05a7-4c7c-bcdd-385982046c32 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.096732914447784, -43.95976370573044, -42.99221450090408, -42.99221384525299
LBFGS Accumulation History: 3 points
Removed measurement 79ed94a4 to history. Total: 3
th(0)=-50.096732914447784;dx=-5.072739961769963E-8
New Minimum: -50.096732914447784 > -50.48803651332855
WOLF (strong): th(2.1716701675521396E7)=-50.48803651332855; dx=5.740565812473313E-9 evalInputDelta=0.3913035988807678
END: th(1.0858350837760698E7)=-50.47062313556671; dx=-1.3666717121864362E-8 evalInputDelta=0.373890221118927
Fitness changed from -50.096732914447784 to -50.48803651332855
Iteration 10 complete. Error: -50.48803651332855 Total: 52.5840; Orientation: 1.5658; Line Search: 38.2448
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/26791b03-5a5b-4daf-be0f-4515e7c457fb.jpg)
Final threshold in iteration 11: -50.48803651332855 (> -Infinity) after 581.924s (< 5400.000s)
Returns
-50.48803651332855