BasicOptimizer.scala:89 executed in 93.54 seconds (0.934 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: 281218314263699
Reset training subject: 281220258068899
Adding measurement c51707a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-47.1389527696737;dx=-4.848213997360603E-6
New Minimum: -47.1389527696737 > -47.13896072148217
WOLFE (weak): th(2.154434690031884)=-47.13896072148217; dx=-4.468414525741762E-6 evalInputDelta=7.951808470352262E-6
New Minimum: -47.13896072148217 > -47.138970661240876
WOLFE (weak): th(4.308869380063768)=-47.138970661240876; dx=-4.468414360010525E-6 evalInputDelta=1.789156717535434E-5
New Minimum: -47.138970661240876 > -47.139010420254706
WOLFE (weak): th(12.926608140191302)=-47.139010420254706; dx=-4.46841747260664E-6 evalInputDelta=5.7650581005930235E-5
New Minimum: -47.139010420254706 > -47.13918337157469
WOLFE (weak): th(51.70643256076521)=-47.13918337157469; dx=-4.468440206415033E-6 evalInputDelta=2.3060190098789235E-4
New Minimum: -47.13918337157469 > -47.14010775580158
WOLFE (weak): th(258.53216280382605)=-47.14010775580158; dx=-4.468314402412735E-6 evalInputDelta=0.0011549861278794538
New Minimum: -47.14010775580158 > -47.14588424967595
WOLFE (weak): th(1551.1929768229563)=-47.14588424967595; dx=-4.467373930450521E-6 evalInputDelta=0.006931480002251078
New Minimum: -47.14588424967595 > -47.187433874686704
WOLFE (weak): th(10858.350837760694)=-47.187433874686704; dx=-4.460627408672416E-6 evalInputDelta=0.0484811050130034
New Minimum: -47.187433874686704 > -47.52397743549051
WOLFE (weak): th(86866.80670208555)=-47.52397743549051; dx=-4.392485349577248E-6 evalInputDelta=0.3850246658168075
New Minimum: -47.52397743549051 > -50.372412421899824
END: th(781801.26031877)=-50.372412421899824; dx=-3.811144360439852E-6 evalInputDelta=3.2334596522261236
Fitness changed from -47.1389527696737 to -50.372412421899824
Iteration 1 complete. Error: -50.372412421899824 Total: 23.7537; Orientation: 0.0600; Line Search: 18.3191
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cd50f593-ef23-4158-a8de-cdd8c37af891.jpg)
Adding measurement b8471c9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-50.372412421899824;dx=-3.519724868950739E-6
New Minimum: -50.372412421899824 > -55.50998094612685
END: th(1684339.7559414052)=-55.50998094612685; dx=-2.579270551855542E-6 evalInputDelta=5.137568524227028
Fitness changed from -50.372412421899824 to -55.50998094612685
Iteration 2 complete. Error: -55.50998094612685 Total: 5.7114; Orientation: 0.0610; Line Search: 3.5863
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/741adede-d7ef-4b1c-a9f3-c5426e3e392f.jpg)
Adding measurement 2c7d8547 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-55.50998094612685;dx=-2.317314738617502E-6
New Minimum: -55.50998094612685 > -62.241234839465704
END: th(3628800.0)=-62.241234839465704; dx=-1.4156269170190743E-6 evalInputDelta=6.731253893338852
Fitness changed from -55.50998094612685 to -62.241234839465704
Iteration 3 complete. Error: -62.241234839465704 Total: 5.9279; Orientation: 0.0605; Line Search: 3.5711
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/87ec6a59-a306-4053-9cb3-08921e2d2213.jpg)
Adding measurement 3d1427b6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.382e+04, gradient 1.220e-03, dot -0.825; [461184e1-d85d-496e-b9bd-db25c9937c0d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -62.241234839465704, -55.50998094612685, -50.372412421899824, -47.1389527696737
LBFGS Accumulation History: 3 points
Removed measurement 3d1427b6 to history. Total: 3
th(0)=-62.241234839465704;dx=-1.489026107190584E-6
New Minimum: -62.241234839465704 > -70.41814158267893
END: th(7818012.6031877)=-70.41814158267893; dx=-6.986341753544858E-7 evalInputDelta=8.176906743213223
Fitness changed from -62.241234839465704 to -70.41814158267893
Iteration 4 complete. Error: -70.41814158267893 Total: 6.9818; Orientation: 1.0695; Line Search: 3.8659
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/41490a20-6383-4f5d-90f2-4a86588d7d87.jpg)
Adding measurement 580a7e0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.606e+04, gradient 1.219e-03, dot -0.620; [461184e1-d85d-496e-b9bd-db25c9937c0d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.41814158267893, -55.50998094612685, -50.372412421899824, -47.1389527696737
LBFGS Accumulation History: 3 points
Removed measurement 580a7e0 to history. Total: 3
th(0)=-70.41814158267893;dx=-1.485747914591013E-6
New Minimum: -70.41814158267893 > -75.30110546052646
WOLF (strong): th(1.684339755941405E7)=-75.30110546052646; dx=1.4652467347221026E-7 evalInputDelta=4.88296387784753
New Minimum: -75.30110546052646 > -75.81540608569503
END: th(8421698.779707026)=-75.81540608569503; dx=-9.707152305047565E-8 evalInputDelta=5.397264503016103
Fitness changed from -70.41814158267893 to -75.81540608569503
Iteration 5 complete. Error: -75.81540608569503 Total: 8.9577; Orientation: 1.0929; Line Search: 5.8046
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/58c70a28-5170-4389-a3d3-89833578e8f0.jpg)
Adding measurement 47890bf1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.899e+04, gradient 1.426e-03, dot -0.473; [461184e1-d85d-496e-b9bd-db25c9937c0d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.81540608569503, -55.50998094612685, -50.372412421899824, -47.1389527696737
LBFGS Accumulation History: 3 points
Removed measurement 47890bf1 to history. Total: 3
th(0)=-75.81540608569503;dx=-2.0325867465105836E-6
Armijo: th(1.8144E7)=-74.65748500967752; dx=5.598355441778977E-7 evalInputDelta=-1.1579210760175158
New Minimum: -75.81540608569503 > -80.295265728477
WOLF (strong): th(9072000.0)=-80.295265728477; dx=5.633362545746315E-7 evalInputDelta=4.479859642781975
New Minimum: -80.295265728477 > -80.40492785937889
END: th(3024000.0)=-80.40492785937889; dx=-9.361983139412186E-7 evalInputDelta=4.589521773683856
Fitness changed from -75.81540608569503 to -80.40492785937889
Iteration 6 complete. Error: -80.40492785937889 Total: 10.6325; Orientation: 1.1037; Line Search: 7.4280
Adding measurement 17f07fb1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.878e+04, gradient 9.753e-04, dot -0.723; [461184e1-d85d-496e-b9bd-db25c9937c0d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.40492785937889, -55.50998094612685, -50.372412421899824, -47.1389527696737
LBFGS Accumulation History: 3 points
Removed measurement 17f07fb1 to history. Total: 3
th(0)=-80.40492785937889;dx=-9.51187287832038E-7
New Minimum: -80.40492785937889 > -84.91943978237458
END: th(6515010.502656417)=-84.91943978237458; dx=-4.6949009267635387E-7 evalInputDelta=4.514511922995695
Fitness changed from -80.40492785937889 to -84.91943978237458
Iteration 7 complete. Error: -84.91943978237458 Total: 6.4241; Orientation: 1.0438; Line Search: 3.5829
Adding measurement e97a429 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.408e+04, gradient 1.010e-03, dot -0.658; [461184e1-d85d-496e-b9bd-db25c9937c0d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.91943978237458, -55.50998094612685, -50.372412421899824, -47.1389527696737
LBFGS Accumulation History: 3 points
Removed measurement e97a429 to history. Total: 3
th(0)=-84.91943978237458;dx=-1.0191535095796256E-6
New Minimum: -84.91943978237458 > -89.40191202870629
WOLF (strong): th(1.4036164632845046E7)=-89.40191202870629; dx=5.9612425432359456E-9 evalInputDelta=4.48247224633171
END: th(7018082.316422523)=-88.83107460209295; dx=-2.191179903234079E-7 evalInputDelta=3.9116348197183726
Fitness changed from -84.91943978237458 to -89.40191202870629
Iteration 8 complete. Error: -89.40191202870629 Total: 8.0847; Orientation: 1.0171; Line Search: 5.3325
Adding measurement 346be81c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.965e+04, gradient 1.404e-03, dot -0.377; [461184e1-d85d-496e-b9bd-db25c9937c0d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.40191202870629, -55.50998094612685, -50.372412421899824, -47.1389527696737
LBFGS Accumulation History: 3 points
Removed measurement 346be81c to history. Total: 3
th(0)=-89.40191202870629;dx=-1.9721307312269556E-6
New Minimum: -89.40191202870629 > -90.98354004628884
WOLF (strong): th(1.5120000000000004E7)=-90.98354004628884; dx=8.685784894351079E-7 evalInputDelta=1.5816280175825455
New Minimum: -90.98354004628884 > -96.1712210941713
WOLF (strong): th(7560000.000000002)=-96.1712210941713; dx=2.2503716321406957E-7 evalInputDelta=6.769309065465009
END: th(2520000.0000000005)=-93.59195609604909; dx=-1.320320839243496E-6 evalInputDelta=4.1900440673427966
Fitness changed from -89.40191202870629 to -96.1712210941713
Iteration 9 complete. Error: -96.1712210941713 Total: 10.2170; Orientation: 0.9917; Line Search: 7.4245
Adding measurement 6b6bcaca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.009e+04, gradient 1.176e-03, dot -0.452; [461184e1-d85d-496e-b9bd-db25c9937c0d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.1712210941713, -55.50998094612685, -50.372412421899824, -47.1389527696737
LBFGS Accumulation History: 3 points
Removed measurement 6b6bcaca to history. Total: 3
th(0)=-96.1712210941713;dx=-1.3831977300774698E-6
New Minimum: -96.1712210941713 > -100.37099846701135
END: th(5429175.418880348)=-100.37099846701135; dx=-1.515413766654918E-7 evalInputDelta=4.199777372840046
Fitness changed from -96.1712210941713 to -100.37099846701135
Iteration 10 complete. Error: -100.37099846701135 Total: 6.5449; Orientation: 1.0760; Line Search: 3.6524
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/aea239f9-fce5-4d80-b53b-7634d26dc83c.jpg)
Final threshold in iteration 11: -100.37099846701135 (> -Infinity) after 93.543s (< 5400.000s)
Returns
-100.37099846701135