BasicOptimizer.scala:89 executed in 136.16 seconds (1.749 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: 327414445436800
Reset training subject: 327417242661300
Adding measurement 4bdc5668 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-125.08609408067132;dx=-2.6727373660571E-5
New Minimum: -125.08609408067132 > -125.08614419974
END: th(2.154434690031884)=-125.08614419974; dx=-2.0894592179828916E-5 evalInputDelta=5.011906868901406E-5
Fitness changed from -125.08609408067132 to -125.08614419974
Iteration 1 complete. Error: -125.08614419974 Total: 13.2204; Orientation: 0.0633; Line Search: 5.2437
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3429fca5-9a93-4a62-972d-b7cd4369f9cb.jpg)
Adding measurement 65b1ac37 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-125.08614419974;dx=-2.078142485044404E-5
New Minimum: -125.08614419974 > -125.08625214843514
WOLFE (weak): th(4.641588833612779)=-125.08625214843514; dx=-2.0776590286449304E-5 evalInputDelta=1.079486951311992E-4
New Minimum: -125.08625214843514 > -125.0863562417315
WOLFE (weak): th(9.283177667225559)=-125.0863562417315; dx=-2.0774218637436038E-5 evalInputDelta=2.1204199148883163E-4
New Minimum: -125.0863562417315 > -125.08679189051341
WOLFE (weak): th(27.849533001676676)=-125.08679189051341; dx=-2.076865679860873E-5 evalInputDelta=6.476907734054294E-4
New Minimum: -125.08679189051341 > -125.08873879794403
WOLFE (weak): th(111.3981320067067)=-125.08873879794403; dx=-2.076166742711642E-5 evalInputDelta=0.0025945982040269655
New Minimum: -125.08873879794403 > -125.09914749192717
WOLFE (weak): th(556.9906600335335)=-125.09914749192717; dx=-2.0760223064276822E-5 evalInputDelta=0.013003292187164561
New Minimum: -125.09914749192717 > -125.16413983629117
WOLFE (weak): th(3341.9439602012008)=-125.16413983629117; dx=-2.074395064097331E-5 evalInputDelta=0.07799563655116515
New Minimum: -125.16413983629117 > -125.6304634272119
WOLFE (weak): th(23393.607721408407)=-125.6304634272119; dx=-2.0609938614904135E-5 evalInputDelta=0.5443192274718882
New Minimum: -125.6304634272119 > -129.3040646245033
WOLFE (weak): th(187148.86177126726)=-129.3040646245033; dx=-1.9254331618884353E-5 evalInputDelta=4.217920424763292
New Minimum: -129.3040646245033 > -150.1251578281184
END: th(1684339.7559414054)=-150.1251578281184; dx=-6.460381077091726E-6 evalInputDelta=25.0390136283784
Fitness changed from -125.08614419974 to -150.1251578281184
Iteration 2 complete. Error: -150.1251578281184 Total: 29.2946; Orientation: 0.0640; Line Search: 26.1465
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6d7c5867-695e-4cf4-a7fc-0958520edb57.jpg)
Adding measurement 3cc0f270 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-150.1251578281184;dx=-9.492710142400144E-6
New Minimum: -150.1251578281184 > -168.93477447525007
END: th(3628800.0000000005)=-168.93477447525007; dx=-1.3143783623069331E-6 evalInputDelta=18.809616647131662
Fitness changed from -150.1251578281184 to -168.93477447525007
Iteration 3 complete. Error: -168.93477447525007 Total: 8.2936; Orientation: 0.0557; Line Search: 5.1856
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5990564d-f6a2-476f-8ad4-2597c2655e79.jpg)
Adding measurement 7f69dc5b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.868e+03, gradient 3.007e-03, dot -0.310; [28e7d065-8f79-421f-afb6-16508c779626 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -168.93477447525007, -150.1251578281184, -125.08614419974, -125.08609408067132
LBFGS Accumulation History: 3 points
Removed measurement 7f69dc5b to history. Total: 3
th(0)=-168.93477447525007;dx=-9.030890828956349E-6
Armijo: th(7818012.603187701)=-166.72961987992747; dx=3.322664895487368E-6 evalInputDelta=-2.205154595322597
New Minimum: -168.93477447525007 > -179.34401624870438
WOLF (strong): th(3909006.3015938504)=-179.34401624870438; dx=1.4850671591112395E-6 evalInputDelta=10.409241773454312
END: th(1303002.1005312835)=-177.98111960819693; dx=-3.7301559764906128E-6 evalInputDelta=9.046345132946868
Fitness changed from -168.93477447525007 to -179.34401624870438
Iteration 4 complete. Error: -179.34401624870438 Total: 14.7502; Orientation: 1.1923; Line Search: 10.5519
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b791e6f0-ce37-457d-9c8a-01dbc2e38f67.jpg)
Adding measurement 492b94f6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.313e+03, gradient 3.259e-03, dot -0.228; [28e7d065-8f79-421f-afb6-16508c779626 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -179.34401624870438, -150.1251578281184, -125.08614419974, -125.08609408067132
LBFGS Accumulation History: 3 points
Removed measurement 492b94f6 to history. Total: 3
th(0)=-179.34401624870438;dx=-1.0608615945518979E-5
New Minimum: -179.34401624870438 > -192.87168579732145
WOLF (strong): th(2807232.926569009)=-192.87168579732145; dx=1.1776677626730667E-6 evalInputDelta=13.52766954861707
END: th(1403616.4632845046)=-191.02846364015866; dx=-4.2055112768702896E-6 evalInputDelta=11.684447391454285
Fitness changed from -179.34401624870438 to -192.87168579732145
Iteration 5 complete. Error: -192.87168579732145 Total: 12.0673; Orientation: 1.1679; Line Search: 7.7581
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/64c6e5fd-e062-404e-aad0-9a0954f844a2.jpg)
Adding measurement 3c9e1b29 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.190e+04, gradient 2.623e-03, dot -0.340; [28e7d065-8f79-421f-afb6-16508c779626 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -192.87168579732145, -150.1251578281184, -125.08614419974, -125.08609408067132
LBFGS Accumulation History: 3 points
Removed measurement 3c9e1b29 to history. Total: 3
th(0)=-192.87168579732145;dx=-6.874290450775058E-6
New Minimum: -192.87168579732145 > -201.40076132891645
WOLF (strong): th(3024000.0000000005)=-201.40076132891645; dx=9.727211880463653E-7 evalInputDelta=8.529075531594998
END: th(1512000.0000000002)=-200.6049369227166; dx=-2.450704279645941E-6 evalInputDelta=7.733251125395157
Fitness changed from -192.87168579732145 to -201.40076132891645
Iteration 6 complete. Error: -201.40076132891645 Total: 12.1735; Orientation: 1.0576; Line Search: 7.8323
Adding measurement 2136e9d5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.722e+04, gradient 2.556e-03, dot -0.379; [28e7d065-8f79-421f-afb6-16508c779626 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -201.40076132891645, -150.1251578281184, -125.08614419974, -125.08609408067132
LBFGS Accumulation History: 3 points
Removed measurement 2136e9d5 to history. Total: 3
th(0)=-201.40076132891645;dx=-6.523593160899521E-6
New Minimum: -201.40076132891645 > -207.9311167006553
WOLF (strong): th(3257505.251328209)=-207.9311167006553; dx=2.019321726908791E-6 evalInputDelta=6.530355371738864
New Minimum: -207.9311167006553 > -208.81608105473353
END: th(1628752.6256641045)=-208.81608105473353; dx=-1.7447576800867032E-6 evalInputDelta=7.415319725817085
Fitness changed from -201.40076132891645 to -208.81608105473353
Iteration 7 complete. Error: -208.81608105473353 Total: 11.2332; Orientation: 1.0760; Line Search: 7.6669
Adding measurement 25672e7d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.356e+04, gradient 1.690e-03, dot -0.649; [28e7d065-8f79-421f-afb6-16508c779626 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -208.81608105473353, -150.1251578281184, -125.08614419974, -125.08609408067132
LBFGS Accumulation History: 3 points
Removed measurement 25672e7d to history. Total: 3
th(0)=-208.81608105473353;dx=-2.850460350297804E-6
New Minimum: -208.81608105473353 > -216.00112132729376
END: th(3509041.158211262)=-216.00112132729376; dx=-1.1824934332747234E-6 evalInputDelta=7.185040272560229
Fitness changed from -208.81608105473353 to -216.00112132729376
Iteration 8 complete. Error: -216.00112132729376 Total: 8.6450; Orientation: 1.0281; Line Search: 5.0643
Adding measurement c452fc9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.437e+04, gradient 1.901e-03, dot -0.517; [28e7d065-8f79-421f-afb6-16508c779626 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -216.00112132729376, -150.1251578281184, -125.08614419974, -125.08609408067132
LBFGS Accumulation History: 3 points
Removed measurement c452fc9 to history. Total: 3
th(0)=-216.00112132729376;dx=-3.604423466290899E-6
Armijo: th(7560000.000000003)=-215.0699916511834; dx=1.5816297095478814E-6 evalInputDelta=-0.9311296761103733
New Minimum: -216.00112132729376 > -220.49308552342987
WOLF (strong): th(3780000.0000000014)=-220.49308552342987; dx=4.310023254573783E-7 evalInputDelta=4.491964196136109
END: th(1260000.0000000005)=-219.56720335325252; dx=-1.7276477019068944E-6 evalInputDelta=3.566082025958764
Fitness changed from -216.00112132729376 to -220.49308552342987
Iteration 9 complete. Error: -220.49308552342987 Total: 14.1471; Orientation: 1.0497; Line Search: 10.5422
Adding measurement 6023a59f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.193e+04, gradient 2.372e-03, dot -0.345; [28e7d065-8f79-421f-afb6-16508c779626 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -220.49308552342987, -150.1251578281184, -125.08614419974, -125.08609408067132
LBFGS Accumulation History: 3 points
Removed measurement 6023a59f to history. Total: 3
th(0)=-220.49308552342987;dx=-5.619430709849943E-6
New Minimum: -220.49308552342987 > -226.69172048084351
WOLF (strong): th(2714587.7094401745)=-226.69172048084351; dx=1.1238244019016637E-6 evalInputDelta=6.1986349574136455
END: th(1357293.8547200873)=-226.31796535936218; dx=-2.103397184222606E-6 evalInputDelta=5.8248798359323075
Fitness changed from -220.49308552342987 to -226.69172048084351
Iteration 10 complete. Error: -226.69172048084351 Total: 11.4970; Orientation: 1.1150; Line Search: 7.8542
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/755490bb-a38b-4699-8a08-50b5a8cf48ce.jpg)
Final threshold in iteration 11: -226.69172048084351 (> -Infinity) after 136.164s (< 5400.000s)
Returns
-226.69172048084351