BasicOptimizer.scala:89 executed in 94.42 seconds (1.296 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: 282576205580600
Reset training subject: 282578200199400
Adding measurement bfb4982 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-55.45961364870619;dx=-5.444095677829543E-6
New Minimum: -55.45961364870619 > -55.4596220971947
END: th(2.154434690031884)=-55.4596220971947; dx=-3.452703792039786E-6 evalInputDelta=8.448488515000463E-6
Fitness changed from -55.45961364870619 to -55.4596220971947
Iteration 1 complete. Error: -55.4596220971947 Total: 9.4972; Orientation: 0.0613; Line Search: 3.9931
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9f37e556-bce9-4206-b5ba-a0c946881da3.jpg)
Adding measurement 29f5667f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-55.4596220971947;dx=-3.4527603610339367E-6
New Minimum: -55.4596220971947 > -55.459637304470775
WOLFE (weak): th(4.641588833612779)=-55.459637304470775; dx=-3.4527367193009164E-6 evalInputDelta=1.5207276071294018E-5
New Minimum: -55.459637304470775 > -55.45965420143929
WOLFE (weak): th(9.283177667225559)=-55.45965420143929; dx=-3.452734651540322E-6 evalInputDelta=3.210424458899297E-5
New Minimum: -55.45965420143929 > -55.459718409872735
WOLFE (weak): th(27.849533001676676)=-55.459718409872735; dx=-3.4527105238812287E-6 evalInputDelta=9.631267803200672E-5
New Minimum: -55.459718409872735 > -55.46000565721743
WOLFE (weak): th(111.3981320067067)=-55.46000565721743; dx=-3.452725540909101E-6 evalInputDelta=3.835600227262148E-4
New Minimum: -55.46000565721743 > -55.46154325006036
WOLFE (weak): th(556.9906600335335)=-55.46154325006036; dx=-3.4524741487409465E-6 evalInputDelta=0.0019211528656555288
New Minimum: -55.46154325006036 > -55.47115646308044
WOLFE (weak): th(3341.9439602012008)=-55.47115646308044; dx=-3.4518478435351416E-6 evalInputDelta=0.011534365885736975
New Minimum: -55.47115646308044 > -55.540305605920686
WOLFE (weak): th(23393.607721408407)=-55.540305605920686; dx=-3.445476649762251E-6 evalInputDelta=0.08068350872598273
New Minimum: -55.540305605920686 > -56.10003891345376
WOLFE (weak): th(187148.86177126726)=-56.10003891345376; dx=-3.388902857851664E-6 evalInputDelta=0.6404168162590551
New Minimum: -56.10003891345376 > -60.76767505778043
END: th(1684339.7559414054)=-60.76767505778043; dx=-2.824723222736529E-6 evalInputDelta=5.3080529605857265
Fitness changed from -55.4596220971947 to -60.76767505778043
Iteration 2 complete. Error: -60.76767505778043 Total: 21.8000; Orientation: 0.0926; Line Search: 19.2355
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d7797159-be23-4814-af8e-b64f08b64f2e.jpg)
Adding measurement 4ea88b93 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-60.76767505778043;dx=-2.561316744059688E-6
New Minimum: -60.76767505778043 > -68.39696417436618
END: th(3628800.0000000005)=-68.39696417436618; dx=-1.6264719447664616E-6 evalInputDelta=7.6292891165857455
Fitness changed from -60.76767505778043 to -68.39696417436618
Iteration 3 complete. Error: -68.39696417436618 Total: 6.0605; Orientation: 0.0605; Line Search: 3.6436
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c55736d8-8476-4cfc-9c1b-0c436766b1f9.jpg)
Adding measurement 432f2b3e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.115e+04, gradient 1.235e-03, dot -0.787; [eb1a52cd-482e-48d4-aa5d-d773b0113f96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.39696417436618, -60.76767505778043, -55.4596220971947, -55.45961364870619
LBFGS Accumulation History: 3 points
Removed measurement 432f2b3e to history. Total: 3
th(0)=-68.39696417436618;dx=-1.5241315786848439E-6
New Minimum: -68.39696417436618 > -77.00566788072655
END: th(7818012.603187701)=-77.00566788072655; dx=-7.052878868631383E-7 evalInputDelta=8.608703706360373
Fitness changed from -68.39696417436618 to -77.00566788072655
Iteration 4 complete. Error: -77.00566788072655 Total: 6.8760; Orientation: 1.0385; Line Search: 3.6310
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0dd6f1f3-8635-4655-bcad-2ed9e6c62945.jpg)
Adding measurement 2cd1e877 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.868e+03, gradient 1.020e-03, dot -0.532; [eb1a52cd-482e-48d4-aa5d-d773b0113f96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.00566788072655, -60.76767505778043, -55.4596220971947, -55.45961364870619
LBFGS Accumulation History: 3 points
Removed measurement 2cd1e877 to history. Total: 3
th(0)=-77.00566788072655;dx=-1.0412913890625315E-6
New Minimum: -77.00566788072655 > -84.59600116240556
END: th(1.6843397559414055E7)=-84.59600116240556; dx=-1.090202457634274E-7 evalInputDelta=7.590333281679008
Fitness changed from -77.00566788072655 to -84.59600116240556
Iteration 5 complete. Error: -84.59600116240556 Total: 6.9665; Orientation: 1.0742; Line Search: 3.7806
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/18ef0521-2292-47f4-9990-bf74817baf74.jpg)
Adding measurement 3efdc31a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.993e+03, gradient 1.210e-03, dot -0.254; [eb1a52cd-482e-48d4-aa5d-d773b0113f96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.59600116240556, -60.76767505778043, -55.4596220971947, -55.45961364870619
LBFGS Accumulation History: 3 points
Removed measurement 3efdc31a to history. Total: 3
th(0)=-84.59600116240556;dx=-1.4649100638649963E-6
Armijo: th(3.628800000000001E7)=-80.64801428664065; dx=3.4640083376994886E-7 evalInputDelta=-3.9479868757649115
New Minimum: -84.59600116240556 > -88.0642704540644
WOLF (strong): th(1.8144000000000004E7)=-88.0642704540644; dx=4.387475619435447E-7 evalInputDelta=3.4682692916588422
New Minimum: -88.0642704540644 > -90.38396146198195
END: th(6048000.000000001)=-90.38396146198195; dx=-4.0273201130066376E-7 evalInputDelta=5.7879602995763975
Fitness changed from -84.59600116240556 to -90.38396146198195
Iteration 6 complete. Error: -90.38396146198195 Total: 10.9220; Orientation: 1.0260; Line Search: 7.8331
Adding measurement 3e684f35 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.593e+04, gradient 8.173e-04, dot -0.528; [eb1a52cd-482e-48d4-aa5d-d773b0113f96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.38396146198195, -60.76767505778043, -55.4596220971947, -55.45961364870619
LBFGS Accumulation History: 3 points
Removed measurement 3e684f35 to history. Total: 3
th(0)=-90.38396146198195;dx=-6.680049916459772E-7
New Minimum: -90.38396146198195 > -95.00132109212774
END: th(1.3030021005312836E7)=-95.00132109212774; dx=-1.2245439824799564E-7 evalInputDelta=4.617359630145785
Fitness changed from -90.38396146198195 to -95.00132109212774
Iteration 7 complete. Error: -95.00132109212774 Total: 6.4255; Orientation: 0.9728; Line Search: 3.6429
Adding measurement 46d7064d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.805e+04, gradient 9.556e-04, dot -0.394; [eb1a52cd-482e-48d4-aa5d-d773b0113f96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.00132109212774, -60.76767505778043, -55.4596220971947, -55.45961364870619
LBFGS Accumulation History: 3 points
Removed measurement 46d7064d to history. Total: 3
th(0)=-95.00132109212774;dx=-9.13150286287847E-7
Armijo: th(2.8072329265690096E7)=-94.14405313839052; dx=2.579704530768193E-7 evalInputDelta=-0.857267953737221
New Minimum: -95.00132109212774 > -97.90254365318192
WOLF (strong): th(1.4036164632845048E7)=-97.90254365318192; dx=2.2954693634546312E-7 evalInputDelta=2.9012225610541833
New Minimum: -97.90254365318192 > -98.07693516429109
END: th(4678721.544281683)=-98.07693516429109; dx=-3.7393316015390836E-7 evalInputDelta=3.075614072163347
Fitness changed from -95.00132109212774 to -98.07693516429109
Iteration 8 complete. Error: -98.07693516429109 Total: 10.1942; Orientation: 0.9912; Line Search: 7.5113
Adding measurement 49a488e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.260e+04, gradient 6.640e-04, dot -0.629; [eb1a52cd-482e-48d4-aa5d-d773b0113f96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.07693516429109, -60.76767505778043, -55.4596220971947, -55.45961364870619
LBFGS Accumulation History: 3 points
Removed measurement 49a488e4 to history. Total: 3
th(0)=-98.07693516429109;dx=-4.409523547010212E-7
New Minimum: -98.07693516429109 > -101.38932566755746
END: th(1.0080000000000004E7)=-101.38932566755746; dx=-2.3774309319661065E-7 evalInputDelta=3.3123905032663714
Fitness changed from -98.07693516429109 to -101.38932566755746
Iteration 9 complete. Error: -101.38932566755746 Total: 6.4500; Orientation: 0.9698; Line Search: 3.6959
Adding measurement e1e9e94 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.467e+04, gradient 7.059e-04, dot -0.553; [eb1a52cd-482e-48d4-aa5d-d773b0113f96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -101.38932566755746, -60.76767505778043, -55.4596220971947, -55.45961364870619
LBFGS Accumulation History: 3 points
Removed measurement e1e9e94 to history. Total: 3
th(0)=-101.38932566755746;dx=-4.983118405713219E-7
New Minimum: -101.38932566755746 > -104.38285110083963
WOLF (strong): th(2.1716701675521396E7)=-104.38285110083963; dx=2.096907903257059E-8 evalInputDelta=2.993525433282173
END: th(1.0858350837760698E7)=-104.13781455328191; dx=-8.622192950676467E-8 evalInputDelta=2.7484888857244556
Fitness changed from -101.38932566755746 to -104.38285110083963
Iteration 10 complete. Error: -104.38285110083963 Total: 8.8608; Orientation: 0.9807; Line Search: 5.8586
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/43192688-c3bd-43b0-91fc-d0fad5da9082.jpg)
Final threshold in iteration 11: -104.38285110083963 (> -Infinity) after 94.425s (< 5400.000s)
Returns
-104.38285110083963