BasicOptimizer.scala:89 executed in 111.43 seconds (1.416 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: 41761396529100
Reset training subject: 41763817453800
Adding measurement 6615152a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-49.582972350724276;dx=-1.7060128207396E-6
New Minimum: -49.582972350724276 > -49.58297764197195
END: th(2.154434690031884)=-49.58297764197195; dx=-1.338534042061818E-6 evalInputDelta=5.291247674676924E-6
Fitness changed from -49.582972350724276 to -49.58297764197195
Iteration 1 complete. Error: -49.58297764197195 Total: 11.4363; Orientation: 0.0658; Line Search: 4.6806
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bb3c0c4d-6601-4edb-84b5-d828d4994620.jpg)
Adding measurement 5dbf5475 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-49.58297764197195;dx=-1.32398877610986E-6
New Minimum: -49.58297764197195 > -49.58298469696796
WOLFE (weak): th(4.641588833612779)=-49.58298469696796; dx=-1.320746227400262E-6 evalInputDelta=7.054996011390813E-6
New Minimum: -49.58298469696796 > -49.58298998821432
WOLFE (weak): th(9.283177667225559)=-49.58298998821432; dx=-1.320267409777434E-6 evalInputDelta=1.2346242371563676E-5
New Minimum: -49.58298998821432 > -49.583018208185344
WOLFE (weak): th(27.849533001676676)=-49.583018208185344; dx=-1.3189342172492502E-6 evalInputDelta=4.056621339287858E-5
New Minimum: -49.583018208185344 > -49.583134615396034
WOLFE (weak): th(111.3981320067067)=-49.583134615396034; dx=-1.3173131097105091E-6 evalInputDelta=1.5697342408316217E-4
New Minimum: -49.583134615396034 > -49.58377308644899
WOLFE (weak): th(556.9906600335335)=-49.58377308644899; dx=-1.3177060284374059E-6 evalInputDelta=7.9544447704194E-4
New Minimum: -49.58377308644899 > -49.58776069891175
WOLFE (weak): th(3341.9439602012008)=-49.58776069891175; dx=-1.3170955820546365E-6 evalInputDelta=0.00478305693980019
New Minimum: -49.58776069891175 > -49.61645112022709
WOLFE (weak): th(23393.607721408407)=-49.61645112022709; dx=-1.3162198936583579E-6 evalInputDelta=0.033473478255139355
New Minimum: -49.61645112022709 > -49.84925720990736
WOLFE (weak): th(187148.86177126726)=-49.84925720990736; dx=-1.2992196178081718E-6 evalInputDelta=0.2662795679354062
New Minimum: -49.84925720990736 > -51.84527054810821
END: th(1684339.7559414054)=-51.84527054810821; dx=-1.1589140421780209E-6 evalInputDelta=2.2622929061362598
Fitness changed from -49.58297764197195 to -51.84527054810821
Iteration 2 complete. Error: -51.84527054810821 Total: 25.0686; Orientation: 0.0648; Line Search: 22.3199
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f6e15f7e-028e-44d7-910c-43a1805fd366.jpg)
Adding measurement 692f34b4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-51.84527054810821;dx=-1.1737109068510742E-6
New Minimum: -51.84527054810821 > -55.738169922084346
END: th(3628800.0000000005)=-55.738169922084346; dx=-8.799716322730669E-7 evalInputDelta=3.8928993739761353
Fitness changed from -51.84527054810821 to -55.738169922084346
Iteration 3 complete. Error: -55.738169922084346 Total: 7.5105; Orientation: 0.0657; Line Search: 4.7082
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/73cd8259-9ff0-43a4-b911-524442a68c4e.jpg)
Adding measurement 50e6a3b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.705e+04, gradient 9.178e-04, dot -0.889; [1117b337-833d-4f81-9c7c-e82af15bf2d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.738169922084346, -51.84527054810821, -49.58297764197195, -49.582972350724276
LBFGS Accumulation History: 3 points
Removed measurement 50e6a3b1 to history. Total: 3
th(0)=-55.738169922084346;dx=-8.40128510641607E-7
New Minimum: -55.738169922084346 > -61.643449753927115
END: th(7818012.603187701)=-61.643449753927115; dx=-5.824072421886073E-7 evalInputDelta=5.905279831842769
Fitness changed from -55.738169922084346 to -61.643449753927115
Iteration 4 complete. Error: -61.643449753927115 Total: 9.4692; Orientation: 1.2149; Line Search: 4.5764
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7d00fee7-866d-4d63-a083-2243974c378b.jpg)
Adding measurement 70df0469 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.585e+04, gradient 7.793e-04, dot -0.772; [1117b337-833d-4f81-9c7c-e82af15bf2d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.643449753927115, -51.84527054810821, -49.58297764197195, -49.582972350724276
LBFGS Accumulation History: 3 points
Removed measurement 70df0469 to history. Total: 3
th(0)=-61.643449753927115;dx=-6.048070176640605E-7
New Minimum: -61.643449753927115 > -69.88894329675905
END: th(1.6843397559414055E7)=-69.88894329675905; dx=-3.441676803387286E-7 evalInputDelta=8.245493542831937
Fitness changed from -61.643449753927115 to -69.88894329675905
Iteration 5 complete. Error: -69.88894329675905 Total: 8.3692; Orientation: 1.0926; Line Search: 4.4616
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b136932e-b9c6-461f-bc48-88b359a79f57.jpg)
Adding measurement 4faef2d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.021e+04, gradient 6.953e-04, dot -0.623; [1117b337-833d-4f81-9c7c-e82af15bf2d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.88894329675905, -51.84527054810821, -49.58297764197195, -49.582972350724276
LBFGS Accumulation History: 3 points
Removed measurement 4faef2d1 to history. Total: 3
th(0)=-69.88894329675905;dx=-4.807573768443705E-7
New Minimum: -69.88894329675905 > -78.96118110113561
END: th(3.628800000000001E7)=-78.96118110113561; dx=-1.0638839411648912E-7 evalInputDelta=9.072237804376556
Fitness changed from -69.88894329675905 to -78.96118110113561
Iteration 6 complete. Error: -78.96118110113561 Total: 8.2792; Orientation: 1.0676; Line Search: 4.4122
Adding measurement 25f2e2f1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.080e+04, gradient 8.247e-04, dot -0.309; [1117b337-833d-4f81-9c7c-e82af15bf2d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.96118110113561, -51.84527054810821, -49.58297764197195, -49.582972350724276
LBFGS Accumulation History: 3 points
Removed measurement 25f2e2f1 to history. Total: 3
th(0)=-78.96118110113561;dx=-6.785131922309314E-7
Armijo: th(7.818012603187701E7)=-74.45632199113774; dx=1.4959619026713245E-7 evalInputDelta=-4.5048591099978665
New Minimum: -78.96118110113561 > -82.41358628384747
WOLF (strong): th(3.9090063015938506E7)=-82.41358628384747; dx=1.6315341930188968E-7 evalInputDelta=3.452405182711857
New Minimum: -82.41358628384747 > -84.69514712723131
END: th(1.3030021005312836E7)=-84.69514712723131; dx=-1.7128948419708472E-7 evalInputDelta=5.7339660260957
Fitness changed from -78.96118110113561 to -84.69514712723131
Iteration 7 complete. Error: -84.69514712723131 Total: 12.6965; Orientation: 1.0374; Line Search: 9.5119
Adding measurement 2bffb6e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.319e+04, gradient 5.876e-04, dot -0.539; [1117b337-833d-4f81-9c7c-e82af15bf2d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.69514712723131, -51.84527054810821, -49.58297764197195, -49.582972350724276
LBFGS Accumulation History: 3 points
Removed measurement 2bffb6e4 to history. Total: 3
th(0)=-84.69514712723131;dx=-3.444141846890855E-7
New Minimum: -84.69514712723131 > -89.82229094129148
END: th(2.8072329265690096E7)=-89.82229094129148; dx=-6.438117535330689E-8 evalInputDelta=5.127143814060176
Fitness changed from -84.69514712723131 to -89.82229094129148
Iteration 8 complete. Error: -89.82229094129148 Total: 7.6799; Orientation: 1.0957; Line Search: 4.4839
Adding measurement 5743c51a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.607e+04, gradient 7.024e-04, dot -0.386; [1117b337-833d-4f81-9c7c-e82af15bf2d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.82229094129148, -51.84527054810821, -49.58297764197195, -49.582972350724276
LBFGS Accumulation History: 3 points
Removed measurement 5743c51a to history. Total: 3
th(0)=-89.82229094129148;dx=-4.91980398747468E-7
Armijo: th(6.048000000000002E7)=-87.16793770523954; dx=1.4183300770022384E-7 evalInputDelta=-2.6543532360519464
New Minimum: -89.82229094129148 > -92.60806132455636
WOLF (strong): th(3.024000000000001E7)=-92.60806132455636; dx=1.2237476587316828E-7 evalInputDelta=2.7857703832648752
New Minimum: -92.60806132455636 > -93.36719244763594
END: th(1.0080000000000004E7)=-93.36719244763594; dx=-1.779310859733286E-7 evalInputDelta=3.544901506344459
Fitness changed from -89.82229094129148 to -93.36719244763594
Iteration 9 complete. Error: -93.36719244763594 Total: 12.1451; Orientation: 1.1006; Line Search: 8.8852
Adding measurement 7354fdeb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.452e+04, gradient 4.823e-04, dot -0.609; [1117b337-833d-4f81-9c7c-e82af15bf2d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.36719244763594, -51.84527054810821, -49.58297764197195, -49.582972350724276
LBFGS Accumulation History: 3 points
Removed measurement 7354fdeb to history. Total: 3
th(0)=-93.36719244763594;dx=-2.3126530828369304E-7
New Minimum: -93.36719244763594 > -97.08309458595122
END: th(2.1716701675521396E7)=-97.08309458595122; dx=-1.2422202078065702E-7 evalInputDelta=3.715902138315272
Fitness changed from -93.36719244763594 to -97.08309458595122
Iteration 10 complete. Error: -97.08309458595122 Total: 8.2991; Orientation: 1.1348; Line Search: 4.7505
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/01e1ae97-b8c6-46c8-8b83-1c8a612f1d69.jpg)
Final threshold in iteration 11: -97.08309458595122 (> -Infinity) after 111.433s (< 5400.000s)
Returns
-97.08309458595122