BasicOptimizer.scala:89 executed in 87.19 seconds (1.058 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: 304919703463300
Reset training subject: 304921412389600
Adding measurement 139dffa1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-155.06481819844467;dx=-2.9549069814678308E-5
New Minimum: -155.06481819844467 > -155.0648580171352
END: th(2.154434690031884)=-155.0648580171352; dx=-1.8018948365142035E-5 evalInputDelta=3.981869053859555E-5
Fitness changed from -155.06481819844467 to -155.0648580171352
Iteration 1 complete. Error: -155.0648580171352 Total: 8.3246; Orientation: 0.0649; Line Search: 3.4183
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b4e02aa4-5cf2-4d24-bb1d-b0e3590bed88.jpg)
Adding measurement 1724cdfe to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-155.0648580171352;dx=-1.7912269470684567E-5
New Minimum: -155.0648580171352 > -155.0649509273733
WOLFE (weak): th(4.641588833612779)=-155.0649509273733; dx=-1.7871510381232562E-5 evalInputDelta=9.29102380951008E-5
New Minimum: -155.0649509273733 > -155.06504383755575
WOLFE (weak): th(9.283177667225559)=-155.06504383755575; dx=-1.788496865106198E-5 evalInputDelta=1.8582042054049452E-4
New Minimum: -155.06504383755575 > -155.065408841305
WOLFE (weak): th(27.849533001676676)=-155.065408841305; dx=-1.785983666390716E-5 evalInputDelta=5.508241697782523E-4
New Minimum: -155.065408841305 > -155.06706130207462
WOLFE (weak): th(111.3981320067067)=-155.06706130207462; dx=-1.785193578469127E-5 evalInputDelta=0.0022032849394122422
New Minimum: -155.06706130207462 > -155.0758674928181
WOLFE (weak): th(556.9906600335335)=-155.0758674928181; dx=-1.7849826906171376E-5 evalInputDelta=0.011009475682897119
New Minimum: -155.0758674928181 > -155.1308633495327
WOLFE (weak): th(3341.9439602012008)=-155.1308633495327; dx=-1.7842887150824532E-5 evalInputDelta=0.06600533239748074
New Minimum: -155.1308633495327 > -155.52619459448215
WOLFE (weak): th(23393.607721408407)=-155.52619459448215; dx=-1.7777394619265426E-5 evalInputDelta=0.4613365773469411
New Minimum: -155.52619459448215 > -158.6957097288476
WOLFE (weak): th(187148.86177126726)=-158.6957097288476; dx=-1.719637755548082E-5 evalInputDelta=3.6308517117123813
New Minimum: -158.6957097288476 > -181.58023379765302
END: th(1684339.7559414054)=-181.58023379765302; dx=-1.0185479115039951E-5 evalInputDelta=26.515375780517815
Fitness changed from -155.0648580171352 to -181.58023379765302
Iteration 2 complete. Error: -181.58023379765302 Total: 18.2610; Orientation: 0.0678; Line Search: 16.2557
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ea24ce9d-cebd-4be1-ba72-69501d101a74.jpg)
Adding measurement 305b8c99 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-181.58023379765302;dx=-1.2466119576624192E-5
New Minimum: -181.58023379765302 > -212.21174464215702
END: th(3628800.0000000005)=-212.21174464215702; dx=-4.343563961662084E-6 evalInputDelta=30.631510844503993
Fitness changed from -181.58023379765302 to -212.21174464215702
Iteration 3 complete. Error: -212.21174464215702 Total: 5.5687; Orientation: 0.0644; Line Search: 3.2270
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e9349b4e-02d8-4e8c-8f46-1fcf6fdf5746.jpg)
Adding measurement 49a59d95 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.341e+04, gradient 3.107e-03, dot -0.418; [b72b63a4-86e5-439c-8d17-967de5f90ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -212.21174464215702, -181.58023379765302, -155.0648580171352, -155.06481819844467
LBFGS Accumulation History: 3 points
Removed measurement 49a59d95 to history. Total: 3
th(0)=-212.21174464215702;dx=-9.648820562962762E-6
New Minimum: -212.21174464215702 > -237.22885548607812
END: th(7818012.603187701)=-237.22885548607812; dx=-1.1315407785921164E-7 evalInputDelta=25.017110843921103
Fitness changed from -212.21174464215702 to -237.22885548607812
Iteration 4 complete. Error: -237.22885548607812 Total: 6.5885; Orientation: 1.1239; Line Search: 3.5249
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/6755558e-b50c-4700-97c8-7725b32c7117.jpg)
Adding measurement 602877d8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.990e+03, gradient 3.663e-03, dot -0.166; [b72b63a4-86e5-439c-8d17-967de5f90ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -237.22885548607812, -181.58023379765302, -155.0648580171352, -155.06481819844467
LBFGS Accumulation History: 3 points
Removed measurement 602877d8 to history. Total: 3
th(0)=-237.22885548607812;dx=-1.3410422224626327E-5
Armijo: th(1.6843397559414055E7)=-209.06250445699075; dx=3.105803685822084E-6 evalInputDelta=-28.166351029087366
New Minimum: -237.22885548607812 > -247.39584113714133
WOLF (strong): th(8421698.779707028)=-247.39584113714133; dx=4.263197112124953E-6 evalInputDelta=10.166985651063214
New Minimum: -247.39584113714133 > -262.317640599469
END: th(2807232.926569009)=-262.317640599469; dx=-3.0179652084999427E-6 evalInputDelta=25.088785113390855
Fitness changed from -237.22885548607812 to -262.317640599469
Iteration 5 complete. Error: -262.317640599469 Total: 9.6653; Orientation: 1.1243; Line Search: 6.7018
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/208cee52-8ad3-4986-9097-64977290a58a.jpg)
Adding measurement 355af8ca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.351e+04, gradient 2.482e-03, dot -0.396; [b72b63a4-86e5-439c-8d17-967de5f90ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -262.317640599469, -181.58023379765302, -155.0648580171352, -155.06481819844467
LBFGS Accumulation History: 3 points
Removed measurement 355af8ca to history. Total: 3
th(0)=-262.317640599469;dx=-6.156072965490065E-6
New Minimum: -262.317640599469 > -279.3990487277195
END: th(6048000.000000001)=-279.3990487277195; dx=-2.1414312361252387E-7 evalInputDelta=17.08140812825053
Fitness changed from -262.317640599469 to -279.3990487277195
Iteration 6 complete. Error: -279.3990487277195 Total: 6.2573; Orientation: 1.1264; Line Search: 3.2923
Adding measurement 2376afab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.303e+04, gradient 2.922e-03, dot -0.266; [b72b63a4-86e5-439c-8d17-967de5f90ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -279.3990487277195, -181.58023379765302, -155.0648580171352, -155.06481819844467
LBFGS Accumulation History: 3 points
Removed measurement 2376afab to history. Total: 3
th(0)=-279.3990487277195;dx=-8.527446918455502E-6
Armijo: th(1.3030021005312836E7)=-259.064126765203; dx=3.0453947724127682E-6 evalInputDelta=-20.33492196251649
New Minimum: -279.3990487277195 > -285.4389184288427
WOLF (strong): th(6515010.502656418)=-285.4389184288427; dx=3.2326068010052014E-6 evalInputDelta=6.039869701123223
New Minimum: -285.4389184288427 > -292.4798957270475
END: th(2171670.167552139)=-292.4798957270475; dx=-2.504114935613793E-6 evalInputDelta=13.080846999328003
Fitness changed from -279.3990487277195 to -292.4798957270475
Iteration 7 complete. Error: -292.4798957270475 Total: 9.2226; Orientation: 1.1408; Line Search: 6.5575
Adding measurement 66600c94 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.149e+04, gradient 1.878e-03, dot -0.487; [b72b63a4-86e5-439c-8d17-967de5f90ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -292.4798957270475, -181.58023379765302, -155.0648580171352, -155.06481819844467
LBFGS Accumulation History: 3 points
Removed measurement 66600c94 to history. Total: 3
th(0)=-292.4798957270475;dx=-3.5149579146369762E-6
New Minimum: -292.4798957270475 > -303.7218603707576
END: th(4678721.544281682)=-303.7218603707576; dx=-1.3169137639535961E-6 evalInputDelta=11.241964643710105
Fitness changed from -292.4798957270475 to -303.7218603707576
Iteration 8 complete. Error: -303.7218603707576 Total: 6.1656; Orientation: 1.1736; Line Search: 3.3822
Adding measurement bf65785 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.128e+04, gradient 2.005e-03, dot -0.408; [b72b63a4-86e5-439c-8d17-967de5f90ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -303.7218603707576, -181.58023379765302, -155.0648580171352, -155.06481819844467
LBFGS Accumulation History: 3 points
Removed measurement bf65785 to history. Total: 3
th(0)=-303.7218603707576;dx=-4.021319219425296E-6
New Minimum: -303.7218603707576 > -305.919175966606
WOLF (strong): th(1.0080000000000002E7)=-305.919175966606; dx=1.1503275254845744E-6 evalInputDelta=2.1973155958484085
New Minimum: -305.919175966606 > -311.31791238336444
WOLF (strong): th(5040000.000000001)=-311.31791238336444; dx=1.7545290724345665E-7 evalInputDelta=7.596052012606833
END: th(1680000.0000000002)=-309.0820556006659; dx=-2.069727503797818E-6 evalInputDelta=5.3601952299082996
Fitness changed from -303.7218603707576 to -311.31791238336444
Iteration 9 complete. Error: -311.31791238336444 Total: 9.1830; Orientation: 1.1156; Line Search: 6.5396
Adding measurement 5611722 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.823e+04, gradient 2.342e-03, dot -0.295; [b72b63a4-86e5-439c-8d17-967de5f90ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -311.31791238336444, -181.58023379765302, -155.0648580171352, -155.06481819844467
LBFGS Accumulation History: 3 points
Removed measurement 5611722 to history. Total: 3
th(0)=-311.31791238336444;dx=-5.479472007638902E-6
New Minimum: -311.31791238336444 > -320.29395260184856
WOLF (strong): th(3619450.2792535652)=-320.29395260184856; dx=5.676807393091579E-7 evalInputDelta=8.976040218484115
END: th(1809725.1396267826)=-318.9774184011083; dx=-2.3382513002841716E-6 evalInputDelta=7.659506017743865
Fitness changed from -311.31791238336444 to -320.29395260184856
Iteration 10 complete. Error: -320.29395260184856 Total: 7.6134; Orientation: 1.1314; Line Search: 4.8741
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9165f0c8-030a-418a-aea2-390a262f91f5.jpg)
Final threshold in iteration 11: -320.29395260184856 (> -Infinity) after 87.189s (< 5400.000s)
Returns
-320.29395260184856