BasicOptimizer.scala:89 executed in 95.63 seconds (0.941 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: 287060604997300
Reset training subject: 287062584916300
Adding measurement 6506c7bd to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-54.0583529152148;dx=-4.648942966167945E-6
New Minimum: -54.0583529152148 > -54.05835811570534
END: th(2.154434690031884)=-54.05835811570534; dx=-3.169503224828906E-6 evalInputDelta=5.2004905413127744E-6
Fitness changed from -54.0583529152148 to -54.05835811570534
Iteration 1 complete. Error: -54.05835811570534 Total: 9.3349; Orientation: 0.0578; Line Search: 3.6763
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0bbb8d17-f128-44a8-a61b-d4a236bd6dbf.jpg)
Adding measurement 10c86fa8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-54.05835811570534;dx=-3.1695072730486065E-6
New Minimum: -54.05835811570534 > -54.05837891766251
WOLFE (weak): th(4.641588833612779)=-54.05837891766251; dx=-3.1695424470528225E-6 evalInputDelta=2.0801957170135665E-5
New Minimum: -54.05837891766251 > -54.058389318638085
WOLFE (weak): th(9.283177667225559)=-54.058389318638085; dx=-3.1695429742992493E-6 evalInputDelta=3.120293274605501E-5
New Minimum: -54.058389318638085 > -54.05844825746191
WOLFE (weak): th(27.849533001676676)=-54.05844825746191; dx=-3.169509661145489E-6 evalInputDelta=9.014175657284795E-5
New Minimum: -54.05844825746191 > -54.05871348137392
WOLFE (weak): th(111.3981320067067)=-54.05871348137392; dx=-3.169489803181687E-6 evalInputDelta=3.5536566858240803E-4
New Minimum: -54.05871348137392 > -54.060127986928585
WOLFE (weak): th(556.9906600335335)=-54.060127986928585; dx=-3.169449472921355E-6 evalInputDelta=0.0017698712232459002
New Minimum: -54.060127986928585 > -54.06895394299446
WOLFE (weak): th(3341.9439602012008)=-54.06895394299446; dx=-3.168582108299214E-6 evalInputDelta=0.010595827289122894
New Minimum: -54.06895394299446 > -54.13241610748049
WOLFE (weak): th(23393.607721408407)=-54.13241610748049; dx=-3.16153479516085E-6 evalInputDelta=0.07405799177514893
New Minimum: -54.13241610748049 > -54.64518593419831
WOLFE (weak): th(187148.86177126726)=-54.64518593419831; dx=-3.1020908450037977E-6 evalInputDelta=0.5868278184929707
New Minimum: -54.64518593419831 > -58.85400005181743
END: th(1684339.7559414054)=-58.85400005181743; dx=-2.505695872193086E-6 evalInputDelta=4.795641936112091
Fitness changed from -54.05835811570534 to -58.85400005181743
Iteration 2 complete. Error: -58.85400005181743 Total: 22.1991; Orientation: 0.0613; Line Search: 19.7143
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/aa160b0e-9a62-4a5d-ad4b-0e21fc4ff071.jpg)
Adding measurement 4b7274a3 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-58.85400005181743;dx=-2.244173791105188E-6
New Minimum: -58.85400005181743 > -65.48937067390426
END: th(3628800.0000000005)=-65.48937067390426; dx=-1.4137451599586701E-6 evalInputDelta=6.635370622086832
Fitness changed from -58.85400005181743 to -65.48937067390426
Iteration 3 complete. Error: -65.48937067390426 Total: 6.2798; Orientation: 0.0611; Line Search: 4.0025
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c8705842-6398-4fcd-9802-cb9d68be184b.jpg)
Adding measurement eb48a15 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.396e+03, gradient 1.168e-03, dot -0.776; [658f1a06-8483-4c9a-91cd-de6466b43db6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.48937067390426, -58.85400005181743, -54.05835811570534, -54.0583529152148
LBFGS Accumulation History: 3 points
Removed measurement eb48a15 to history. Total: 3
th(0)=-65.48937067390426;dx=-1.3652387661447714E-6
New Minimum: -65.48937067390426 > -73.25047387852184
END: th(7818012.603187701)=-73.25047387852184; dx=-6.592409824519304E-7 evalInputDelta=7.761103204617584
Fitness changed from -65.48937067390426 to -73.25047387852184
Iteration 4 complete. Error: -73.25047387852184 Total: 6.9194; Orientation: 1.0230; Line Search: 3.7389
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1fca5bc3-6e9e-41b4-850a-ac6b6ab668cd.jpg)
Adding measurement 4695b8ed to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.040e+03, gradient 1.015e-03, dot -0.554; [658f1a06-8483-4c9a-91cd-de6466b43db6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.25047387852184, -58.85400005181743, -54.05835811570534, -54.0583529152148
LBFGS Accumulation History: 3 points
Removed measurement 4695b8ed to history. Total: 3
th(0)=-73.25047387852184;dx=-1.02921426086165E-6
New Minimum: -73.25047387852184 > -79.97101591416707
END: th(1.6843397559414055E7)=-79.97101591416707; dx=-5.892552591956841E-8 evalInputDelta=6.720542035645224
Fitness changed from -73.25047387852184 to -79.97101591416707
Iteration 5 complete. Error: -79.97101591416707 Total: 7.2369; Orientation: 1.0688; Line Search: 3.9960
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8af921f4-8371-43c0-9be1-5c863efbb7ec.jpg)
Adding measurement 5b65fa71 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.024e+03, gradient 1.276e-03, dot -0.216; [658f1a06-8483-4c9a-91cd-de6466b43db6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.97101591416707, -58.85400005181743, -54.05835811570534, -54.0583529152148
LBFGS Accumulation History: 3 points
Removed measurement 5b65fa71 to history. Total: 3
th(0)=-79.97101591416707;dx=-1.6293856107265168E-6
Armijo: th(3.628800000000001E7)=-73.63202424791932; dx=3.7275434204704455E-7 evalInputDelta=-6.33899166624775
New Minimum: -79.97101591416707 > -82.38925141056104
WOLF (strong): th(1.8144000000000004E7)=-82.38925141056104; dx=5.753547143535266E-7 evalInputDelta=2.418235496393976
New Minimum: -82.38925141056104 > -86.19630626622136
END: th(6048000.000000001)=-86.19630626622136; dx=-3.675502222901025E-7 evalInputDelta=6.225290352054287
Fitness changed from -79.97101591416707 to -86.19630626622136
Iteration 6 complete. Error: -86.19630626622136 Total: 10.9480; Orientation: 1.0264; Line Search: 7.8042
Adding measurement 2b196998 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.705e+04, gradient 8.569e-04, dot -0.507; [658f1a06-8483-4c9a-91cd-de6466b43db6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.19630626622136, -58.85400005181743, -54.05835811570534, -54.0583529152148
LBFGS Accumulation History: 3 points
Removed measurement 2b196998 to history. Total: 3
th(0)=-86.19630626622136;dx=-7.343468295973218E-7
New Minimum: -86.19630626622136 > -90.55355949576648
END: th(1.3030021005312836E7)=-90.55355949576648; dx=-5.32143826593337E-8 evalInputDelta=4.3572532295451225
Fitness changed from -86.19630626622136 to -90.55355949576648
Iteration 7 complete. Error: -90.55355949576648 Total: 6.8296; Orientation: 1.0413; Line Search: 3.9618
Adding measurement 1cb304af to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.875e+04, gradient 1.044e-03, dot -0.353; [658f1a06-8483-4c9a-91cd-de6466b43db6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.55355949576648, -58.85400005181743, -54.05835811570534, -54.0583529152148
LBFGS Accumulation History: 3 points
Removed measurement 1cb304af to history. Total: 3
th(0)=-90.55355949576648;dx=-1.0901650246372357E-6
Armijo: th(2.8072329265690096E7)=-87.79353654356382; dx=3.427123350031882E-7 evalInputDelta=-2.760022952202661
New Minimum: -90.55355949576648 > -93.15689017020011
WOLF (strong): th(1.4036164632845048E7)=-93.15689017020011; dx=3.6953284355276835E-7 evalInputDelta=2.6033306744336357
New Minimum: -93.15689017020011 > -94.13122368614584
END: th(4678721.544281683)=-94.13122368614584; dx=-4.039699876578323E-7 evalInputDelta=3.577664190379366
Fitness changed from -90.55355949576648 to -94.13122368614584
Iteration 8 complete. Error: -94.13122368614584 Total: 10.4651; Orientation: 0.9796; Line Search: 7.6508
Adding measurement 39c0a675 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.560e+04, gradient 6.911e-04, dot -0.618; [658f1a06-8483-4c9a-91cd-de6466b43db6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -94.13122368614584, -58.85400005181743, -54.05835811570534, -54.0583529152148
LBFGS Accumulation History: 3 points
Removed measurement 39c0a675 to history. Total: 3
th(0)=-94.13122368614584;dx=-4.775729780477365E-7
New Minimum: -94.13122368614584 > -97.56600786453605
END: th(1.0080000000000004E7)=-97.56600786453605; dx=-2.2764947794574898E-7 evalInputDelta=3.4347841783902027
Fitness changed from -94.13122368614584 to -97.56600786453605
Iteration 9 complete. Error: -97.56600786453605 Total: 6.5130; Orientation: 0.9874; Line Search: 3.7377
Adding measurement 5303ea87 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.766e+04, gradient 7.460e-04, dot -0.532; [658f1a06-8483-4c9a-91cd-de6466b43db6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.56600786453605, -58.85400005181743, -54.05835811570534, -54.0583529152148
LBFGS Accumulation History: 3 points
Removed measurement 5303ea87 to history. Total: 3
th(0)=-97.56600786453605;dx=-5.564881366581042E-7
New Minimum: -97.56600786453605 > -100.09788564207035
WOLF (strong): th(2.1716701675521396E7)=-100.09788564207035; dx=6.829317209289601E-8 evalInputDelta=2.531877777534305
New Minimum: -100.09788564207035 > -100.3431162199482
END: th(1.0858350837760698E7)=-100.3431162199482; dx=-5.000362977254936E-8 evalInputDelta=2.777108355412153
Fitness changed from -97.56600786453605 to -100.3431162199482
Iteration 10 complete. Error: -100.3431162199482 Total: 8.5869; Orientation: 0.9428; Line Search: 5.7502
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/77130933-75b3-469b-91b3-54c65c0b62ba.jpg)
Final threshold in iteration 11: -100.3431162199482 (> -Infinity) after 95.626s (< 5400.000s)
Returns
-100.3431162199482