BasicOptimizer.scala:89 executed in 310.55 seconds (5.266 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: 642356484025900
Reset training subject: 642362278478500
Adding measurement 5ea85946 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-42.41757283350776;dx=-1.7201794441511933E-6
New Minimum: -42.41757283350776 > -42.417576394637834
WOLFE (weak): th(2.154434690031884)=-42.417576394637834; dx=-1.6695711136897086E-6 evalInputDelta=3.561130071716434E-6
New Minimum: -42.417576394637834 > -42.417581736332366
WOLFE (weak): th(4.308869380063768)=-42.417581736332366; dx=-1.6695360645893505E-6 evalInputDelta=8.902824603751469E-6
New Minimum: -42.417581736332366 > -42.417597761411955
WOLFE (weak): th(12.926608140191302)=-42.417597761411955; dx=-1.6695320890633976E-6 evalInputDelta=2.4927904192395545E-5
New Minimum: -42.417597761411955 > -42.41766898391464
WOLFE (weak): th(51.70643256076521)=-42.41766898391464; dx=-1.6694768071335118E-6 evalInputDelta=9.615040687549481E-5
New Minimum: -42.41766898391464 > -42.41805358336268
WOLFE (weak): th(258.53216280382605)=-42.41805358336268; dx=-1.6692075442734992E-6 evalInputDelta=4.807498549155298E-4
New Minimum: -42.41805358336268 > -42.420453690024154
WOLFE (weak): th(1551.1929768229563)=-42.420453690024154; dx=-1.669108769370797E-6 evalInputDelta=0.0028808565163913613
New Minimum: -42.420453690024154 > -42.43773828169655
WOLFE (weak): th(10858.350837760694)=-42.43773828169655; dx=-1.6681883975280837E-6 evalInputDelta=0.020165448188784296
New Minimum: -42.43773828169655 > -42.57857047067362
WOLFE (weak): th(86866.80670208555)=-42.57857047067362; dx=-1.6608715735106513E-6 evalInputDelta=0.16099763716585613
New Minimum: -42.57857047067362 > -43.831577726222655
WOLFE (weak): th(781801.26031877)=-43.831577726222655; dx=-1.5794727665556964E-6 evalInputDelta=1.4140048927148925
New Minimum: -43.831577726222655 > -52.630883854369735
END: th(7818012.6031877)=-52.630883854369735; dx=-6.653176838511653E-7 evalInputDelta=10.213311020861973
Fitness changed from -42.41757283350776 to -52.630883854369735
Iteration 1 complete. Error: -52.630883854369735 Total: 81.4953; Orientation: 0.1484; Line Search: 63.9631
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0bf72cfd-60ae-4d07-93fa-67bdae1c1352.jpg)
Adding measurement 6796bfc0 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-52.630883854369735;dx=-8.471575542555298E-7
New Minimum: -52.630883854369735 > -60.99327503684902
END: th(1.684339755941405E7)=-60.99327503684902; dx=-1.7011117591094826E-7 evalInputDelta=8.362391182479286
Fitness changed from -52.630883854369735 to -60.99327503684902
Iteration 2 complete. Error: -60.99327503684902 Total: 18.4924; Orientation: 0.1233; Line Search: 11.5491
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/515fe35d-0ff4-4e9a-ab46-0313604b1686.jpg)
Adding measurement 364699e4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-60.99327503684902;dx=-8.529383058580571E-7
New Minimum: -60.99327503684902 > -62.16075381881324
WOLF (strong): th(3.6288E7)=-62.16075381881324; dx=1.7578973449430778E-7 evalInputDelta=1.1674787819642205
New Minimum: -62.16075381881324 > -65.99699268886054
WOLF (strong): th(1.8144E7)=-65.99699268886054; dx=1.395294570946945E-7 evalInputDelta=5.003717652011524
END: th(6048000.0)=-65.33234955857465; dx=-4.173228053878526E-7 evalInputDelta=4.339074521725628
Fitness changed from -60.99327503684902 to -65.99699268886054
Iteration 3 complete. Error: -65.99699268886054 Total: 30.0569; Orientation: 0.1258; Line Search: 23.2584
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/bf4e9e22-d777-4a1e-a1f8-4417fcca4f92.jpg)
Adding measurement 18c104ba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.427e+04, gradient 1.014e-03, dot -0.560; [9aa74acf-9111-4276-b048-92f58987301b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.99699268886054, -60.99327503684902, -52.630883854369735, -42.41757283350776
LBFGS Accumulation History: 3 points
Removed measurement 18c104ba to history. Total: 3
th(0)=-65.99699268886054;dx=-1.0269630154959025E-6
New Minimum: -65.99699268886054 > -72.99917475779351
WOLF (strong): th(1.3030021005312834E7)=-72.99917475779351; dx=1.0759401576615536E-7 evalInputDelta=7.002182068932967
END: th(6515010.502656417)=-71.74389401591935; dx=-5.143660599027024E-7 evalInputDelta=5.746901327058808
Fitness changed from -65.99699268886054 to -72.99917475779351
Iteration 4 complete. Error: -72.99917475779351 Total: 26.4182; Orientation: 2.5152; Line Search: 17.0310
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/fdbd6a66-27c3-43f2-9ba2-a91971c957ee.jpg)
Adding measurement 46c7b2b2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.302e+04, gradient 8.075e-04, dot -0.575; [9aa74acf-9111-4276-b048-92f58987301b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.99917475779351, -60.99327503684902, -52.630883854369735, -42.41757283350776
LBFGS Accumulation History: 3 points
Removed measurement 46c7b2b2 to history. Total: 3
th(0)=-72.99917475779351;dx=-6.520980534246411E-7
New Minimum: -72.99917475779351 > -77.04247783621183
WOLF (strong): th(1.4036164632845046E7)=-77.04247783621183; dx=7.258933785582672E-8 evalInputDelta=4.043303078418319
END: th(7018082.316422523)=-76.54911233279768; dx=-2.522072774138347E-7 evalInputDelta=3.549937575004165
Fitness changed from -72.99917475779351 to -77.04247783621183
Iteration 5 complete. Error: -77.04247783621183 Total: 26.5889; Orientation: 2.4548; Line Search: 17.3336
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c46ec5bf-18a4-43be-8639-7d7448a56cb3.jpg)
Adding measurement 4aa63cd3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.150e+04, gradient 8.176e-04, dot -0.552; [9aa74acf-9111-4276-b048-92f58987301b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.04247783621183, -60.99327503684902, -52.630883854369735, -42.41757283350776
LBFGS Accumulation History: 3 points
Removed measurement 4aa63cd3 to history. Total: 3
th(0)=-77.04247783621183;dx=-6.678663380305618E-7
New Minimum: -77.04247783621183 > -80.62589881576555
WOLF (strong): th(1.5120000000000004E7)=-80.62589881576555; dx=1.5699290514713527E-7 evalInputDelta=3.583420979553722
New Minimum: -80.62589881576555 > -80.75809116764648
END: th(7560000.000000002)=-80.75809116764648; dx=-2.0028519587091778E-7 evalInputDelta=3.7156133314346533
Fitness changed from -77.04247783621183 to -80.75809116764648
Iteration 6 complete. Error: -80.75809116764648 Total: 26.9961; Orientation: 2.3453; Line Search: 17.8043
Adding measurement 10d5326d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.915e+04, gradient 5.476e-04, dot -0.780; [9aa74acf-9111-4276-b048-92f58987301b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.75809116764648, -60.99327503684902, -52.630883854369735, -42.41757283350776
LBFGS Accumulation History: 3 points
Removed measurement 10d5326d to history. Total: 3
th(0)=-80.75809116764648;dx=-2.994022636968361E-7
New Minimum: -80.75809116764648 > -84.70894862231361
END: th(1.6287526256641045E7)=-84.70894862231361; dx=-1.6627061692798762E-7 evalInputDelta=3.95085745466713
Fitness changed from -80.75809116764648 to -84.70894862231361
Iteration 7 complete. Error: -84.70894862231361 Total: 19.9656; Orientation: 2.4073; Line Search: 12.0199
Adding measurement 45732c20 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.626e+04, gradient 6.088e-04, dot -0.665; [9aa74acf-9111-4276-b048-92f58987301b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.70894862231361, -60.99327503684902, -52.630883854369735, -42.41757283350776
LBFGS Accumulation History: 3 points
Removed measurement 45732c20 to history. Total: 3
th(0)=-84.70894862231361;dx=-3.6993170279092047E-7
New Minimum: -84.70894862231361 > -87.09679599777282
WOLF (strong): th(3.509041158211262E7)=-87.09679599777282; dx=5.1432478861866136E-8 evalInputDelta=2.3878473754592022
New Minimum: -87.09679599777282 > -87.73638176910643
END: th(1.754520579105631E7)=-87.73638176910643; dx=-2.5746155003342264E-8 evalInputDelta=3.0274331467928164
Fitness changed from -84.70894862231361 to -87.73638176910643
Iteration 8 complete. Error: -87.73638176910643 Total: 26.6054; Orientation: 2.4762; Line Search: 18.1941
Adding measurement 2c6e8a83 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.069e+05, gradient 7.307e-04, dot -0.525; [9aa74acf-9111-4276-b048-92f58987301b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.73638176910643, -60.99327503684902, -52.630883854369735, -42.41757283350776
LBFGS Accumulation History: 3 points
Removed measurement 2c6e8a83 to history. Total: 3
th(0)=-87.73638176910643;dx=-5.337230818613271E-7
Armijo: th(3.7800000000000015E7)=-85.55241613795476; dx=2.216127012905284E-7 evalInputDelta=-2.183965631151665
New Minimum: -87.73638176910643 > -90.39556654707425
WOLF (strong): th(1.8900000000000007E7)=-90.39556654707425; dx=1.6602754687967683E-7 evalInputDelta=2.6591847779678233
New Minimum: -90.39556654707425 > -90.54742331616147
END: th(6300000.000000003)=-90.54742331616147; dx=-2.651975733053994E-7 evalInputDelta=2.8110415470550407
Fitness changed from -87.73638176910643 to -90.54742331616147
Iteration 9 complete. Error: -90.54742331616147 Total: 32.1795; Orientation: 2.6561; Line Search: 23.4959
Adding measurement 3d0c28e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.145e+05, gradient 5.021e-04, dot -0.737; [9aa74acf-9111-4276-b048-92f58987301b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.54742331616147, -60.99327503684902, -52.630883854369735, -42.41757283350776
LBFGS Accumulation History: 3 points
Removed measurement 3d0c28e to history. Total: 3
th(0)=-90.54742331616147;dx=-2.518081633924973E-7
New Minimum: -90.54742331616147 > -93.38117251584947
END: th(1.3572938547200873E7)=-93.38117251584947; dx=-1.4614126315615697E-7 evalInputDelta=2.8337491996880004
Fitness changed from -90.54742331616147 to -93.38117251584947
Iteration 10 complete. Error: -93.38117251584947 Total: 20.7151; Orientation: 2.5063; Line Search: 12.2938
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/61ac7f5e-d3f8-4a80-8852-5d4fdc7da933.jpg)
Final threshold in iteration 11: -93.38117251584947 (> -Infinity) after 310.554s (< 5400.000s)
Returns
-93.38117251584947