BasicOptimizer.scala:89 executed in 145.34 seconds (2.075 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: 111802325240800
Reset training subject: 111805316613200
Adding measurement 2c6e08dc to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-18.505310240670166;dx=-1.4421160319592379E-6
New Minimum: -18.505310240670166 > -18.505312525544348
END: th(2.154434690031884)=-18.505312525544348; dx=-1.2485778767028455E-6 evalInputDelta=2.284874181412988E-6
Fitness changed from -18.505310240670166 to -18.505312525544348
Iteration 1 complete. Error: -18.505312525544348 Total: 14.9008; Orientation: 0.0622; Line Search: 5.6553
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 2e825c9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-18.505312525544348;dx=-1.247486378511542E-6
New Minimum: -18.505312525544348 > -18.50531823772857
WOLFE (weak): th(4.641588833612779)=-18.50531823772857; dx=-1.2472692855600111E-6 evalInputDelta=5.71218422251718E-6
New Minimum: -18.50531823772857 > -18.50532566356542
WOLFE (weak): th(9.283177667225559)=-18.50532566356542; dx=-1.2470011377841427E-6 evalInputDelta=1.3138021071057437E-5
New Minimum: -18.50532566356542 > -18.505350225927614
WOLFE (weak): th(27.849533001676676)=-18.505350225927614; dx=-1.2469884788312692E-6 evalInputDelta=3.7700383266781046E-5
New Minimum: -18.505350225927614 > -18.505465611471863
WOLFE (weak): th(111.3981320067067)=-18.505465611471863; dx=-1.2467436674214139E-6 evalInputDelta=1.5308592751495098E-4
New Minimum: -18.505465611471863 > -18.50607165937355
WOLFE (weak): th(556.9906600335335)=-18.50607165937355; dx=-1.2466511534330426E-6 evalInputDelta=7.591338292023408E-4
New Minimum: -18.50607165937355 > -18.509863435043112
WOLFE (weak): th(3341.9439602012008)=-18.509863435043112; dx=-1.2463008232402179E-6 evalInputDelta=0.004550909498764355
New Minimum: -18.509863435043112 > -18.537151132003835
WOLFE (weak): th(23393.607721408407)=-18.537151132003835; dx=-1.244962739713342E-6 evalInputDelta=0.03183860645948755
New Minimum: -18.537151132003835 > -18.758576521931904
WOLFE (weak): th(187148.86177126726)=-18.758576521931904; dx=-1.22898125227392E-6 evalInputDelta=0.25326399638755603
New Minimum: -18.758576521931904 > -20.588324967105418
END: th(1684339.7559414054)=-20.588324967105418; dx=-9.941267033662277E-7 evalInputDelta=2.0830124415610705
Fitness changed from -18.505312525544348 to -20.588324967105418
Iteration 2 complete. Error: -20.588324967105418 Total: 34.6190; Orientation: 0.0614; Line Search: 31.6100
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 5bf8acf2 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-20.588324967105418;dx=-9.975323118357706E-7
New Minimum: -20.588324967105418 > -23.740920086167826
END: th(3628800.0000000005)=-23.740920086167826; dx=-6.073144528260566E-7 evalInputDelta=3.1525951190624077
Fitness changed from -20.588324967105418 to -23.740920086167826
Iteration 3 complete. Error: -23.740920086167826 Total: 10.1838; Orientation: 0.0546; Line Search: 6.0460
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 46d3cf34 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.192e+03, gradient 8.352e-04, dot -0.701; [02ebd11e-b587-4e9f-8b3d-c569a144b7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.740920086167826, -20.588324967105418, -18.505312525544348, -18.505310240670166
LBFGS Accumulation History: 3 points
Removed measurement 46d3cf34 to history. Total: 3
th(0)=-23.740920086167826;dx=-6.967566298001419E-7
New Minimum: -23.740920086167826 > -27.755094363148686
END: th(7818012.603187701)=-27.755094363148686; dx=-2.947529601252259E-7 evalInputDelta=4.01417427698086
Fitness changed from -23.740920086167826 to -27.755094363148686
Iteration 4 complete. Error: -27.755094363148686 Total: 10.4587; Orientation: 1.0957; Line Search: 5.3613
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 1c6e6f15 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.982e+03, gradient 7.953e-04, dot -0.489; [02ebd11e-b587-4e9f-8b3d-c569a144b7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -27.755094363148686, -20.588324967105418, -18.505312525544348, -18.505310240670166
LBFGS Accumulation History: 3 points
Removed measurement 1c6e6f15 to history. Total: 3
th(0)=-27.755094363148686;dx=-6.312823509255571E-7
New Minimum: -27.755094363148686 > -31.65850090054611
END: th(1.6843397559414055E7)=-31.65850090054611; dx=-7.080146534979446E-8 evalInputDelta=3.903406537397423
Fitness changed from -27.755094363148686 to -31.65850090054611
Iteration 5 complete. Error: -31.65850090054611 Total: 9.4412; Orientation: 1.1677; Line Search: 5.3327
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 2f6a873a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.759e+03, gradient 8.320e-04, dot -0.266; [02ebd11e-b587-4e9f-8b3d-c569a144b7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -31.65850090054611, -20.588324967105418, -18.505312525544348, -18.505310240670166
LBFGS Accumulation History: 3 points
Removed measurement 2f6a873a to history. Total: 3
th(0)=-31.65850090054611;dx=-6.917015244180763E-7
New Minimum: -31.65850090054611 > -34.857936531284814
WOLF (strong): th(3.628800000000001E7)=-34.857936531284814; dx=6.049152845254947E-8 evalInputDelta=3.199435630738705
New Minimum: -34.857936531284814 > -36.14484406149928
WOLF (strong): th(1.8144000000000004E7)=-36.14484406149928; dx=3.2922596202211553E-8 evalInputDelta=4.486343160953169
END: th(6048000.000000001)=-35.06570768931838; dx=-3.197887195716344E-7 evalInputDelta=3.407206788772271
Fitness changed from -31.65850090054611 to -36.14484406149928
Iteration 6 complete. Error: -36.14484406149928 Total: 16.6881; Orientation: 1.0556; Line Search: 12.3747
Adding measurement 9387f3b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.443e+04, gradient 8.238e-04, dot -0.253; [02ebd11e-b587-4e9f-8b3d-c569a144b7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -36.14484406149928, -20.588324967105418, -18.505312525544348, -18.505310240670166
LBFGS Accumulation History: 3 points
Removed measurement 9387f3b to history. Total: 3
th(0)=-36.14484406149928;dx=-6.77793279446262E-7
New Minimum: -36.14484406149928 > -40.93362041017048
END: th(1.3030021005312836E7)=-40.93362041017048; dx=-1.9792560773007432E-8 evalInputDelta=4.788776348671199
Fitness changed from -36.14484406149928 to -40.93362041017048
Iteration 7 complete. Error: -40.93362041017048 Total: 8.9577; Orientation: 1.0921; Line Search: 5.2947
Adding measurement 20fd953d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.388e+04, gradient 7.037e-04, dot -0.361; [02ebd11e-b587-4e9f-8b3d-c569a144b7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.93362041017048, -20.588324967105418, -18.505312525544348, -18.505310240670166
LBFGS Accumulation History: 3 points
Removed measurement 20fd953d to history. Total: 3
th(0)=-40.93362041017048;dx=-4.94509443096506E-7
New Minimum: -40.93362041017048 > -42.72099635849156
WOLF (strong): th(2.8072329265690096E7)=-42.72099635849156; dx=9.182221809348483E-8 evalInputDelta=1.7873759483210847
New Minimum: -42.72099635849156 > -43.987874871385436
WOLF (strong): th(1.4036164632845048E7)=-43.987874871385436; dx=2.0651626566727294E-8 evalInputDelta=3.05425446121496
END: th(4678721.544281683)=-42.97619645603244; dx=-2.907962893407365E-7 evalInputDelta=2.0425760458619635
Fitness changed from -40.93362041017048 to -43.987874871385436
Iteration 8 complete. Error: -43.987874871385436 Total: 15.5324; Orientation: 1.0584; Line Search: 11.7868
Adding measurement 211fefeb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.924e+04, gradient 7.184e-04, dot -0.348; [02ebd11e-b587-4e9f-8b3d-c569a144b7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -43.987874871385436, -20.588324967105418, -18.505312525544348, -18.505310240670166
LBFGS Accumulation History: 3 points
Removed measurement 211fefeb to history. Total: 3
th(0)=-43.987874871385436;dx=-5.155647516089121E-7
New Minimum: -43.987874871385436 > -46.95102187388667
END: th(1.0080000000000004E7)=-46.95102187388667; dx=-2.2603740537201015E-8 evalInputDelta=2.9631470025012305
Fitness changed from -43.987874871385436 to -46.95102187388667
Iteration 9 complete. Error: -46.95102187388667 Total: 10.3593; Orientation: 1.2734; Line Search: 5.8789
Adding measurement 37248c1e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.811e+04, gradient 6.062e-04, dot -0.444; [02ebd11e-b587-4e9f-8b3d-c569a144b7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.95102187388667, -20.588324967105418, -18.505312525544348, -18.505310240670166
LBFGS Accumulation History: 3 points
Removed measurement 37248c1e to history. Total: 3
th(0)=-46.95102187388667;dx=-3.665366275116294E-7
New Minimum: -46.95102187388667 > -48.568977078864364
WOLF (strong): th(2.1716701675521396E7)=-48.568977078864364; dx=5.628099448519886E-8 evalInputDelta=1.6179552049776973
New Minimum: -48.568977078864364 > -49.051348949282584
END: th(1.0858350837760698E7)=-49.051348949282584; dx=-2.4383641976467082E-8 evalInputDelta=2.100327075395917
Fitness changed from -46.95102187388667 to -49.051348949282584
Iteration 10 complete. Error: -49.051348949282584 Total: 13.5533; Orientation: 1.6669; Line Search: 9.1338
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -49.051348949282584 (> -Infinity) after 145.343s (< 5400.000s)
Returns
-49.051348949282584