BasicOptimizer.scala:89 executed in 111.14 seconds (1.456 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: 43789594208800
Reset training subject: 43791935565600
Adding measurement 7b9cf913 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-48.24056849798502;dx=-1.6998138251783456E-6
New Minimum: -48.24056849798502 > -48.240572123644206
END: th(2.154434690031884)=-48.240572123644206; dx=-1.3128113634874774E-6 evalInputDelta=3.625659189765429E-6
Fitness changed from -48.24056849798502 to -48.240572123644206
Iteration 1 complete. Error: -48.240572123644206 Total: 11.5541; Orientation: 0.0612; Line Search: 4.7657
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/231a6a3a-04a2-48b3-889f-ecd033b6d717.jpg)
Adding measurement 79c77e15 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-48.240572123644206;dx=-1.296777229047083E-6
New Minimum: -48.240572123644206 > -48.240577562132486
WOLFE (weak): th(4.641588833612779)=-48.240577562132486; dx=-1.29472510495107E-6 evalInputDelta=5.438488280162801E-6
New Minimum: -48.240577562132486 > -48.240586626278265
WOLFE (weak): th(9.283177667225559)=-48.240586626278265; dx=-1.2937529965213108E-6 evalInputDelta=1.450263405899932E-5
New Minimum: -48.240586626278265 > -48.240610193049314
WOLFE (weak): th(27.849533001676676)=-48.240610193049314; dx=-1.2905717071735034E-6 evalInputDelta=3.806940510742152E-5
New Minimum: -48.240610193049314 > -48.24072802673184
WOLFE (weak): th(111.3981320067067)=-48.24072802673184; dx=-1.2914250742866257E-6 evalInputDelta=1.559030876308043E-4
New Minimum: -48.24072802673184 > -48.241355259644315
WOLFE (weak): th(556.9906600335335)=-48.241355259644315; dx=-1.2897043451434252E-6 evalInputDelta=7.831360001091525E-4
New Minimum: -48.241355259644315 > -48.24525806038985
WOLFE (weak): th(3341.9439602012008)=-48.24525806038985; dx=-1.2908319303225425E-6 evalInputDelta=0.004685936745644881
New Minimum: -48.24525806038985 > -48.27335688224617
WOLFE (weak): th(23393.607721408407)=-48.27335688224617; dx=-1.2874277668819486E-6 evalInputDelta=0.03278475860196295
New Minimum: -48.27335688224617 > -48.501270466582326
WOLFE (weak): th(187148.86177126726)=-48.501270466582326; dx=-1.2721461384821866E-6 evalInputDelta=0.2606983429381202
New Minimum: -48.501270466582326 > -50.44833217612472
END: th(1684339.7559414054)=-50.44833217612472; dx=-1.1262290818868239E-6 evalInputDelta=2.2077600524805163
Fitness changed from -48.240572123644206 to -50.44833217612472
Iteration 2 complete. Error: -50.44833217612472 Total: 25.7606; Orientation: 0.0633; Line Search: 23.1058
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/321792ff-57c7-40f8-b506-aec53640f910.jpg)
Adding measurement 26010050 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-50.44833217612472;dx=-1.131246601118316E-6
New Minimum: -50.44833217612472 > -54.177282454251596
END: th(3628800.0000000005)=-54.177282454251596; dx=-8.325024759420514E-7 evalInputDelta=3.7289502781268737
Fitness changed from -50.44833217612472 to -54.177282454251596
Iteration 3 complete. Error: -54.177282454251596 Total: 7.3459; Orientation: 0.0616; Line Search: 4.7224
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/423b31cc-b0c6-4927-baa5-c599dbb6e494.jpg)
Adding measurement 7ec99bb3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.513e+04, gradient 8.919e-04, dot -0.879; [94a833fa-574a-4742-8a0b-1d435665d6f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.177282454251596, -50.44833217612472, -48.240572123644206, -48.24056849798502
LBFGS Accumulation History: 3 points
Removed measurement 7ec99bb3 to history. Total: 3
th(0)=-54.177282454251596;dx=-7.940995311055473E-7
New Minimum: -54.177282454251596 > -59.688273419655296
END: th(7818012.603187701)=-59.688273419655296; dx=-5.335350345691776E-7 evalInputDelta=5.5109909654037
Fitness changed from -54.177282454251596 to -59.688273419655296
Iteration 4 complete. Error: -59.688273419655296 Total: 8.2378; Orientation: 1.0588; Line Search: 4.4801
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/59123d50-5910-4497-9ed8-bea68ac37d51.jpg)
Adding measurement 21377f81 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.379e+04, gradient 7.523e-04, dot -0.754; [94a833fa-574a-4742-8a0b-1d435665d6f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.688273419655296, -50.44833217612472, -48.240572123644206, -48.24056849798502
LBFGS Accumulation History: 3 points
Removed measurement 21377f81 to history. Total: 3
th(0)=-59.688273419655296;dx=-5.647794312441489E-7
New Minimum: -59.688273419655296 > -67.3090661750933
END: th(1.6843397559414055E7)=-67.3090661750933; dx=-3.177386880614403E-7 evalInputDelta=7.620792755438011
Fitness changed from -59.688273419655296 to -67.3090661750933
Iteration 5 complete. Error: -67.3090661750933 Total: 8.4996; Orientation: 1.0625; Line Search: 4.6047
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/963c5583-50c5-489a-9ad4-9f108527e99b.jpg)
Adding measurement 36857bcc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.905e+04, gradient 6.889e-04, dot -0.610; [94a833fa-574a-4742-8a0b-1d435665d6f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.3090661750933, -50.44833217612472, -48.240572123644206, -48.24056849798502
LBFGS Accumulation History: 3 points
Removed measurement 36857bcc to history. Total: 3
th(0)=-67.3090661750933;dx=-4.7343305320496856E-7
New Minimum: -67.3090661750933 > -75.37984828688744
END: th(3.628800000000001E7)=-75.37984828688744; dx=-7.9206087633947E-8 evalInputDelta=8.07078211179413
Fitness changed from -67.3090661750933 to -75.37984828688744
Iteration 6 complete. Error: -75.37984828688744 Total: 8.0917; Orientation: 1.0111; Line Search: 4.4701
Adding measurement 7219383e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.868e+04, gradient 8.584e-04, dot -0.276; [94a833fa-574a-4742-8a0b-1d435665d6f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.37984828688744, -50.44833217612472, -48.240572123644206, -48.24056849798502
LBFGS Accumulation History: 3 points
Removed measurement 7219383e to history. Total: 3
th(0)=-75.37984828688744;dx=-7.35734087987664E-7
Armijo: th(7.818012603187701E7)=-69.29863530255795; dx=1.5059099211365353E-7 evalInputDelta=-6.081212984329483
New Minimum: -75.37984828688744 > -77.9456906937945
WOLF (strong): th(3.9090063015938506E7)=-77.9456906937945; dx=1.983735438333707E-7 evalInputDelta=2.565842406907066
New Minimum: -77.9456906937945 > -81.41745944256897
END: th(1.3030021005312836E7)=-81.41745944256897; dx=-1.5209232215931307E-7 evalInputDelta=6.037611155681532
Fitness changed from -75.37984828688744 to -81.41745944256897
Iteration 7 complete. Error: -81.41745944256897 Total: 12.7949; Orientation: 0.9903; Line Search: 9.4234
Adding measurement 2052e1da to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.293e+04, gradient 5.970e-04, dot -0.523; [94a833fa-574a-4742-8a0b-1d435665d6f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.41745944256897, -50.44833217612472, -48.240572123644206, -48.24056849798502
LBFGS Accumulation History: 3 points
Removed measurement 2052e1da to history. Total: 3
th(0)=-81.41745944256897;dx=-3.556353872600794E-7
New Minimum: -81.41745944256897 > -86.23735244616007
END: th(2.8072329265690096E7)=-86.23735244616007; dx=-3.9126571836378427E-8 evalInputDelta=4.819893003591105
Fitness changed from -81.41745944256897 to -86.23735244616007
Iteration 8 complete. Error: -86.23735244616007 Total: 7.7846; Orientation: 1.0382; Line Search: 4.6684
Adding measurement 13ee51be to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.570e+04, gradient 7.362e-04, dot -0.363; [94a833fa-574a-4742-8a0b-1d435665d6f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.23735244616007, -50.44833217612472, -48.240572123644206, -48.24056849798502
LBFGS Accumulation History: 3 points
Removed measurement 13ee51be to history. Total: 3
th(0)=-86.23735244616007;dx=-5.411609769717737E-7
Armijo: th(6.048000000000002E7)=-82.23439074128318; dx=1.5273843808914845E-7 evalInputDelta=-4.0029617048768955
New Minimum: -86.23735244616007 > -88.55678756231838
WOLF (strong): th(3.024000000000001E7)=-88.55678756231838; dx=1.6173326270355343E-7 evalInputDelta=2.319435116158303
New Minimum: -88.55678756231838 > -90.0577596306384
END: th(1.0080000000000004E7)=-90.0577596306384; dx=-1.7668872746498153E-7 evalInputDelta=3.820407184478327
Fitness changed from -86.23735244616007 to -90.0577596306384
Iteration 9 complete. Error: -90.0577596306384 Total: 12.7573; Orientation: 1.0282; Line Search: 9.4197
Adding measurement 68180733 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.631e+04, gradient 4.886e-04, dot -0.607; [94a833fa-574a-4742-8a0b-1d435665d6f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.0577596306384, -50.44833217612472, -48.240572123644206, -48.24056849798502
LBFGS Accumulation History: 3 points
Removed measurement 68180733 to history. Total: 3
th(0)=-90.0577596306384;dx=-2.3779138412911972E-7
New Minimum: -90.0577596306384 > -93.74082568949447
END: th(2.1716701675521396E7)=-93.74082568949447; dx=-1.1639927925358306E-7 evalInputDelta=3.6830660588560704
Fitness changed from -90.0577596306384 to -93.74082568949447
Iteration 10 complete. Error: -93.74082568949447 Total: 7.8743; Orientation: 1.0755; Line Search: 4.6967
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/4d114ef9-46f2-4ebe-b04c-311b4063d66f.jpg)
Final threshold in iteration 11: -93.74082568949447 (> -Infinity) after 111.142s (< 5400.000s)
Returns
-93.74082568949447