BasicOptimizer.scala:89 executed in 111.16 seconds (1.260 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: 40818154541800
Reset training subject: 40820466664400
Adding measurement 4cc12114 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-30.199935907747438;dx=-1.993821440196168E-6
New Minimum: -30.199935907747438 > -30.199940251395432
WOLFE (weak): th(2.154434690031884)=-30.199940251395432; dx=-1.824977070210593E-6 evalInputDelta=4.343647994176081E-6
New Minimum: -30.199940251395432 > -30.199946042925124
WOLFE (weak): th(4.308869380063768)=-30.199946042925124; dx=-1.8245562642599583E-6 evalInputDelta=1.0135177685555163E-5
New Minimum: -30.199946042925124 > -30.19996196962604
WOLFE (weak): th(12.926608140191302)=-30.19996196962604; dx=-1.8260781319222124E-6 evalInputDelta=2.606187860365594E-5
New Minimum: -30.19996196962604 > -30.200040155126906
WOLFE (weak): th(51.70643256076521)=-30.200040155126906; dx=-1.8242313049877407E-6 evalInputDelta=1.0424737946834739E-4
New Minimum: -30.200040155126906 > -30.200452797472668
WOLFE (weak): th(258.53216280382605)=-30.200452797472668; dx=-1.8244563298203338E-6 evalInputDelta=5.168897252296745E-4
New Minimum: -30.200452797472668 > -30.20303566567521
WOLFE (weak): th(1551.1929768229563)=-30.20303566567521; dx=-1.8249299867008865E-6 evalInputDelta=0.003099757927770952
New Minimum: -30.20303566567521 > -30.221626089773668
WOLFE (weak): th(10858.350837760694)=-30.221626089773668; dx=-1.824648170405802E-6 evalInputDelta=0.021690182026230076
New Minimum: -30.221626089773668 > -30.37317338141405
WOLFE (weak): th(86866.80670208555)=-30.37317338141405; dx=-1.8163049279910316E-6 evalInputDelta=0.17323747366661024
New Minimum: -30.37317338141405 > -31.716066447907906
END: th(781801.26031877)=-31.716066447907906; dx=-1.712728794478899E-6 evalInputDelta=1.5161305401604679
Fitness changed from -30.199935907747438 to -31.716066447907906
Iteration 1 complete. Error: -31.716066447907906 Total: 30.7739; Orientation: 0.0697; Line Search: 23.6802
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/33027855-28c2-46fb-8aee-c13b1eb10345.jpg)
Adding measurement 451349c9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-31.716066447907906;dx=-1.682144330728697E-6
New Minimum: -31.716066447907906 > -34.61562593467216
END: th(1684339.7559414052)=-34.61562593467216; dx=-1.465060510440676E-6 evalInputDelta=2.899559486764254
Fitness changed from -31.716066447907906 to -34.61562593467216
Iteration 2 complete. Error: -34.61562593467216 Total: 7.3816; Orientation: 0.0632; Line Search: 4.5487
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d9fb57f2-7c52-499f-8e38-1d2dce4d5ba4.jpg)
Adding measurement 1832e266 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-34.61562593467216;dx=-1.4148436230342366E-6
New Minimum: -34.61562593467216 > -39.538478613425745
END: th(3628800.0)=-39.538478613425745; dx=-1.0705851624754577E-6 evalInputDelta=4.922852678753586
Fitness changed from -34.61562593467216 to -39.538478613425745
Iteration 3 complete. Error: -39.538478613425745 Total: 7.2659; Orientation: 0.0573; Line Search: 4.4604
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/68d057a7-9b14-4c57-97ce-bd65a91083c3.jpg)
Adding measurement 44beb6a9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.115e+04, gradient 1.036e-03, dot -0.868; [218db253-1475-4cfe-bab0-a5222f5a6e5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.538478613425745, -34.61562593467216, -31.716066447907906, -30.199935907747438
LBFGS Accumulation History: 3 points
Removed measurement 44beb6a9 to history. Total: 3
th(0)=-39.538478613425745;dx=-1.0696552348441549E-6
New Minimum: -39.538478613425745 > -46.88442681838568
END: th(7818012.6031877)=-46.88442681838568; dx=-6.770374219938756E-7 evalInputDelta=7.345948204959932
Fitness changed from -39.538478613425745 to -46.88442681838568
Iteration 4 complete. Error: -46.88442681838568 Total: 8.2061; Orientation: 1.1350; Line Search: 4.4285
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/32dfea64-494e-4526-a4fc-3182f69f8e91.jpg)
Adding measurement 1fb019b5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.012e+04, gradient 8.915e-04, dot -0.696; [218db253-1475-4cfe-bab0-a5222f5a6e5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.88442681838568, -34.61562593467216, -31.716066447907906, -30.199935907747438
LBFGS Accumulation History: 3 points
Removed measurement 1fb019b5 to history. Total: 3
th(0)=-46.88442681838568;dx=-7.92968826861069E-7
New Minimum: -46.88442681838568 > -56.53465650499185
END: th(1.684339755941405E7)=-56.53465650499185; dx=-3.4797025163085084E-7 evalInputDelta=9.650229686606174
Fitness changed from -46.88442681838568 to -56.53465650499185
Iteration 5 complete. Error: -56.53465650499185 Total: 8.2964; Orientation: 1.1207; Line Search: 4.3976
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/fb41b900-5c00-4812-a5ce-45ebdd5d53b0.jpg)
Adding measurement 7c74f567 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.448e+04, gradient 8.435e-04, dot -0.512; [218db253-1475-4cfe-bab0-a5222f5a6e5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.53465650499185, -34.61562593467216, -31.716066447907906, -30.199935907747438
LBFGS Accumulation History: 3 points
Removed measurement 7c74f567 to history. Total: 3
th(0)=-56.53465650499185;dx=-7.102432156713206E-7
New Minimum: -56.53465650499185 > -64.1288635083021
END: th(3.6288E7)=-64.1288635083021; dx=-6.748052784817558E-9 evalInputDelta=7.5942070033102524
Fitness changed from -56.53465650499185 to -64.1288635083021
Iteration 6 complete. Error: -64.1288635083021 Total: 8.4783; Orientation: 1.1074; Line Search: 4.5287
Adding measurement 417d5b67 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.972e+04, gradient 1.050e-03, dot -0.254; [218db253-1475-4cfe-bab0-a5222f5a6e5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.1288635083021, -34.61562593467216, -31.716066447907906, -30.199935907747438
LBFGS Accumulation History: 3 points
Removed measurement 417d5b67 to history. Total: 3
th(0)=-64.1288635083021;dx=-1.0996221575861318E-6
Armijo: th(7.8180126031877E7)=-56.86751040407374; dx=2.0355317731402262E-7 evalInputDelta=-7.2613531042283626
New Minimum: -64.1288635083021 > -68.93879021053633
WOLF (strong): th(3.90900630159385E7)=-68.93879021053633; dx=2.9730591328379813E-7 evalInputDelta=4.809926702234222
New Minimum: -68.93879021053633 > -73.51167703430033
END: th(1.3030021005312832E7)=-73.51167703430033; dx=-2.462161879473261E-7 evalInputDelta=9.38281352599823
Fitness changed from -64.1288635083021 to -73.51167703430033
Iteration 7 complete. Error: -73.51167703430033 Total: 12.3277; Orientation: 1.0990; Line Search: 9.0448
Adding measurement 3e8e0a50 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.440e+04, gradient 6.800e-04, dot -0.431; [218db253-1475-4cfe-bab0-a5222f5a6e5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.51167703430033, -34.61562593467216, -31.716066447907906, -30.199935907747438
LBFGS Accumulation History: 3 points
Removed measurement 3e8e0a50 to history. Total: 3
th(0)=-73.51167703430033;dx=-4.6076251937280417E-7
New Minimum: -73.51167703430033 > -80.35349839013787
END: th(2.807232926569009E7)=-80.35349839013787; dx=-5.4510325030865514E-8 evalInputDelta=6.8418213558375385
Fitness changed from -73.51167703430033 to -80.35349839013787
Iteration 8 complete. Error: -80.35349839013787 Total: 7.6151; Orientation: 1.1061; Line Search: 4.3133
Adding measurement 130af2ed to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.484e+04, gradient 7.665e-04, dot -0.369; [218db253-1475-4cfe-bab0-a5222f5a6e5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.35349839013787, -34.61562593467216, -31.716066447907906, -30.199935907747438
LBFGS Accumulation History: 3 points
Removed measurement 130af2ed to history. Total: 3
th(0)=-80.35349839013787;dx=-5.859684908970666E-7
Armijo: th(6.048000000000001E7)=-77.58645504929473; dx=1.8052622565032655E-7 evalInputDelta=-2.767043340843145
New Minimum: -80.35349839013787 > -84.19662299646369
WOLF (strong): th(3.0240000000000004E7)=-84.19662299646369; dx=1.4256676799590286E-7 evalInputDelta=3.8431246063258158
New Minimum: -84.19662299646369 > -84.70558762448896
END: th(1.0080000000000002E7)=-84.70558762448896; dx=-2.257048436267385E-7 evalInputDelta=4.352089234351084
Fitness changed from -80.35349839013787 to -84.70558762448896
Iteration 9 complete. Error: -84.70558762448896 Total: 12.5923; Orientation: 1.0910; Line Search: 9.3698
Adding measurement 2ae611bf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.195e+04, gradient 5.247e-04, dot -0.544; [218db253-1475-4cfe-bab0-a5222f5a6e5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.70558762448896, -34.61562593467216, -31.716066447907906, -30.199935907747438
LBFGS Accumulation History: 3 points
Removed measurement 2ae611bf to history. Total: 3
th(0)=-84.70558762448896;dx=-2.743548561324364E-7
New Minimum: -84.70558762448896 > -89.32257191826876
END: th(2.1716701675521392E7)=-89.32257191826876; dx=-1.5245198171092932E-7 evalInputDelta=4.616984293779808
Fitness changed from -84.70558762448896 to -89.32257191826876
Iteration 10 complete. Error: -89.32257191826876 Total: 7.7952; Orientation: 1.0682; Line Search: 4.4868
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/31c0c5a5-12b5-4e5a-9c54-df7178333020.jpg)
Final threshold in iteration 11: -89.32257191826876 (> -Infinity) after 111.161s (< 5400.000s)
Returns
-89.32257191826876