BasicOptimizer.scala:89 executed in 85.67 seconds (1.160 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: 304767481761500
Reset training subject: 304769204679100
Adding measurement 8704989 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-150.34215056082465;dx=-2.8545385052419205E-5
New Minimum: -150.34215056082465 > -150.3421916303313
END: th(2.154434690031884)=-150.3421916303313; dx=-1.7873514503164123E-5 evalInputDelta=4.1069506664825894E-5
Fitness changed from -150.34215056082465 to -150.3421916303313
Iteration 1 complete. Error: -150.3421916303313 Total: 8.3957; Orientation: 0.0650; Line Search: 3.4249
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7eccfed3-2db5-47f4-b697-1d9efae83425.jpg)
Adding measurement 55571980 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-150.3421916303313;dx=-1.772997077908345E-5
New Minimum: -150.3421916303313 > -150.34228061422397
WOLFE (weak): th(4.641588833612779)=-150.34228061422397; dx=-1.773000755145309E-5 evalInputDelta=8.898389265254991E-5
New Minimum: -150.34228061422397 > -150.34236959806393
WOLFE (weak): th(9.283177667225559)=-150.34236959806393; dx=-1.770425462159464E-5 evalInputDelta=1.7796773261125054E-4
New Minimum: -150.34236959806393 > -150.3427392226816
WOLFE (weak): th(27.849533001676676)=-150.3427392226816; dx=-1.7702779788022014E-5 evalInputDelta=5.475923502729074E-4
New Minimum: -150.3427392226816 > -150.34437514294822
WOLFE (weak): th(111.3981320067067)=-150.34437514294822; dx=-1.7680787915791548E-5 evalInputDelta=0.002183512616909411
New Minimum: -150.34437514294822 > -150.35312256515283
WOLFE (weak): th(556.9906600335335)=-150.35312256515283; dx=-1.76860578967428E-5 evalInputDelta=0.010930934821516303
New Minimum: -150.35312256515283 > -150.40772427151904
WOLFE (weak): th(3341.9439602012008)=-150.40772427151904; dx=-1.767849539539404E-5 evalInputDelta=0.06553264118772972
New Minimum: -150.40772427151904 > -150.80023336327656
WOLFE (weak): th(23393.607721408407)=-150.80023336327656; dx=-1.76239013214161E-5 evalInputDelta=0.4580417329452473
New Minimum: -150.80023336327656 > -153.94561012992276
WOLFE (weak): th(187148.86177126726)=-153.94561012992276; dx=-1.7032025901324104E-5 evalInputDelta=3.6034184995914416
New Minimum: -153.94561012992276 > -176.510407632781
END: th(1684339.7559414054)=-176.510407632781; dx=-9.972617630885714E-6 evalInputDelta=26.168216002449697
Fitness changed from -150.3421916303313 to -176.510407632781
Iteration 2 complete. Error: -176.510407632781 Total: 18.5567; Orientation: 0.0639; Line Search: 16.6395
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7a7bc48d-3c99-411e-a402-0dbe11831ac8.jpg)
Adding measurement 36a7919e to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-176.510407632781;dx=-1.2319087511479937E-5
New Minimum: -176.510407632781 > -206.5218893456609
END: th(3628800.0000000005)=-206.5218893456609; dx=-4.22122046881814E-6 evalInputDelta=30.011481712879885
Fitness changed from -176.510407632781 to -206.5218893456609
Iteration 3 complete. Error: -206.5218893456609 Total: 5.2550; Orientation: 0.0638; Line Search: 3.3139
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/26e55161-0f8e-46f7-8e64-1f6e4f06420b.jpg)
Adding measurement 5f0bb544 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.331e+04, gradient 3.145e-03, dot -0.413; [ac85124d-218b-4ba9-b2ef-9073fab696f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -206.5218893456609, -176.510407632781, -150.3421916303313, -150.34215056082465
LBFGS Accumulation History: 3 points
Removed measurement 5f0bb544 to history. Total: 3
th(0)=-206.5218893456609;dx=-9.890953421285728E-6
New Minimum: -206.5218893456609 > -229.86530195293466
WOLF (strong): th(7818012.603187701)=-229.86530195293466; dx=1.3200191393205618E-7 evalInputDelta=23.343412607273763
END: th(3909006.3015938504)=-227.5495018850522; dx=-1.9250903877462855E-6 evalInputDelta=21.0276125393913
Fitness changed from -206.5218893456609 to -229.86530195293466
Iteration 4 complete. Error: -229.86530195293466 Total: 8.0621; Orientation: 1.1249; Line Search: 5.0068
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/bac8b02b-b318-473c-97eb-bf44712d2814.jpg)
Adding measurement 469ca3a3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.806e+03, gradient 3.801e-03, dot -0.147; [ac85124d-218b-4ba9-b2ef-9073fab696f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -229.86530195293466, -176.510407632781, -150.3421916303313, -150.34215056082465
LBFGS Accumulation History: 3 points
Removed measurement 469ca3a3 to history. Total: 3
th(0)=-229.86530195293466;dx=-1.444551049540699E-5
New Minimum: -229.86530195293466 > -239.8839352914025
WOLF (strong): th(8421698.779707028)=-239.8839352914025; dx=4.508493014405839E-6 evalInputDelta=10.01863333846785
New Minimum: -239.8839352914025 > -257.7314889791117
WOLF (strong): th(4210849.389853514)=-257.7314889791117; dx=1.0061901719791167E-6 evalInputDelta=27.866187026177045
END: th(1403616.4632845046)=-247.9144799002703; dx=-8.748864513289018E-6 evalInputDelta=18.049177947335636
Fitness changed from -229.86530195293466 to -257.7314889791117
Iteration 5 complete. Error: -257.7314889791117 Total: 9.7399; Orientation: 1.1171; Line Search: 6.6820
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/6d224942-029c-4ade-bdc7-a65b29c9d77a.jpg)
Adding measurement 51a2ff3e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.774e+04, gradient 3.048e-03, dot -0.247; [ac85124d-218b-4ba9-b2ef-9073fab696f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -257.7314889791117, -176.510407632781, -150.3421916303313, -150.34215056082465
LBFGS Accumulation History: 3 points
Removed measurement 51a2ff3e to history. Total: 3
th(0)=-257.7314889791117;dx=-9.291344552377165E-6
New Minimum: -257.7314889791117 > -274.7102678113095
END: th(3024000.0000000005)=-274.7102678113095; dx=-1.2751450780421015E-6 evalInputDelta=16.978778832197804
Fitness changed from -257.7314889791117 to -274.7102678113095
Iteration 6 complete. Error: -274.7102678113095 Total: 6.5333; Orientation: 1.2719; Line Search: 3.3678
Adding measurement 2ae3717 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.926e+04, gradient 2.309e-03, dot -0.419; [ac85124d-218b-4ba9-b2ef-9073fab696f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -274.7102678113095, -176.510407632781, -150.3421916303313, -150.34215056082465
LBFGS Accumulation History: 3 points
Removed measurement 2ae3717 to history. Total: 3
th(0)=-274.7102678113095;dx=-5.327718527363627E-6
New Minimum: -274.7102678113095 > -286.40785152638944
WOLF (strong): th(6515010.502656418)=-286.40785152638944; dx=5.638544302623719E-7 evalInputDelta=11.69758371507993
END: th(3257505.251328209)=-286.08696985835974; dx=-1.458939436066005E-6 evalInputDelta=11.37670204705023
Fitness changed from -274.7102678113095 to -286.40785152638944
Iteration 7 complete. Error: -286.40785152638944 Total: 7.8097; Orientation: 1.1173; Line Search: 5.1722
Adding measurement b307f50 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.153e+04, gradient 3.075e-03, dot -0.211; [ac85124d-218b-4ba9-b2ef-9073fab696f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -286.40785152638944, -176.510407632781, -150.3421916303313, -150.34215056082465
LBFGS Accumulation History: 3 points
Removed measurement b307f50 to history. Total: 3
th(0)=-286.40785152638944;dx=-9.457220444923178E-6
New Minimum: -286.40785152638944 > -287.39099237266174
WOLF (strong): th(7018082.316422524)=-287.39099237266174; dx=4.426128684026435E-6 evalInputDelta=0.9831408462723061
New Minimum: -287.39099237266174 > -301.74841843467834
WOLF (strong): th(3509041.158211262)=-301.74841843467834; dx=1.1008727154959062E-6 evalInputDelta=15.340566908288906
END: th(1169680.3860704207)=-296.3975180941381; dx=-5.950852089509094E-6 evalInputDelta=9.989666567748657
Fitness changed from -286.40785152638944 to -301.74841843467834
Iteration 8 complete. Error: -301.74841843467834 Total: 9.1141; Orientation: 1.0853; Line Search: 6.4793
Adding measurement 5f28c3a6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.006e+04, gradient 2.273e-03, dot -0.333; [ac85124d-218b-4ba9-b2ef-9073fab696f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -301.74841843467834, -176.510407632781, -150.3421916303313, -150.34215056082465
LBFGS Accumulation History: 3 points
Removed measurement 5f28c3a6 to history. Total: 3
th(0)=-301.74841843467834;dx=-5.1517992539345485E-6
New Minimum: -301.74841843467834 > -310.4159068782233
END: th(2520000.000000001)=-310.4159068782233; dx=-1.348234247782068E-6 evalInputDelta=8.667488443544983
Fitness changed from -301.74841843467834 to -310.4159068782233
Iteration 9 complete. Error: -310.4159068782233 Total: 5.9427; Orientation: 1.0945; Line Search: 3.2729
Adding measurement 2bc3066f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.398e+04, gradient 1.669e-03, dot -0.471; [ac85124d-218b-4ba9-b2ef-9073fab696f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -310.4159068782233, -176.510407632781, -150.3421916303313, -150.34215056082465
LBFGS Accumulation History: 3 points
Removed measurement 2bc3066f to history. Total: 3
th(0)=-310.4159068782233;dx=-2.7860464162749006E-6
New Minimum: -310.4159068782233 > -319.0637781050004
END: th(5429175.418880349)=-319.0637781050004; dx=-6.342741780694178E-7 evalInputDelta=8.647871226777056
Fitness changed from -310.4159068782233 to -319.0637781050004
Iteration 10 complete. Error: -319.0637781050004 Total: 5.9764; Orientation: 1.0312; Line Search: 3.3072
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0cde8e46-55bd-4386-ba43-53f6ec3d0af3.jpg)
Final threshold in iteration 11: -319.0637781050004 (> -Infinity) after 85.674s (< 5400.000s)
Returns
-319.0637781050004