BasicOptimizer.scala:89 executed in 95.27 seconds (1.214 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: 288002509291000
Reset training subject: 288004465788600
Adding measurement 69cd9bcf to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-54.478942872081674;dx=-5.233442055614836E-6
New Minimum: -54.478942872081674 > -54.47894803242324
END: th(2.154434690031884)=-54.47894803242324; dx=-3.363077996102054E-6 evalInputDelta=5.16034156561318E-6
Fitness changed from -54.478942872081674 to -54.47894803242324
Iteration 1 complete. Error: -54.47894803242324 Total: 9.7053; Orientation: 0.0581; Line Search: 3.8613
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bf34972a-e743-4e33-bb83-4ff441b12998.jpg)
Adding measurement 165792fa to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-54.47894803242324;dx=-3.3630768057176263E-6
New Minimum: -54.47894803242324 > -54.47896867378461
WOLFE (weak): th(4.641588833612779)=-54.47896867378461; dx=-3.3630904997373943E-6 evalInputDelta=2.064136136681327E-5
New Minimum: -54.47896867378461 > -54.47898587491311
WOLFE (weak): th(9.283177667225559)=-54.47898587491311; dx=-3.3630880442836915E-6 evalInputDelta=3.784248986704597E-5
New Minimum: -54.47898587491311 > -54.47904435870938
WOLFE (weak): th(27.849533001676676)=-54.47904435870938; dx=-3.363095628275304E-6 evalInputDelta=9.63262861404246E-5
New Minimum: -54.47904435870938 > -54.479326456139034
WOLFE (weak): th(111.3981320067067)=-54.479326456139034; dx=-3.3630887956947374E-6 evalInputDelta=3.7842371579444034E-4
New Minimum: -54.479326456139034 > -54.48082636428291
WOLFE (weak): th(556.9906600335335)=-54.48082636428291; dx=-3.3628964295209084E-6 evalInputDelta=0.001878331859671789
New Minimum: -54.48082636428291 > -54.49018953622623
WOLFE (weak): th(3341.9439602012008)=-54.49018953622623; dx=-3.361607328505443E-6 evalInputDelta=0.01124150380299227
New Minimum: -54.49018953622623 > -54.55753838784197
WOLFE (weak): th(23393.607721408407)=-54.55753838784197; dx=-3.355754879514445E-6 evalInputDelta=0.07859035541873283
New Minimum: -54.55753838784197 > -55.10260576103221
WOLFE (weak): th(187148.86177126726)=-55.10260576103221; dx=-3.299538777618156E-6 evalInputDelta=0.6236577286089684
New Minimum: -55.10260576103221 > -59.59288300272128
END: th(1684339.7559414054)=-59.59288300272128; dx=-2.6750586299184113E-6 evalInputDelta=5.11393497029804
Fitness changed from -54.47894803242324 to -59.59288300272128
Iteration 2 complete. Error: -59.59288300272128 Total: 21.6772; Orientation: 0.0575; Line Search: 19.4447
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5abd1a19-6ab6-4bc5-93b3-3ccbf2790534.jpg)
Adding measurement 47f8d2cc to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-59.59288300272128;dx=-2.3991350819584175E-6
New Minimum: -59.59288300272128 > -66.65090125526655
END: th(3628800.0000000005)=-66.65090125526655; dx=-1.4832924453695968E-6 evalInputDelta=7.058018252545267
Fitness changed from -59.59288300272128 to -66.65090125526655
Iteration 3 complete. Error: -66.65090125526655 Total: 6.0043; Orientation: 0.0613; Line Search: 3.7706
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/232afacd-a0cf-4bf3-9bcf-3458a17dded5.jpg)
Adding measurement 793adbff to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.535e+03, gradient 1.197e-03, dot -0.765; [9f2e0970-cea9-44f7-8b44-b96af05f4db7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -66.65090125526655, -59.59288300272128, -54.47894803242324, -54.478942872081674
LBFGS Accumulation History: 3 points
Removed measurement 793adbff to history. Total: 3
th(0)=-66.65090125526655;dx=-1.4330573305862636E-6
New Minimum: -66.65090125526655 > -74.69326717459192
END: th(7818012.603187701)=-74.69326717459192; dx=-6.649474623414582E-7 evalInputDelta=8.042365919325377
Fitness changed from -66.65090125526655 to -74.69326717459192
Iteration 4 complete. Error: -74.69326717459192 Total: 6.9653; Orientation: 1.0238; Line Search: 3.7350
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/18ad54b7-ec3b-4269-b351-02a449123173.jpg)
Adding measurement 63c0bc49 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.828e+03, gradient 1.024e-03, dot -0.538; [9f2e0970-cea9-44f7-8b44-b96af05f4db7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -74.69326717459192, -59.59288300272128, -54.47894803242324, -54.478942872081674
LBFGS Accumulation History: 3 points
Removed measurement 63c0bc49 to history. Total: 3
th(0)=-74.69326717459192;dx=-1.0483361188566367E-6
New Minimum: -74.69326717459192 > -81.46595511387619
END: th(1.6843397559414055E7)=-81.46595511387619; dx=-6.241724380931007E-8 evalInputDelta=6.772687939284268
Fitness changed from -74.69326717459192 to -81.46595511387619
Iteration 5 complete. Error: -81.46595511387619 Total: 7.1525; Orientation: 0.9893; Line Search: 3.7194
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/96b5627e-ad1a-46d7-889c-e784b169a3ee.jpg)
Adding measurement 6b7f9f01 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.563e+03, gradient 1.246e-03, dot -0.215; [9f2e0970-cea9-44f7-8b44-b96af05f4db7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.46595511387619, -59.59288300272128, -54.47894803242324, -54.478942872081674
LBFGS Accumulation History: 3 points
Removed measurement 6b7f9f01 to history. Total: 3
th(0)=-81.46595511387619;dx=-1.5526816120625553E-6
Armijo: th(3.628800000000001E7)=-76.07297464440612; dx=3.765059509238348E-7 evalInputDelta=-5.392980469470075
New Minimum: -81.46595511387619 > -84.45900071338058
WOLF (strong): th(1.8144000000000004E7)=-84.45900071338058; dx=5.13284256605579E-7 evalInputDelta=2.9930455995043843
New Minimum: -84.45900071338058 > -87.47613138267481
END: th(6048000.000000001)=-87.47613138267481; dx=-3.9453405185887193E-7 evalInputDelta=6.010176268798617
Fitness changed from -81.46595511387619 to -87.47613138267481
Iteration 6 complete. Error: -87.47613138267481 Total: 10.8676; Orientation: 1.0126; Line Search: 7.7172
Adding measurement 5d0f6626 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.572e+04, gradient 8.423e-04, dot -0.497; [9f2e0970-cea9-44f7-8b44-b96af05f4db7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.47613138267481, -59.59288300272128, -54.47894803242324, -54.478942872081674
LBFGS Accumulation History: 3 points
Removed measurement 5d0f6626 to history. Total: 3
th(0)=-87.47613138267481;dx=-7.095367362293547E-7
New Minimum: -87.47613138267481 > -91.94999088123335
END: th(1.3030021005312836E7)=-91.94999088123335; dx=-7.194725521688348E-8 evalInputDelta=4.473859498558539
Fitness changed from -87.47613138267481 to -91.94999088123335
Iteration 7 complete. Error: -91.94999088123335 Total: 6.7814; Orientation: 1.1169; Line Search: 3.8676
Adding measurement 59c5106b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.790e+04, gradient 9.979e-04, dot -0.365; [9f2e0970-cea9-44f7-8b44-b96af05f4db7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.94999088123335, -59.59288300272128, -54.47894803242324, -54.478942872081674
LBFGS Accumulation History: 3 points
Removed measurement 59c5106b to history. Total: 3
th(0)=-91.94999088123335;dx=-9.95768860495652E-7
Armijo: th(2.8072329265690096E7)=-90.09594016502707; dx=3.0660272206258396E-7 evalInputDelta=-1.8540507162062738
New Minimum: -91.94999088123335 > -94.67453445471769
WOLF (strong): th(1.4036164632845048E7)=-94.67453445471769; dx=2.96905034040919E-7 evalInputDelta=2.7245435734843397
New Minimum: -94.67453445471769 > -95.2344663036307
END: th(4678721.544281683)=-95.2344663036307; dx=-3.8213579000631636E-7 evalInputDelta=3.2844754223973496
Fitness changed from -91.94999088123335 to -95.2344663036307
Iteration 8 complete. Error: -95.2344663036307 Total: 10.3926; Orientation: 1.0214; Line Search: 7.5403
Adding measurement 67fd4f0b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.376e+04, gradient 6.675e-04, dot -0.623; [9f2e0970-cea9-44f7-8b44-b96af05f4db7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.2344663036307, -59.59288300272128, -54.47894803242324, -54.478942872081674
LBFGS Accumulation History: 3 points
Removed measurement 67fd4f0b to history. Total: 3
th(0)=-95.2344663036307;dx=-4.4557511441549397E-7
New Minimum: -95.2344663036307 > -98.54745537041137
END: th(1.0080000000000004E7)=-98.54745537041137; dx=-2.3120458033497373E-7 evalInputDelta=3.3129890667806734
Fitness changed from -95.2344663036307 to -98.54745537041137
Iteration 9 complete. Error: -98.54745537041137 Total: 6.8041; Orientation: 1.0740; Line Search: 3.8494
Adding measurement 41108286 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.563e+04, gradient 7.079e-04, dot -0.547; [9f2e0970-cea9-44f7-8b44-b96af05f4db7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.54745537041137, -59.59288300272128, -54.47894803242324, -54.478942872081674
LBFGS Accumulation History: 3 points
Removed measurement 41108286 to history. Total: 3
th(0)=-98.54745537041137;dx=-5.011896072680869E-7
New Minimum: -98.54745537041137 > -101.44893393685706
WOLF (strong): th(2.1716701675521396E7)=-101.44893393685706; dx=3.303601869795052E-8 evalInputDelta=2.9014785664456895
END: th(1.0858350837760698E7)=-101.30187154159164; dx=-8.162685793261073E-8 evalInputDelta=2.7544161711802673
Fitness changed from -98.54745537041137 to -101.44893393685706
Iteration 10 complete. Error: -101.44893393685706 Total: 8.6017; Orientation: 1.0341; Line Search: 5.7214
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/eeaf042b-ef06-4ac2-82f0-d40130bcb3b9.jpg)
Final threshold in iteration 11: -101.44893393685706 (> -Infinity) after 95.265s (< 5400.000s)
Returns
-101.44893393685706