BasicOptimizer.scala:89 executed in 197.25 seconds (1.888 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: 12898110777024
Reset training subject: 12902620867491
Adding measurement 3fe72832 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.08794718980789185;dx=-6.0613690223266E-7
New Minimum: -0.08794718980789185 > -0.0879475474357605
WOLFE (weak): th(2.154434690031884)=-0.0879475474357605; dx=-5.557603052403006E-7 evalInputDelta=3.5762786865234375E-7
New Minimum: -0.0879475474357605 > -0.08794824779033661
WOLFE (weak): th(4.308869380063768)=-0.08794824779033661; dx=-5.557541480549674E-7 evalInputDelta=1.0579824447631836E-6
New Minimum: -0.08794824779033661 > -0.08795076608657837
WOLFE (weak): th(12.926608140191302)=-0.08795076608657837; dx=-5.557464593238681E-7 evalInputDelta=3.5762786865234375E-6
New Minimum: -0.08795076608657837 > -0.08796155452728271
WOLFE (weak): th(51.70643256076521)=-0.08796155452728271; dx=-5.557428033471306E-7 evalInputDelta=1.436471939086914E-5
New Minimum: -0.08796155452728271 > -0.08801913261413574
WOLFE (weak): th(258.53216280382605)=-0.08801913261413574; dx=-5.557076168888805E-7 evalInputDelta=7.194280624389648E-5
New Minimum: -0.08801913261413574 > -0.0883781760931015
WOLFE (weak): th(1551.1929768229563)=-0.0883781760931015; dx=-5.555367143777251E-7 evalInputDelta=4.3098628520965576E-4
New Minimum: -0.0883781760931015 > -0.09095944464206696
WOLFE (weak): th(10858.350837760694)=-0.09095944464206696; dx=-5.539853374267466E-7 evalInputDelta=0.00301225483417511
New Minimum: -0.09095944464206696 > -0.1117832362651825
END: th(86866.80670208555)=-0.1117832362651825; dx=-5.413483568000384E-7 evalInputDelta=0.02383604645729065
Fitness changed from -0.08794718980789185 to -0.1117832362651825
Iteration 1 complete. Error: -0.1117832362651825 Total: 51.7231; Orientation: 0.0452; Line Search: 38.6790
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e9dfbae9-25ce-4566-a21b-1ec15a726e42.jpg)
Adding measurement a3fcb48 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.1117832362651825;dx=-5.312322214203761E-7
New Minimum: -0.1117832362651825 > -0.16012144088745117
WOLFE (weak): th(187148.86177126726)=-0.16012144088745117; dx=-5.015473033508735E-7 evalInputDelta=0.04833820462226868
New Minimum: -0.16012144088745117 > -0.205642968416214
END: th(374297.7235425345)=-0.205642968416214; dx=-4.7095009693984843E-7 evalInputDelta=0.0938597321510315
Fitness changed from -0.1117832362651825 to -0.205642968416214
Iteration 2 complete. Error: -0.205642968416214 Total: 18.2631; Orientation: 0.0449; Line Search: 13.6693
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c3b64033-eabe-48f6-a827-082cb967cc2e.jpg)
Adding measurement 11efd4bf to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.205642968416214;dx=-4.375376698011645E-7
New Minimum: -0.205642968416214 > -0.3629089444875717
END: th(806400.0000000001)=-0.3629089444875717; dx=-3.4293121110104046E-7 evalInputDelta=0.15726597607135773
Fitness changed from -0.205642968416214 to -0.3629089444875717
Iteration 3 complete. Error: -0.3629089444875717 Total: 12.8623; Orientation: 0.0448; Line Search: 8.3567
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5c9f6f35-55bd-455f-a061-6035e7fa2d6d.jpg)
Adding measurement 78a059e9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.337e+03, gradient 5.549e-04, dot -0.928; [32c70092-a81f-4c52-8197-81f2eca4d509 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.3629089444875717, -0.205642968416214, -0.1117832362651825, -0.08794718980789185
LBFGS Accumulation History: 3 points
Removed measurement 78a059e9 to history. Total: 3
th(0)=-0.3629089444875717;dx=-3.079025663366122E-7
New Minimum: -0.3629089444875717 > -0.5865728557109833
END: th(1737336.1340417115)=-0.5865728557109833; dx=-2.1078664440208633E-7 evalInputDelta=0.22366391122341156
Fitness changed from -0.3629089444875717 to -0.5865728557109833
Iteration 4 complete. Error: -0.5865728557109833 Total: 13.9979; Orientation: 1.0250; Line Search: 8.8632
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/30f94bd1-cc0c-4ea8-82ee-c48fc4e29a2c.jpg)
Adding measurement ffe1ed5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.920e+03, gradient 4.436e-04, dot -0.832; [32c70092-a81f-4c52-8197-81f2eca4d509 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.5865728557109833, -0.205642968416214, -0.1117832362651825, -0.08794718980789185
LBFGS Accumulation History: 3 points
Removed measurement ffe1ed5 to history. Total: 3
th(0)=-0.5865728557109833;dx=-1.968095996393522E-7
New Minimum: -0.5865728557109833 > -0.8639059811830521
END: th(3742977.235425346)=-0.8639059811830521; dx=-1.0936862237030008E-7 evalInputDelta=0.2773331254720688
Fitness changed from -0.5865728557109833 to -0.8639059811830521
Iteration 5 complete. Error: -0.8639059811830521 Total: 13.7642; Orientation: 1.0157; Line Search: 8.7298
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/28a531d2-c76a-41df-b622-101e5f4fa026.jpg)
Adding measurement 456750e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.843e+03, gradient 3.585e-04, dot -0.698; [32c70092-a81f-4c52-8197-81f2eca4d509 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.8639059811830521, -0.205642968416214, -0.1117832362651825, -0.08794718980789185
LBFGS Accumulation History: 3 points
Removed measurement 456750e2 to history. Total: 3
th(0)=-0.8639059811830521;dx=-1.2853094420132762E-7
New Minimum: -0.8639059811830521 > -1.1466384679079056
END: th(8064000.000000003)=-1.1466384679079056; dx=-3.7693489488636544E-8 evalInputDelta=0.2827324867248535
Fitness changed from -0.8639059811830521 to -1.1466384679079056
Iteration 6 complete. Error: -1.1466384679079056 Total: 13.8261; Orientation: 1.0162; Line Search: 8.6483
Adding measurement 77936bbf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.751e+03, gradient 3.302e-04, dot -0.446; [32c70092-a81f-4c52-8197-81f2eca4d509 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1466384679079056, -0.205642968416214, -0.1117832362651825, -0.08794718980789185
LBFGS Accumulation History: 3 points
Removed measurement 77936bbf to history. Total: 3
th(0)=-1.1466384679079056;dx=-1.090530052285327E-7
New Minimum: -1.1466384679079056 > -1.2862688452005386
WOLF (strong): th(1.7373361340417117E7)=-1.2862688452005386; dx=1.4711003053803407E-8 evalInputDelta=0.13963037729263306
New Minimum: -1.2862688452005386 > -1.3274185210466385
END: th(8686680.670208558)=-1.3274185210466385; dx=-5.203864439543935E-10 evalInputDelta=0.1807800531387329
Fitness changed from -1.1466384679079056 to -1.3274185210466385
Iteration 7 complete. Error: -1.3274185210466385 Total: 17.6342; Orientation: 1.1118; Line Search: 12.1614
Adding measurement 71dae973 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.873e+03, gradient 3.173e-04, dot -0.361; [32c70092-a81f-4c52-8197-81f2eca4d509 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3274185210466385, -0.205642968416214, -0.1117832362651825, -0.08794718980789185
LBFGS Accumulation History: 3 points
Removed measurement 71dae973 to history. Total: 3
th(0)=-1.3274185210466385;dx=-1.0065587565614618E-7
New Minimum: -1.3274185210466385 > -1.3318715244531631
WOLF (strong): th(1.871488617712673E7)=-1.3318715244531631; dx=3.316617987644119E-8 evalInputDelta=0.004453003406524658
New Minimum: -1.3318715244531631 > -1.4729328900575638
WOLF (strong): th(9357443.088563366)=-1.4729328900575638; dx=1.721889073612659E-8 evalInputDelta=0.1455143690109253
END: th(3119147.6961877886)=-1.4385432302951813; dx=-4.462143195942967E-8 evalInputDelta=0.11112470924854279
Fitness changed from -1.3274185210466385 to -1.4729328900575638
Iteration 8 complete. Error: -1.4729328900575638 Total: 22.8949; Orientation: 1.0631; Line Search: 17.7670
Adding measurement 97d2783 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.795e+03, gradient 2.935e-04, dot -0.309; [32c70092-a81f-4c52-8197-81f2eca4d509 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4729328900575638, -0.205642968416214, -0.1117832362651825, -0.08794718980789185
LBFGS Accumulation History: 3 points
Removed measurement 97d2783 to history. Total: 3
th(0)=-1.4729328900575638;dx=-8.616468915562307E-8
New Minimum: -1.4729328900575638 > -1.6061461120843887
END: th(6720000.000000003)=-1.6061461120843887; dx=-7.560955242285013E-9 evalInputDelta=0.13321322202682495
Fitness changed from -1.4729328900575638 to -1.6061461120843887
Iteration 9 complete. Error: -1.6061461120843887 Total: 13.5917; Orientation: 1.0135; Line Search: 8.6341
Adding measurement 320c6b47 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.131e+03, gradient 1.906e-04, dot -0.479; [32c70092-a81f-4c52-8197-81f2eca4d509 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6061461120843887, -0.205642968416214, -0.1117832362651825, -0.08794718980789185
LBFGS Accumulation History: 3 points
Removed measurement 320c6b47 to history. Total: 3
th(0)=-1.6061461120843887;dx=-3.632397631979232E-8
New Minimum: -1.6061461120843887 > -1.706416368484497
WOLF (strong): th(1.4477801117014265E7)=-1.706416368484497; dx=4.650244533564531E-9 evalInputDelta=0.10027025640010834
END: th(7238900.558507132)=-1.6931610405445099; dx=-1.2952522301438949E-8 evalInputDelta=0.08701492846012115
Fitness changed from -1.6061461120843887 to -1.706416368484497
Iteration 10 complete. Error: -1.706416368484497 Total: 18.6190; Orientation: 1.0188; Line Search: 13.3925
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/827c41f3-ba45-4a1d-b340-96173a9f1f52.jpg)
Final threshold in iteration 11: -1.706416368484497 (> -Infinity) after 197.248s (< 5400.000s)
Returns
-1.706416368484497