BasicOptimizer.scala:89 executed in 86.75 seconds (0.966 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: 303693395204500
Reset training subject: 303695225523000
Adding measurement 1efdaec0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-281.0903481284784;dx=-2.466394781273628E-5
New Minimum: -281.0903481284784 > -281.09040670492965
END: th(2.154434690031884)=-281.09040670492965; dx=-1.690381243227467E-5 evalInputDelta=5.8576451237968286E-5
Fitness changed from -281.0903481284784 to -281.09040670492965
Iteration 1 complete. Error: -281.09040670492965 Total: 8.3715; Orientation: 0.0670; Line Search: 3.2872
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6b17ced8-fdf0-41a8-82e5-942d7e63b978.jpg)
Adding measurement 5a342baf to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-281.09040670492965;dx=-1.6693473079127858E-5
New Minimum: -281.09040670492965 > -281.0904652813688
WOLFE (weak): th(4.641588833612779)=-281.0904652813688; dx=-1.6690323209066073E-5 evalInputDelta=5.857643913032007E-5
New Minimum: -281.0904652813688 > -281.09056779010774
WOLFE (weak): th(9.283177667225559)=-281.09056779010774; dx=-1.668501118913774E-5 evalInputDelta=1.6108517809243494E-4
New Minimum: -281.09056779010774 > -281.09093389244185
WOLFE (weak): th(27.849533001676676)=-281.09093389244185; dx=-1.668172680880327E-5 evalInputDelta=5.271875122048186E-4
New Minimum: -281.09093389244185 > -281.09245687303417
WOLFE (weak): th(111.3981320067067)=-281.09245687303417; dx=-1.6679553078940496E-5 evalInputDelta=0.0020501681045175246
New Minimum: -281.09245687303417 > -281.1007891880905
WOLFE (weak): th(556.9906600335335)=-281.1007891880905; dx=-1.66653050678503E-5 evalInputDelta=0.01038248316086765
New Minimum: -281.1007891880905 > -281.1526958527875
WOLFE (weak): th(3341.9439602012008)=-281.1526958527875; dx=-1.666086424303963E-5 evalInputDelta=0.062289147857825355
New Minimum: -281.1526958527875 > -281.5255857067247
WOLFE (weak): th(23393.607721408407)=-281.5255857067247; dx=-1.657130264402095E-5 evalInputDelta=0.4351790017950634
New Minimum: -281.5255857067247 > -284.4288137249879
WOLFE (weak): th(187148.86177126726)=-284.4288137249879; dx=-1.5157002967423794E-5 evalInputDelta=3.3384070200582414
New Minimum: -284.4288137249879 > -302.11146114595454
END: th(1684339.7559414054)=-302.11146114595454; dx=-6.732478182788933E-6 evalInputDelta=21.021054441024887
Fitness changed from -281.09040670492965 to -302.11146114595454
Iteration 2 complete. Error: -302.11146114595454 Total: 18.5186; Orientation: 0.0697; Line Search: 16.2704
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/0d560a3c-7e38-4ba4-b686-2ee1e5237584.jpg)
Adding measurement 6272fe30 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-302.11146114595454;dx=-7.816111844343887E-6
New Minimum: -302.11146114595454 > -320.62557305812254
END: th(3628800.0000000005)=-320.62557305812254; dx=-2.9729864156150278E-6 evalInputDelta=18.514111912168005
Fitness changed from -302.11146114595454 to -320.62557305812254
Iteration 3 complete. Error: -320.62557305812254 Total: 5.2841; Orientation: 0.0637; Line Search: 3.3771
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d60031df-1322-4902-9f31-6c9a0374a9c7.jpg)
Adding measurement 755a3ffb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.626e+03, gradient 2.256e-03, dot -0.524; [db69c9a8-d0b9-4179-bdac-bc12b9ad13e1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -320.62557305812254, -302.11146114595454, -281.09040670492965, -281.0903481284784
LBFGS Accumulation History: 3 points
Removed measurement 755a3ffb to history. Total: 3
th(0)=-320.62557305812254;dx=-5.08723386515416E-6
New Minimum: -320.62557305812254 > -334.0820394105523
WOLF (strong): th(7818012.603187701)=-334.0820394105523; dx=1.9818859897946316E-8 evalInputDelta=13.456466352429743
END: th(3909006.3015938504)=-332.3119815658959; dx=-1.3047554301354826E-6 evalInputDelta=11.686408507773365
Fitness changed from -320.62557305812254 to -334.0820394105523
Iteration 4 complete. Error: -334.0820394105523 Total: 7.9279; Orientation: 1.1406; Line Search: 4.9265
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/539fcc4f-a24b-4268-b423-371975404e63.jpg)
Adding measurement 6e0c5743 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.207e+03, gradient 2.947e-03, dot -0.170; [db69c9a8-d0b9-4179-bdac-bc12b9ad13e1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -334.0820394105523, -302.11146114595454, -281.09040670492965, -281.0903481284784
LBFGS Accumulation History: 3 points
Removed measurement 6e0c5743 to history. Total: 3
th(0)=-334.0820394105523;dx=-8.684004711640058E-6
Armijo: th(8421698.779707028)=-328.9886780297623; dx=4.879895367419384E-6 evalInputDelta=-5.093361380789986
New Minimum: -334.0820394105523 > -348.0907663468775
WOLF (strong): th(4210849.389853514)=-348.0907663468775; dx=1.8019929276398463E-6 evalInputDelta=14.008726936325218
END: th(1403616.4632845046)=-344.58017786801184; dx=-4.908515003152855E-6 evalInputDelta=10.49813845745956
Fitness changed from -334.0820394105523 to -348.0907663468775
Iteration 5 complete. Error: -348.0907663468775 Total: 9.3960; Orientation: 1.1376; Line Search: 6.4145
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c219a6d1-54b1-4d7e-8de7-d1e17782598e.jpg)
Adding measurement 45c34a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.213e+04, gradient 2.463e-03, dot -0.280; [db69c9a8-d0b9-4179-bdac-bc12b9ad13e1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -348.0907663468775, -302.11146114595454, -281.09040670492965, -281.0903481284784
LBFGS Accumulation History: 3 points
Removed measurement 45c34a2 to history. Total: 3
th(0)=-348.0907663468775;dx=-6.067676414022704E-6
New Minimum: -348.0907663468775 > -357.99118392152633
END: th(3024000.0000000005)=-357.99118392152633; dx=-1.5541067670769614E-7 evalInputDelta=9.900417574648827
Fitness changed from -348.0907663468775 to -357.99118392152633
Iteration 6 complete. Error: -357.99118392152633 Total: 6.4363; Orientation: 1.0700; Line Search: 3.2354
Adding measurement 42adf242 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.994e+04, gradient 1.754e-03, dot -0.507; [db69c9a8-d0b9-4179-bdac-bc12b9ad13e1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -357.99118392152633, -302.11146114595454, -281.09040670492965, -281.0903481284784
LBFGS Accumulation History: 3 points
Removed measurement 42adf242 to history. Total: 3
th(0)=-357.99118392152633;dx=-3.071689944071081E-6
New Minimum: -357.99118392152633 > -362.7673143334171
WOLF (strong): th(6515010.502656418)=-362.7673143334171; dx=9.074109266168517E-7 evalInputDelta=4.77613041189079
New Minimum: -362.7673143334171 > -364.0691906404144
END: th(3257505.251328209)=-364.0691906404144; dx=-6.394548996174303E-7 evalInputDelta=6.078006718888048
Fitness changed from -357.99118392152633 to -364.0691906404144
Iteration 7 complete. Error: -364.0691906404144 Total: 7.6960; Orientation: 1.1303; Line Search: 5.0048
Adding measurement 2ab3744a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.189e+04, gradient 1.624e-03, dot -0.524; [db69c9a8-d0b9-4179-bdac-bc12b9ad13e1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -364.0691906404144, -302.11146114595454, -281.09040670492965, -281.0903481284784
LBFGS Accumulation History: 3 points
Removed measurement 2ab3744a to history. Total: 3
th(0)=-364.0691906404144;dx=-2.6369139818971594E-6
New Minimum: -364.0691906404144 > -367.59957589404576
WOLF (strong): th(7018082.316422524)=-367.59957589404576; dx=7.436537976957836E-7 evalInputDelta=3.53038525363138
New Minimum: -367.59957589404576 > -369.0977271217788
END: th(3509041.158211262)=-369.0977271217788; dx=-3.8103092231880343E-7 evalInputDelta=5.028536481364426
Fitness changed from -364.0691906404144 to -369.0977271217788
Iteration 8 complete. Error: -369.0977271217788 Total: 7.7039; Orientation: 1.1203; Line Search: 5.0257
Adding measurement 291bd851 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.320e+04, gradient 1.655e-03, dot -0.496; [db69c9a8-d0b9-4179-bdac-bc12b9ad13e1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -369.0977271217788, -302.11146114595454, -281.09040670492965, -281.0903481284784
LBFGS Accumulation History: 3 points
Removed measurement 291bd851 to history. Total: 3
th(0)=-369.0977271217788;dx=-2.7351463159145345E-6
New Minimum: -369.0977271217788 > -369.3613422301178
WOLF (strong): th(7560000.000000003)=-369.3613422301178; dx=1.37729113598753E-6 evalInputDelta=0.2636151083390246
New Minimum: -369.3613422301178 > -373.5135625265461
WOLF (strong): th(3780000.0000000014)=-373.5135625265461; dx=1.323801467130796E-7 evalInputDelta=4.415835404767279
END: th(1260000.0000000005)=-371.9811213300856; dx=-1.6422475602206642E-6 evalInputDelta=2.883394208306811
Fitness changed from -369.0977271217788 to -373.5135625265461
Iteration 9 complete. Error: -373.5135625265461 Total: 9.2556; Orientation: 1.0935; Line Search: 6.5954
Adding measurement 56a0c515 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.274e+04, gradient 1.767e-03, dot -0.417; [db69c9a8-d0b9-4179-bdac-bc12b9ad13e1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -373.5135625265461, -302.11146114595454, -281.09040670492965, -281.0903481284784
LBFGS Accumulation History: 3 points
Removed measurement 56a0c515 to history. Total: 3
th(0)=-373.5135625265461;dx=-3.118481834454322E-6
New Minimum: -373.5135625265461 > -378.06549715476456
END: th(2714587.7094401745)=-378.06549715476456; dx=-1.925603717127234E-7 evalInputDelta=4.551934628218476
Fitness changed from -373.5135625265461 to -378.06549715476456
Iteration 10 complete. Error: -378.06549715476456 Total: 5.8717; Orientation: 1.1024; Line Search: 3.2563
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ba37012b-9e1d-4b06-ad78-149cba06a4bd.jpg)
Final threshold in iteration 11: -378.06549715476456 (> -Infinity) after 86.753s (< 5400.000s)
Returns
-378.06549715476456