BasicOptimizer.scala:89 executed in 110.49 seconds (1.531 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: 44489450152600
Reset training subject: 44491848870400
Corrupt weights measurement
LBFGS Accumulation History: 0 points
Constructing line search parameters: GD+Trust
New Minimum: -44.685556074317226 > -44.838492352073104
th(0)=-44.838492352073104;dx=-1.733026318916519E-6
New Minimum: -44.838492352073104 > -44.83849625282557
END: th(2.154434690031884)=-44.83849625282557; dx=-1.4653556284050096E-6 evalInputDelta=3.900752467700386E-6
Fitness changed from -44.685556074317226 to -44.83849625282557
Iteration 1 complete. Error: -44.83849625282557 Total: 11.5281; Orientation: 0.0388; Line Search: 4.4573
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a3244962-d481-40eb-b4cc-d537d2764545.jpg)
Adding measurement 51c0e39f to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-44.83849625282557;dx=-1.4614099136054587E-6
New Minimum: -44.83849625282557 > -44.8385040543295
WOLFE (weak): th(4.641588833612779)=-44.8385040543295; dx=-1.45971406677537E-6 evalInputDelta=7.801503926430087E-6
New Minimum: -44.8385040543295 > -44.83850990545654
WOLFE (weak): th(9.283177667225559)=-44.83850990545654; dx=-1.4591604756168029E-6 evalInputDelta=1.3652630968863377E-5
New Minimum: -44.83850990545654 > -44.838539161080334
WOLFE (weak): th(27.849533001676676)=-44.838539161080334; dx=-1.4567062182185653E-6 evalInputDelta=4.290825476260807E-5
New Minimum: -44.838539161080334 > -44.83867373670392
WOLFE (weak): th(111.3981320067067)=-44.83867373670392; dx=-1.4571477143094479E-6 evalInputDelta=1.7748387834615187E-4
New Minimum: -44.83867373670392 > -44.83937586384123
WOLFE (weak): th(556.9906600335335)=-44.83937586384123; dx=-1.4563501528985895E-6 evalInputDelta=8.796110156552572E-4
New Minimum: -44.83937586384123 > -44.84377951055528
WOLFE (weak): th(3341.9439602012008)=-44.84377951055528; dx=-1.4565182239234795E-6 evalInputDelta=0.005283257729708168
New Minimum: -44.84377951055528 > -44.875467943577284
WOLFE (weak): th(23393.607721408407)=-44.875467943577284; dx=-1.4554676018643082E-6 evalInputDelta=0.03697169075171303
New Minimum: -44.875467943577284 > -45.132646722641375
WOLFE (weak): th(187148.86177126726)=-45.132646722641375; dx=-1.4379201254136484E-6 evalInputDelta=0.29415046981580417
New Minimum: -45.132646722641375 > -47.34268232742486
END: th(1684339.7559414054)=-47.34268232742486; dx=-1.2885768962920685E-6 evalInputDelta=2.504186074599289
Fitness changed from -44.83849625282557 to -47.34268232742486
Iteration 2 complete. Error: -47.34268232742486 Total: 25.7702; Orientation: 0.0637; Line Search: 22.8460
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/435d6b1e-ca33-4412-beeb-5c82b68ed7c9.jpg)
Adding measurement 12b1e49b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-47.34268232742486;dx=-1.2811163198636031E-6
New Minimum: -47.34268232742486 > -51.680584352590564
END: th(3628800.0000000005)=-51.680584352590564; dx=-9.798469097606457E-7 evalInputDelta=4.337902025165704
Fitness changed from -47.34268232742486 to -51.680584352590564
Iteration 3 complete. Error: -51.680584352590564 Total: 7.4173; Orientation: 0.0532; Line Search: 4.4405
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/bbff7769-5d1e-49cc-b2c7-cfd504378f2b.jpg)
Adding measurement 900ae0a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-51.680584352590564;dx=-9.297749022257151E-7
New Minimum: -51.680584352590564 > -58.19076479502023
END: th(7818012.603187701)=-58.19076479502023; dx=-6.314028787521617E-7 evalInputDelta=6.5101804424296645
Fitness changed from -51.680584352590564 to -58.19076479502023
Iteration 4 complete. Error: -58.19076479502023 Total: 7.7790; Orientation: 0.0629; Line Search: 4.8221
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c16a3c54-d279-472d-b86d-7d77348ae7c5.jpg)
Adding measurement 7da4aade to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.291e+04, gradient 7.976e-04, dot -0.816; [cbe6e4a9-9719-4e7f-ae89-1a728d246482 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.19076479502023, -51.680584352590564, -47.34268232742486, -44.83849625282557
LBFGS Accumulation History: 3 points
Removed measurement 7da4aade to history. Total: 3
th(0)=-58.19076479502023;dx=-6.360956381585359E-7
New Minimum: -58.19076479502023 > -66.77074554486438
END: th(1.6843397559414055E7)=-66.77074554486438; dx=-3.4878263068200985E-7 evalInputDelta=8.579980749844154
Fitness changed from -58.19076479502023 to -66.77074554486438
Iteration 5 complete. Error: -66.77074554486438 Total: 8.5418; Orientation: 1.0989; Line Search: 4.7248
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/5ebd3507-7691-402d-a3e6-8bab6e016fb0.jpg)
Adding measurement 475f81cc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.089e+04, gradient 6.888e-04, dot -0.646; [cbe6e4a9-9719-4e7f-ae89-1a728d246482 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -66.77074554486438, -51.680584352590564, -47.34268232742486, -44.83849625282557
LBFGS Accumulation History: 3 points
Removed measurement 475f81cc to history. Total: 3
th(0)=-66.77074554486438;dx=-4.734628161029806E-7
New Minimum: -66.77074554486438 > -75.83115072230831
END: th(3.628800000000001E7)=-75.83115072230831; dx=-1.0485068637839624E-7 evalInputDelta=9.060405177443926
Fitness changed from -66.77074554486438 to -75.83115072230831
Iteration 6 complete. Error: -75.83115072230831 Total: 8.2734; Orientation: 1.0486; Line Search: 4.5786
Adding measurement 3595a332 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.908e+04, gradient 7.971e-04, dot -0.375; [cbe6e4a9-9719-4e7f-ae89-1a728d246482 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.83115072230831, -51.680584352590564, -47.34268232742486, -44.83849625282557
LBFGS Accumulation History: 3 points
Removed measurement 3595a332 to history. Total: 3
th(0)=-75.83115072230831;dx=-6.347731355720065E-7
Armijo: th(7.818012603187701E7)=-71.73194816089412; dx=1.4423674290183816E-7 evalInputDelta=-4.099202561414188
New Minimum: -75.83115072230831 > -79.26134503911997
WOLF (strong): th(3.9090063015938506E7)=-79.26134503911997; dx=1.581953560322607E-7 evalInputDelta=3.430194316811665
New Minimum: -79.26134503911997 > -81.29153131680033
END: th(1.3030021005312836E7)=-81.29153131680033; dx=-1.6821900470206135E-7 evalInputDelta=5.4603805944920225
Fitness changed from -75.83115072230831 to -81.29153131680033
Iteration 7 complete. Error: -81.29153131680033 Total: 12.5251; Orientation: 1.0061; Line Search: 9.2016
Adding measurement 33593b2f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.061e+04, gradient 5.718e-04, dot -0.555; [cbe6e4a9-9719-4e7f-ae89-1a728d246482 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.29153131680033, -51.680584352590564, -47.34268232742486, -44.83849625282557
LBFGS Accumulation History: 3 points
Removed measurement 33593b2f to history. Total: 3
th(0)=-81.29153131680033;dx=-3.266065188470014E-7
New Minimum: -81.29153131680033 > -86.27853471179775
END: th(2.8072329265690096E7)=-86.27853471179775; dx=-6.346093711678271E-8 evalInputDelta=4.987003394997416
Fitness changed from -81.29153131680033 to -86.27853471179775
Iteration 8 complete. Error: -86.27853471179775 Total: 7.7933; Orientation: 1.0477; Line Search: 4.6179
Adding measurement 71f4297f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.444e+04, gradient 6.849e-04, dot -0.418; [cbe6e4a9-9719-4e7f-ae89-1a728d246482 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.27853471179775, -51.680584352590564, -47.34268232742486, -44.83849625282557
LBFGS Accumulation History: 3 points
Removed measurement 71f4297f to history. Total: 3
th(0)=-86.27853471179775;dx=-4.6740687835495993E-7
Armijo: th(6.048000000000002E7)=-84.03992987337632; dx=1.2432195099134028E-7 evalInputDelta=-2.2386048384214234
New Minimum: -86.27853471179775 > -88.91374530687263
WOLF (strong): th(3.024000000000001E7)=-88.91374530687263; dx=1.1647907666371903E-7 evalInputDelta=2.6352105950748808
New Minimum: -88.91374530687263 > -89.6597768332723
END: th(1.0080000000000004E7)=-89.6597768332723; dx=-1.6651890048587336E-7 evalInputDelta=3.381242121474557
Fitness changed from -86.27853471179775 to -89.6597768332723
Iteration 9 complete. Error: -89.6597768332723 Total: 12.4104; Orientation: 0.9986; Line Search: 9.2217
Adding measurement 7dabab3b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.178e+04, gradient 4.713e-04, dot -0.617; [cbe6e4a9-9719-4e7f-ae89-1a728d246482 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.6597768332723, -51.680584352590564, -47.34268232742486, -44.83849625282557
LBFGS Accumulation History: 3 points
Removed measurement 7dabab3b to history. Total: 3
th(0)=-89.6597768332723;dx=-2.2188749023348096E-7
New Minimum: -89.6597768332723 > -93.24337577040957
END: th(2.1716701675521396E7)=-93.24337577040957; dx=-1.1822801913714012E-7 evalInputDelta=3.5835989371372676
Fitness changed from -89.6597768332723 to -93.24337577040957
Iteration 10 complete. Error: -93.24337577040957 Total: 8.0403; Orientation: 1.2559; Line Search: 4.5195
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1f73a507-59e7-4f30-958c-8f815ce54f3c.jpg)
Final threshold in iteration 11: -93.24337577040957 (> -Infinity) after 110.492s (< 5400.000s)
Returns
-93.24337577040957