BasicOptimizer.scala:89 executed in 128.38 seconds (1.680 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: 34127857645700
Reset training subject: 34130491561800
Adding measurement 7814319d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-68.79761362221315;dx=-4.874905408344044E-6
New Minimum: -68.79761362221315 > -68.7976210829874
END: th(2.154434690031884)=-68.7976210829874; dx=-4.0116129951202605E-6 evalInputDelta=7.460774256173863E-6
Fitness changed from -68.79761362221315 to -68.7976210829874
Iteration 1 complete. Error: -68.7976210829874 Total: 13.0943; Orientation: 0.0613; Line Search: 5.2263
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/676eabae-856a-4453-9796-654aebc96939.jpg)
Adding measurement 61cfaba0 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-68.7976210829874;dx=-3.9793197547558435E-6
New Minimum: -68.7976210829874 > -68.79764595222908
WOLFE (weak): th(4.641588833612779)=-68.79764595222908; dx=-3.9785820707226545E-6 evalInputDelta=2.4869241670444353E-5
New Minimum: -68.79764595222908 > -68.79767082146176
WOLFE (weak): th(9.283177667225559)=-68.79767082146176; dx=-3.978684352501554E-6 evalInputDelta=4.9738474359628526E-5
New Minimum: -68.79767082146176 > -68.79775288986585
WOLFE (weak): th(27.849533001676676)=-68.79775288986585; dx=-3.979297140353637E-6 evalInputDelta=1.3180687844283057E-4
New Minimum: -68.79775288986585 > -68.7981358744571
WOLFE (weak): th(111.3981320067067)=-68.7981358744571; dx=-3.977980315855288E-6 evalInputDelta=5.147914696976841E-4
New Minimum: -68.7981358744571 > -68.80018008082604
WOLFE (weak): th(556.9906600335335)=-68.80018008082604; dx=-3.97608439442177E-6 evalInputDelta=0.002558997838633559
New Minimum: -68.80018008082604 > -68.81295375160862
WOLFE (weak): th(3341.9439602012008)=-68.81295375160862; dx=-3.975243361454206E-6 evalInputDelta=0.01533266862121252
New Minimum: -68.81295375160862 > -68.9047688608091
WOLFE (weak): th(23393.607721408407)=-68.9047688608091; dx=-3.96026766187305E-6 evalInputDelta=0.10714777782169449
New Minimum: -68.9047688608091 > -69.63129767684958
WOLFE (weak): th(187148.86177126726)=-69.63129767684958; dx=-3.7385185558082765E-6 evalInputDelta=0.8336765938621795
New Minimum: -69.63129767684958 > -74.85327103212029
END: th(1684339.7559414054)=-74.85327103212029; dx=-2.3518984598308664E-6 evalInputDelta=6.055649949132885
Fitness changed from -68.7976210829874 to -74.85327103212029
Iteration 2 complete. Error: -74.85327103212029 Total: 29.0713; Orientation: 0.0582; Line Search: 26.0259
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/eaeabddc-0fc8-4597-86bd-a98464e07559.jpg)
Adding measurement d9c259 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-74.85327103212029;dx=-2.185728832978836E-6
New Minimum: -74.85327103212029 > -81.72489467542587
END: th(3628800.0000000005)=-81.72489467542587; dx=-1.2080471747819464E-6 evalInputDelta=6.871623643305583
Fitness changed from -74.85327103212029 to -81.72489467542587
Iteration 3 complete. Error: -81.72489467542587 Total: 8.0230; Orientation: 0.0623; Line Search: 5.0945
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c12b02a0-a3af-4358-9efb-113867ded997.jpg)
Adding measurement 7d1a5f30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.135e+03, gradient 1.214e-03, dot -0.663; [3223ed63-4ad9-4632-8df7-9922ff101009 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.72489467542587, -74.85327103212029, -68.7976210829874, -68.79761362221315
LBFGS Accumulation History: 3 points
Removed measurement 7d1a5f30 to history. Total: 3
th(0)=-81.72489467542587;dx=-1.4714955667843906E-6
New Minimum: -81.72489467542587 > -89.82608461955454
END: th(7818012.603187701)=-89.82608461955454; dx=-5.062142756657393E-7 evalInputDelta=8.101189944128663
Fitness changed from -81.72489467542587 to -89.82608461955454
Iteration 4 complete. Error: -89.82608461955454 Total: 9.1708; Orientation: 1.0625; Line Search: 5.0087
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/8b30cf19-925f-420b-a99f-1dd4a4b7e9a4.jpg)
Adding measurement 79693abd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.124e+04, gradient 1.422e-03, dot -0.425; [3223ed63-4ad9-4632-8df7-9922ff101009 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.82608461955454, -74.85327103212029, -68.7976210829874, -68.79761362221315
LBFGS Accumulation History: 3 points
Removed measurement 79693abd to history. Total: 3
th(0)=-89.82608461955454;dx=-2.01997388712098E-6
Armijo: th(1.6843397559414055E7)=-85.26459340721958; dx=7.213268382761845E-7 evalInputDelta=-4.561491212334957
New Minimum: -89.82608461955454 > -92.50209570398064
WOLF (strong): th(8421698.779707028)=-92.50209570398064; dx=6.015574809637667E-7 evalInputDelta=2.676011084426108
New Minimum: -92.50209570398064 > -94.0058540757732
END: th(2807232.926569009)=-94.0058540757732; dx=-5.818265767628732E-7 evalInputDelta=4.179769456218665
Fitness changed from -89.82608461955454 to -94.0058540757732
Iteration 5 complete. Error: -94.0058540757732 Total: 14.1200; Orientation: 1.0295; Line Search: 10.1109
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f5dc7e6c-cf91-4cdc-9cc2-2d5ec8158929.jpg)
Adding measurement 36b9e2d7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.698e+04, gradient 1.037e-03, dot -0.681; [3223ed63-4ad9-4632-8df7-9922ff101009 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -94.0058540757732, -74.85327103212029, -68.7976210829874, -68.79761362221315
LBFGS Accumulation History: 3 points
Removed measurement 36b9e2d7 to history. Total: 3
th(0)=-94.0058540757732;dx=-1.073887465197616E-6
New Minimum: -94.0058540757732 > -98.56218679033573
END: th(6048000.000000001)=-98.56218679033573; dx=-3.700734341822985E-7 evalInputDelta=4.556332714562529
Fitness changed from -94.0058540757732 to -98.56218679033573
Iteration 6 complete. Error: -98.56218679033573 Total: 9.2739; Orientation: 1.0303; Line Search: 5.0762
Adding measurement 2c9d66b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.097e+04, gradient 1.252e-03, dot -0.505; [3223ed63-4ad9-4632-8df7-9922ff101009 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.56218679033573, -74.85327103212029, -68.7976210829874, -68.79761362221315
LBFGS Accumulation History: 3 points
Removed measurement 2c9d66b1 to history. Total: 3
th(0)=-98.56218679033573;dx=-1.5667272986349068E-6
Armijo: th(1.3030021005312836E7)=-97.200247476519; dx=5.738421171599891E-7 evalInputDelta=-1.361939313816734
New Minimum: -98.56218679033573 > -101.32144206062554
WOLF (strong): th(6515010.502656418)=-101.32144206062554; dx=3.566784494425445E-7 evalInputDelta=2.759255270289813
New Minimum: -101.32144206062554 > -101.34529960359781
END: th(2171670.167552139)=-101.34529960359781; dx=-6.606836834295953E-7 evalInputDelta=2.783112813262079
Fitness changed from -98.56218679033573 to -101.34529960359781
Iteration 7 complete. Error: -101.34529960359781 Total: 13.8347; Orientation: 1.0544; Line Search: 10.2980
Adding measurement 411c306b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.655e+04, gradient 8.802e-04, dot -0.775; [3223ed63-4ad9-4632-8df7-9922ff101009 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -101.34529960359781, -74.85327103212029, -68.7976210829874, -68.79761362221315
LBFGS Accumulation History: 3 points
Removed measurement 411c306b to history. Total: 3
th(0)=-101.34529960359781;dx=-7.734691071907319E-7
New Minimum: -101.34529960359781 > -104.83691100617132
END: th(4678721.544281682)=-104.83691100617132; dx=-5.787772116124561E-7 evalInputDelta=3.491611402573511
Fitness changed from -101.34529960359781 to -104.83691100617132
Iteration 8 complete. Error: -104.83691100617132 Total: 8.6822; Orientation: 1.0335; Line Search: 5.2122
Adding measurement 2a2c0ce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.990e+04, gradient 8.949e-04, dot -0.726; [3223ed63-4ad9-4632-8df7-9922ff101009 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -104.83691100617132, -74.85327103212029, -68.7976210829874, -68.79761362221315
LBFGS Accumulation History: 3 points
Removed measurement 2a2c0ce to history. Total: 3
th(0)=-104.83691100617132;dx=-8.004048943691322E-7
New Minimum: -104.83691100617132 > -109.6874233569834
END: th(1.0080000000000002E7)=-109.6874233569834; dx=-2.2614812048847432E-7 evalInputDelta=4.850512350812082
Fitness changed from -104.83691100617132 to -109.6874233569834
Iteration 9 complete. Error: -109.6874233569834 Total: 8.8078; Orientation: 1.0837; Line Search: 5.1273
Adding measurement 7cc1ec76 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.870e+04, gradient 1.268e-03, dot -0.411; [3223ed63-4ad9-4632-8df7-9922ff101009 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -109.6874233569834, -74.85327103212029, -68.7976210829874, -68.79761362221315
LBFGS Accumulation History: 3 points
Removed measurement 7cc1ec76 to history. Total: 3
th(0)=-109.6874233569834;dx=-1.607434981486865E-6
Armijo: th(2.1716701675521392E7)=-98.28782720064515; dx=7.329426784427137E-7 evalInputDelta=-11.399596156338248
Armijo: th(1.0858350837760696E7)=-108.89607112177684; dx=8.234706491971905E-7 evalInputDelta=-0.7913522352065598
New Minimum: -109.6874233569834 > -113.5350915242603
END: th(3619450.2792535652)=-113.5350915242603; dx=-2.0531073750529862E-7 evalInputDelta=3.8476681672768933
Fitness changed from -109.6874233569834 to -113.5350915242603
Iteration 10 complete. Error: -113.5350915242603 Total: 13.8516; Orientation: 1.0532; Line Search: 10.4030
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e44c88a0-ef50-485d-b55c-c2c6f62ca4c1.jpg)
Final threshold in iteration 11: -113.5350915242603 (> -Infinity) after 128.383s (< 5400.000s)
Returns
-113.5350915242603