BasicOptimizer.scala:88 executed in 46.85 seconds (1.579 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: 2829539011324
Reset training subject: 2830732942054
Adding measurement 78708d34 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=36.0193387940526;dx=-1.480530249685275E-4
New Minimum: 36.0193387940526 > 36.01830569282174
WOLFE (weak): th(2.154434690031884)=36.01830569282174; dx=-1.4958993146204283E-4 evalInputDelta=0.0010331012308597565
New Minimum: 36.01830569282174 > 36.01727201696485
WOLFE (weak): th(4.308869380063768)=36.01727201696485; dx=-1.4475869382359313E-4 evalInputDelta=0.0020667770877480507
New Minimum: 36.01727201696485 > 36.013120208866894
WOLFE (weak): th(12.926608140191302)=36.013120208866894; dx=-1.4829506968243913E-4 evalInputDelta=0.0062185851857066154
New Minimum: 36.013120208866894 > 35.99254215601832
WOLFE (weak): th(51.70643256076521)=35.99254215601832; dx=-1.4673278404242325E-4 evalInputDelta=0.026796638034284115
New Minimum: 35.99254215601832 > 35.892195120453835
WOLFE (weak): th(258.53216280382605)=35.892195120453835; dx=-1.4494638930691214E-4 evalInputDelta=0.12714367359876633
New Minimum: 35.892195120453835 > 35.29018141608685
END: th(1551.1929768229563)=35.29018141608685; dx=-1.2883008742117487E-4 evalInputDelta=0.7291573779657483
Fitness changed from 36.0193387940526 to 35.29018141608685
Iteration 1 complete. Error: 35.29018141608685 Total: 12.1464; Orientation: 0.0035; Line Search: 8.5822
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ce52e872-aeb5-43de-b829-a97b2d3fa6c6.jpg)
Adding measurement 799d4b26 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=35.29018141608685;dx=-1.2691460217359985E-4
New Minimum: 35.29018141608685 > 34.07238808274269
END: th(3341.943960201201)=34.07238808274269; dx=-1.0621259782334417E-4 evalInputDelta=1.2177933333441615
Fitness changed from 35.29018141608685 to 34.07238808274269
Iteration 2 complete. Error: 34.07238808274269 Total: 3.6026; Orientation: 0.0023; Line Search: 2.4427
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1fe20baa-4f64-405d-99d0-799884d01c3b.jpg)
Adding measurement 6554cb1f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=34.07238808274269;dx=-1.1426854281036358E-4
New Minimum: 34.07238808274269 > 31.796324375085533
END: th(7200.000000000001)=31.796324375085533; dx=-8.473492008851448E-5 evalInputDelta=2.2760637076571584
Fitness changed from 34.07238808274269 to 31.796324375085533
Iteration 3 complete. Error: 31.796324375085533 Total: 3.6108; Orientation: 0.0022; Line Search: 2.3732
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1cf93ba1-66c9-491e-baec-98e42f0cd312.jpg)
Adding measurement 381f28df to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.973e+02, gradient 9.545e-03, dot -0.826; [e6bc9a5a-35eb-4529-9d2c-236eb881f032 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 31.796324375085533, 34.07238808274269, 35.29018141608685, 36.0193387940526
LBFGS Accumulation History: 3 points
Removed measurement 381f28df to history. Total: 3
th(0)=31.796324375085533;dx=-8.853291171754656E-5
New Minimum: 31.796324375085533 > 28.785525685176253
END: th(15511.929768229566)=28.785525685176253; dx=-5.251687207883563E-5 evalInputDelta=3.0107986899092793
Fitness changed from 31.796324375085533 to 28.785525685176253
Iteration 4 complete. Error: 28.785525685176253 Total: 5.4224; Orientation: 0.0434; Line Search: 4.1632
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/07473408-ad73-4383-8830-bb0b02e8c152.jpg)
Adding measurement a6f47e6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.355e+02, gradient 8.055e-03, dot -0.656; [e6bc9a5a-35eb-4529-9d2c-236eb881f032 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 28.785525685176253, 34.07238808274269, 35.29018141608685, 36.0193387940526
LBFGS Accumulation History: 3 points
Removed measurement a6f47e6 to history. Total: 3
th(0)=28.785525685176253;dx=-6.234740899249453E-5
New Minimum: 28.785525685176253 > 25.780305184423923
END: th(33419.43960201202)=25.780305184423923; dx=-2.4358263039936945E-5 evalInputDelta=3.00522050075233
Fitness changed from 28.785525685176253 to 25.780305184423923
Iteration 5 complete. Error: 25.780305184423923 Total: 3.5726; Orientation: 0.0464; Line Search: 2.3220
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/59fca88c-6364-428b-a141-efec5bcec0a7.jpg)
Adding measurement fa86b5a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.611e+02, gradient 5.750e-03, dot -0.496; [e6bc9a5a-35eb-4529-9d2c-236eb881f032 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 25.780305184423923, 34.07238808274269, 35.29018141608685, 36.0193387940526
LBFGS Accumulation History: 3 points
Removed measurement fa86b5a to history. Total: 3
th(0)=25.780305184423923;dx=-3.223965792707062E-5
New Minimum: 25.780305184423923 > 22.763419955968857
END: th(72000.00000000003)=22.763419955968857; dx=-9.405820095021513E-6 evalInputDelta=3.0168852284550667
Fitness changed from 25.780305184423923 to 22.763419955968857
Iteration 6 complete. Error: 22.763419955968857 Total: 3.6976; Orientation: 0.1296; Line Search: 2.4046
Adding measurement 4f0f2e68 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.582e+02, gradient 3.981e-03, dot -0.468; [e6bc9a5a-35eb-4529-9d2c-236eb881f032 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 22.763419955968857, 34.07238808274269, 35.29018141608685, 36.0193387940526
LBFGS Accumulation History: 3 points
Removed measurement 4f0f2e68 to history. Total: 3
th(0)=22.763419955968857;dx=-1.5357695802676397E-5
New Minimum: 22.763419955968857 > 19.961698718369007
END: th(155119.2976822957)=19.961698718369007; dx=-4.069680975399508E-6 evalInputDelta=2.8017212375998497
Fitness changed from 22.763419955968857 to 19.961698718369007
Iteration 7 complete. Error: 19.961698718369007 Total: 3.7708; Orientation: 0.1874; Line Search: 2.3901
Adding measurement 20fa811e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.422e+02, gradient 2.797e-03, dot -0.446; [e6bc9a5a-35eb-4529-9d2c-236eb881f032 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 19.961698718369007, 34.07238808274269, 35.29018141608685, 36.0193387940526
LBFGS Accumulation History: 3 points
Removed measurement 20fa811e to history. Total: 3
th(0)=19.961698718369007;dx=-7.62333531607598E-6
New Minimum: 19.961698718369007 > 17.50936684757471
END: th(334194.39602012024)=17.50936684757471; dx=-1.790902055766963E-6 evalInputDelta=2.4523318707942963
Fitness changed from 19.961698718369007 to 17.50936684757471
Iteration 8 complete. Error: 17.50936684757471 Total: 3.6503; Orientation: 0.0676; Line Search: 2.3580
Adding measurement 44308c24 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.766e+02, gradient 4.642e-03, dot -0.196; [e6bc9a5a-35eb-4529-9d2c-236eb881f032 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 17.50936684757471, 34.07238808274269, 35.29018141608685, 36.0193387940526
LBFGS Accumulation History: 3 points
Removed measurement 44308c24 to history. Total: 3
th(0)=17.50936684757471;dx=-2.0610472818074567E-5
New Minimum: 17.50936684757471 > 16.75104708969593
END: th(720000.0000000003)=16.75104708969593; dx=-1.6764937501479652E-6 evalInputDelta=0.7583197578787804
Fitness changed from 17.50936684757471 to 16.75104708969593
Iteration 9 complete. Error: 16.75104708969593 Total: 3.6301; Orientation: 0.0986; Line Search: 2.3699
Adding measurement 6df0340 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.831e+02, gradient 1.839e-03, dot -0.273; [e6bc9a5a-35eb-4529-9d2c-236eb881f032 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 16.75104708969593, 34.07238808274269, 35.29018141608685, 36.0193387940526
LBFGS Accumulation History: 3 points
Removed measurement 6df0340 to history. Total: 3
th(0)=16.75104708969593;dx=-3.280934002169481E-6
New Minimum: 16.75104708969593 > 12.102746203541756
END: th(1551192.9768229572)=12.102746203541756; dx=-5.130902264753933E-7 evalInputDelta=4.648300886154175
Fitness changed from 16.75104708969593 to 12.102746203541756
Iteration 10 complete. Error: 12.102746203541756 Total: 3.7280; Orientation: 0.1378; Line Search: 2.3929
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/05fe84b2-f425-4284-8460-af5d3f63fe90.jpg)
Final threshold in iteration 11: 12.102746203541756 (> -Infinity) after 46.847s (< 1800.000s)
Returns
12.102746203541756