BasicOptimizer.scala:89 executed in 152.55 seconds (2.676 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: 456458519833800
Reset training subject: 456461564037500
Adding measurement 5294bf63 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-146.28308079323838;dx=-1.1837353756616332E-5
New Minimum: -146.28308079323838 > -146.28311118097417
WOLFE (weak): th(2.154434690031884)=-146.28311118097417; dx=-1.1640921055363486E-5 evalInputDelta=3.0387735790782244E-5
New Minimum: -146.28311118097417 > -146.28314156870368
WOLFE (weak): th(4.308869380063768)=-146.28314156870368; dx=-1.1640892747274996E-5 evalInputDelta=6.0775465300366704E-5
New Minimum: -146.28314156870368 > -146.28324032878095
WOLFE (weak): th(12.926608140191302)=-146.28324032878095; dx=-1.1632151133195764E-5 evalInputDelta=1.5953554256498137E-4
New Minimum: -146.28324032878095 > -146.28372653126615
WOLFE (weak): th(51.70643256076521)=-146.28372653126615; dx=-1.1640757346803858E-5 evalInputDelta=6.457380277709035E-4
New Minimum: -146.28372653126615 > -146.28630185810584
WOLFE (weak): th(258.53216280382605)=-146.28630185810584; dx=-1.164044548146366E-5 evalInputDelta=0.0032210648674606546
New Minimum: -146.28630185810584 > -146.30239092683195
WOLFE (weak): th(1551.1929768229563)=-146.30239092683195; dx=-1.161255317368609E-5 evalInputDelta=0.019310133593563705
New Minimum: -146.30239092683195 > -146.4181299386519
WOLFE (weak): th(10858.350837760694)=-146.4181299386519; dx=-1.1618834346747551E-5 evalInputDelta=0.1350491454135181
New Minimum: -146.4181299386519 > -147.35653943599092
WOLFE (weak): th(86866.80670208555)=-147.35653943599092; dx=-1.14675694672696E-5 evalInputDelta=1.0734586427525414
New Minimum: -147.35653943599092 > -155.2947095574648
END: th(781801.26031877)=-155.2947095574648; dx=-9.901549693631087E-6 evalInputDelta=9.01162876422643
Fitness changed from -146.28308079323838 to -155.2947095574648
Iteration 1 complete. Error: -155.2947095574648 Total: 38.0868; Orientation: 0.1100; Line Search: 29.3093
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b6f430b2-d090-467a-805e-7d6cb195ff79.jpg)
Adding measurement 218f59 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-155.2947095574648;dx=-9.257600379215838E-6
New Minimum: -155.2947095574648 > -169.49264427288452
END: th(1684339.7559414052)=-169.49264427288452; dx=-6.69981354062948E-6 evalInputDelta=14.197934715419706
Fitness changed from -155.2947095574648 to -169.49264427288452
Iteration 2 complete. Error: -169.49264427288452 Total: 9.5229; Orientation: 0.1216; Line Search: 5.7988
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/af2c3688-8dc5-487d-b38b-7daea4ac61cd.jpg)
Adding measurement 53754dd8 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-169.49264427288452;dx=-6.29926294899063E-6
New Minimum: -169.49264427288452 > -188.41946597015837
END: th(3628800.0)=-188.41946597015837; dx=-3.777717932266466E-6 evalInputDelta=18.92682169727385
Fitness changed from -169.49264427288452 to -188.41946597015837
Iteration 3 complete. Error: -188.41946597015837 Total: 9.4149; Orientation: 0.1088; Line Search: 5.6838
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/3ce40afc-b25e-40df-9f1a-56011bbfe652.jpg)
Adding measurement 6f280ac1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.730e+04, gradient 2.124e-03, dot -0.793; [18635281-c780-43bb-9248-7806f3c45b3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -188.41946597015837, -169.49264427288452, -155.2947095574648, -146.28308079323838
LBFGS Accumulation History: 3 points
Removed measurement 6f280ac1 to history. Total: 3
th(0)=-188.41946597015837;dx=-4.492397551500732E-6
New Minimum: -188.41946597015837 > -210.80289491088558
END: th(7818012.6031877)=-210.80289491088558; dx=-1.645059428951994E-6 evalInputDelta=22.383428940727214
Fitness changed from -188.41946597015837 to -210.80289491088558
Iteration 4 complete. Error: -210.80289491088558 Total: 11.7187; Orientation: 1.9920; Line Search: 6.0225
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/48d92f80-a4b1-42a7-be19-aa1192a44d5e.jpg)
Adding measurement 335336f6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.741e+04, gradient 2.156e-03, dot -0.584; [18635281-c780-43bb-9248-7806f3c45b3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -210.80289491088558, -169.49264427288452, -155.2947095574648, -146.28308079323838
LBFGS Accumulation History: 3 points
Removed measurement 335336f6 to history. Total: 3
th(0)=-210.80289491088558;dx=-4.620012065989272E-6
New Minimum: -210.80289491088558 > -217.38396243009183
WOLF (strong): th(1.684339755941405E7)=-217.38396243009183; dx=1.010027632950478E-6 evalInputDelta=6.581067519206243
New Minimum: -217.38396243009183 > -224.895543018949
WOLF (strong): th(8421698.779707026)=-224.895543018949; dx=1.2307228146134768E-7 evalInputDelta=14.092648108063429
END: th(2807232.9265690087)=-220.78709745490224; dx=-2.262374026376874E-6 evalInputDelta=9.984202544016654
Fitness changed from -210.80289491088558 to -224.895543018949
Iteration 5 complete. Error: -224.895543018949 Total: 17.2500; Orientation: 1.9798; Line Search: 11.8134
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8a23e02e-3408-4610-a604-9deff5aa2c9a.jpg)
Adding measurement 161fe5a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.567e+04, gradient 2.284e-03, dot -0.456; [18635281-c780-43bb-9248-7806f3c45b3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -224.895543018949, -169.49264427288452, -155.2947095574648, -146.28308079323838
LBFGS Accumulation History: 3 points
Removed measurement 161fe5a0 to history. Total: 3
th(0)=-224.895543018949;dx=-5.212006009367354E-6
New Minimum: -224.895543018949 > -240.13287526322426
WOLF (strong): th(6048000.0)=-240.13287526322426; dx=9.707463542878736E-9 evalInputDelta=15.237332244275251
END: th(3024000.0)=-236.94186207399648; dx=-2.383851894268535E-6 evalInputDelta=12.046319055047462
Fitness changed from -224.895543018949 to -240.13287526322426
Iteration 6 complete. Error: -240.13287526322426 Total: 14.2579; Orientation: 1.9238; Line Search: 8.9981
Adding measurement 4cb04f41 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.211e+04, gradient 1.763e-03, dot -0.542; [18635281-c780-43bb-9248-7806f3c45b3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -240.13287526322426, -169.49264427288452, -155.2947095574648, -146.28308079323838
LBFGS Accumulation History: 3 points
Removed measurement 4cb04f41 to history. Total: 3
th(0)=-240.13287526322426;dx=-3.1070485100685233E-6
New Minimum: -240.13287526322426 > -249.71587314639117
END: th(6515010.502656417)=-249.71587314639117; dx=-1.5655709118505148E-7 evalInputDelta=9.582997883166911
Fitness changed from -240.13287526322426 to -249.71587314639117
Iteration 7 complete. Error: -249.71587314639117 Total: 10.7092; Orientation: 1.8785; Line Search: 5.9153
Adding measurement 6a0ef6d5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.345e+04, gradient 1.661e-03, dot -0.530; [18635281-c780-43bb-9248-7806f3c45b3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -249.71587314639117, -169.49264427288452, -155.2947095574648, -146.28308079323838
LBFGS Accumulation History: 3 points
Removed measurement 6a0ef6d5 to history. Total: 3
th(0)=-249.71587314639117;dx=-2.7454763644231815E-6
New Minimum: -249.71587314639117 > -251.38725712299407
WOLF (strong): th(1.4036164632845046E7)=-251.38725712299407; dx=1.0103836284647204E-6 evalInputDelta=1.6713839766028968
New Minimum: -251.38725712299407 > -257.42499057540005
WOLF (strong): th(7018082.316422523)=-257.42499057540005; dx=1.3392976392547788E-7 evalInputDelta=7.70911742900887
END: th(2339360.772140841)=-254.87698191772077; dx=-1.5726464312076467E-6 evalInputDelta=5.1611087713295944
Fitness changed from -249.71587314639117 to -257.42499057540005
Iteration 8 complete. Error: -257.42499057540005 Total: 16.1972; Orientation: 1.9707; Line Search: 11.5089
Adding measurement 6d5dab03 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.434e+04, gradient 1.662e-03, dot -0.486; [18635281-c780-43bb-9248-7806f3c45b3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -257.42499057540005, -169.49264427288452, -155.2947095574648, -146.28308079323838
LBFGS Accumulation History: 3 points
Removed measurement 6d5dab03 to history. Total: 3
th(0)=-257.42499057540005;dx=-2.7502298897123833E-6
New Minimum: -257.42499057540005 > -264.8372599717761
END: th(5040000.000000001)=-264.8372599717761; dx=-2.9167604312108005E-7 evalInputDelta=7.412269396376075
Fitness changed from -257.42499057540005 to -264.8372599717761
Iteration 9 complete. Error: -264.8372599717761 Total: 10.9116; Orientation: 1.9066; Line Search: 6.1136
Adding measurement 61068476 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.625e+04, gradient 1.301e-03, dot -0.584; [18635281-c780-43bb-9248-7806f3c45b3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -264.8372599717761, -169.49264427288452, -155.2947095574648, -146.28308079323838
LBFGS Accumulation History: 3 points
Removed measurement 61068476 to history. Total: 3
th(0)=-264.8372599717761;dx=-1.6871138006638396E-6
New Minimum: -264.8372599717761 > -270.07480499979874
WOLF (strong): th(1.0858350837760696E7)=-270.07480499979874; dx=1.5055137404411357E-7 evalInputDelta=5.237545028022623
New Minimum: -270.07480499979874 > -270.0970404478807
END: th(5429175.418880348)=-270.0970404478807; dx=-4.4721294789632877E-7 evalInputDelta=5.259780476104595
Fitness changed from -264.8372599717761 to -270.0970404478807
Iteration 10 complete. Error: -270.0970404478807 Total: 13.8665; Orientation: 2.0317; Line Search: 9.0522
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a01057b6-6f85-4846-a0c4-e6c718068d64.jpg)
Final threshold in iteration 11: -270.0970404478807 (> -Infinity) after 152.547s (< 5400.000s)
Returns
-270.0970404478807