BasicOptimizer.scala:89 executed in 135.12 seconds (1.856 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: 330153158520700
Reset training subject: 330155837072000
Adding measurement 10966a3f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-132.0418264673022;dx=-2.9263706547782928E-5
New Minimum: -132.0418264673022 > -132.0418775984082
END: th(2.154434690031884)=-132.0418775984082; dx=-2.208280796081004E-5 evalInputDelta=5.1131106005186666E-5
Fitness changed from -132.0418264673022 to -132.0418775984082
Iteration 1 complete. Error: -132.0418775984082 Total: 13.1007; Orientation: 0.0595; Line Search: 5.2895
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5036e1b4-27b4-44d9-9944-5cc81a32ff72.jpg)
Adding measurement 7bfe53d to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-132.0418775984082;dx=-2.195298362873766E-5
New Minimum: -132.0418775984082 > -132.04199446943335
WOLFE (weak): th(4.641588833612779)=-132.04199446943335; dx=-2.1945912913248544E-5 evalInputDelta=1.1687102514201797E-4
New Minimum: -132.04199446943335 > -132.04211134035504
WOLFE (weak): th(9.283177667225559)=-132.04211134035504; dx=-2.194361687790952E-5 evalInputDelta=2.3374194682901361E-4
New Minimum: -132.04211134035504 > -132.04257151860367
WOLFE (weak): th(27.849533001676676)=-132.04257151860367; dx=-2.1931573121575315E-5 evalInputDelta=6.93920195459441E-4
New Minimum: -132.04257151860367 > -132.04463134444177
WOLFE (weak): th(111.3981320067067)=-132.04463134444177; dx=-2.1922063740673243E-5 evalInputDelta=0.0027537460335622654
New Minimum: -132.04463134444177 > -132.05563845065856
WOLFE (weak): th(556.9906600335335)=-132.05563845065856; dx=-2.19224038223691E-5 evalInputDelta=0.013760852250356947
New Minimum: -132.05563845065856 > -132.12440661411543
WOLFE (weak): th(3341.9439602012008)=-132.12440661411543; dx=-2.189076238004584E-5 evalInputDelta=0.08252901570722315
New Minimum: -132.12440661411543 > -132.6177385581151
WOLFE (weak): th(23393.607721408407)=-132.6177385581151; dx=-2.1759573408449682E-5 evalInputDelta=0.5758609597068869
New Minimum: -132.6177385581151 > -136.50157875421974
WOLFE (weak): th(187148.86177126726)=-136.50157875421974; dx=-2.0267262261693666E-5 evalInputDelta=4.45970115581153
New Minimum: -136.50157875421974 > -157.62134897129985
END: th(1684339.7559414054)=-157.62134897129985; dx=-6.134785906445997E-6 evalInputDelta=25.579471372891646
Fitness changed from -132.0418775984082 to -157.62134897129985
Iteration 2 complete. Error: -157.62134897129985 Total: 29.0652; Orientation: 0.0677; Line Search: 26.0624
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b59b8afd-6686-4b50-bbc9-4a4aa1042da8.jpg)
Adding measurement 6bf1848b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-157.62134897129985;dx=-9.6479458915978E-6
New Minimum: -157.62134897129985 > -175.807787023741
END: th(3628800.0000000005)=-175.807787023741; dx=-1.0873487014939738E-6 evalInputDelta=18.18643805244116
Fitness changed from -157.62134897129985 to -175.807787023741
Iteration 3 complete. Error: -175.807787023741 Total: 8.4270; Orientation: 0.0605; Line Search: 5.2351
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/6727a10f-974e-43e9-92fc-ddb33d011073.jpg)
Adding measurement 7f4a6940 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.519e+03, gradient 3.027e-03, dot -0.308; [25636d90-687c-4f20-8f43-22f7a3840966 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -175.807787023741, -157.62134897129985, -132.0418775984082, -132.0418264673022
LBFGS Accumulation History: 3 points
Removed measurement 7f4a6940 to history. Total: 3
th(0)=-175.807787023741;dx=-9.146582843041029E-6
Armijo: th(7818012.603187701)=-173.95783697384078; dx=3.154244698051125E-6 evalInputDelta=-1.8499500499002295
New Minimum: -175.807787023741 > -186.3322829510747
WOLF (strong): th(3909006.3015938504)=-186.3322829510747; dx=1.4587180253128567E-6 evalInputDelta=10.524495927333675
END: th(1303002.1005312835)=-184.90338150386899; dx=-3.73739533190655E-6 evalInputDelta=9.095594480127971
Fitness changed from -175.807787023741 to -186.3322829510747
Iteration 4 complete. Error: -186.3322829510747 Total: 14.4884; Orientation: 1.0446; Line Search: 10.2766
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/16424760-9a60-4476-b054-cdeee5f280b6.jpg)
Adding measurement 45a4a3ec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.265e+03, gradient 3.159e-03, dot -0.234; [25636d90-687c-4f20-8f43-22f7a3840966 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -186.3322829510747, -157.62134897129985, -132.0418775984082, -132.0418264673022
LBFGS Accumulation History: 3 points
Removed measurement 45a4a3ec to history. Total: 3
th(0)=-186.3322829510747;dx=-9.968834319014075E-6
New Minimum: -186.3322829510747 > -199.62760638271033
WOLF (strong): th(2807232.926569009)=-199.62760638271033; dx=6.967953630077359E-7 evalInputDelta=13.295323431635637
END: th(1403616.4632845046)=-197.39486267527724; dx=-4.139773176380366E-6 evalInputDelta=11.06257972420255
Fitness changed from -186.3322829510747 to -199.62760638271033
Iteration 5 complete. Error: -199.62760638271033 Total: 12.0045; Orientation: 1.0240; Line Search: 7.8257
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d43720f0-2e39-4a86-95d7-7e35008f6b74.jpg)
Adding measurement 13d021ea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.175e+04, gradient 2.502e-03, dot -0.356; [25636d90-687c-4f20-8f43-22f7a3840966 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -199.62760638271033, -157.62134897129985, -132.0418775984082, -132.0418264673022
LBFGS Accumulation History: 3 points
Removed measurement 13d021ea to history. Total: 3
th(0)=-199.62760638271033;dx=-6.2460881151888185E-6
New Minimum: -199.62760638271033 > -208.12266421562103
WOLF (strong): th(3024000.0000000005)=-208.12266421562103; dx=4.861348128829683E-7 evalInputDelta=8.495057832910703
END: th(1512000.0000000002)=-206.81817792617295; dx=-2.4839370762099234E-6 evalInputDelta=7.1905715434626245
Fitness changed from -199.62760638271033 to -208.12266421562103
Iteration 6 complete. Error: -208.12266421562103 Total: 12.0728; Orientation: 1.2388; Line Search: 7.9115
Adding measurement 28a70ff9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.701e+04, gradient 2.405e-03, dot -0.403; [25636d90-687c-4f20-8f43-22f7a3840966 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -208.12266421562103, -157.62134897129985, -132.0418775984082, -132.0418264673022
LBFGS Accumulation History: 3 points
Removed measurement 28a70ff9 to history. Total: 3
th(0)=-208.12266421562103;dx=-5.761902718854828E-6
New Minimum: -208.12266421562103 > -214.52751997590303
WOLF (strong): th(3257505.251328209)=-214.52751997590303; dx=1.3723986612615929E-6 evalInputDelta=6.404855760282004
New Minimum: -214.52751997590303 > -214.74272024275757
END: th(1628752.6256641045)=-214.74272024275757; dx=-1.714183866732209E-6 evalInputDelta=6.620056027136542
Fitness changed from -208.12266421562103 to -214.74272024275757
Iteration 7 complete. Error: -214.74272024275757 Total: 11.1364; Orientation: 1.0115; Line Search: 7.7199
Adding measurement 4ec5125b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.211e+04, gradient 1.649e-03, dot -0.646; [25636d90-687c-4f20-8f43-22f7a3840966 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -214.74272024275757, -157.62134897129985, -132.0418775984082, -132.0418264673022
LBFGS Accumulation History: 3 points
Removed measurement 4ec5125b to history. Total: 3
th(0)=-214.74272024275757;dx=-2.7167453432283745E-6
New Minimum: -214.74272024275757 > -221.52519794910003
END: th(3509041.158211262)=-221.52519794910003; dx=-1.1429651886900539E-6 evalInputDelta=6.782477706342462
Fitness changed from -214.74272024275757 to -221.52519794910003
Iteration 8 complete. Error: -221.52519794910003 Total: 8.8760; Orientation: 0.9655; Line Search: 5.1730
Adding measurement 6062bcb6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.254e+04, gradient 1.858e-03, dot -0.510; [25636d90-687c-4f20-8f43-22f7a3840966 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -221.52519794910003, -157.62134897129985, -132.0418775984082, -132.0418264673022
LBFGS Accumulation History: 3 points
Removed measurement 6062bcb6 to history. Total: 3
th(0)=-221.52519794910003;dx=-3.4515767021955626E-6
Armijo: th(7560000.000000003)=-221.30085124990913; dx=1.3415345112435649E-6 evalInputDelta=-0.2243466991909031
New Minimum: -221.52519794910003 > -225.92904367274488
WOLF (strong): th(3780000.0000000014)=-225.92904367274488; dx=3.1439420600282407E-7 evalInputDelta=4.403845723644849
END: th(1260000.0000000005)=-224.93942978909385; dx=-1.648477739062256E-6 evalInputDelta=3.4142318399938176
Fitness changed from -221.52519794910003 to -225.92904367274488
Iteration 9 complete. Error: -225.92904367274488 Total: 13.9713; Orientation: 0.9634; Line Search: 10.2377
Adding measurement 25d002c6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.070e+04, gradient 2.275e-03, dot -0.350; [25636d90-687c-4f20-8f43-22f7a3840966 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -225.92904367274488, -157.62134897129985, -132.0418775984082, -132.0418264673022
LBFGS Accumulation History: 3 points
Removed measurement 25d002c6 to history. Total: 3
th(0)=-225.92904367274488;dx=-5.169954714377952E-6
New Minimum: -225.92904367274488 > -231.82378180677551
WOLF (strong): th(2714587.7094401745)=-231.82378180677551; dx=8.594952332392732E-7 evalInputDelta=5.894738134030632
END: th(1357293.8547200873)=-231.30155582686493; dx=-1.997753786366255E-6 evalInputDelta=5.372512154120045
Fitness changed from -225.92904367274488 to -231.82378180677551
Iteration 10 complete. Error: -231.82378180677551 Total: 11.5012; Orientation: 1.1224; Line Search: 7.8141
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/2e1dd765-1664-464c-b7d6-b46c20717de9.jpg)
Final threshold in iteration 11: -231.82378180677551 (> -Infinity) after 135.120s (< 5400.000s)
Returns
-231.82378180677551