BasicOptimizer.scala:89 executed in 213.69 seconds (3.427 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: 694038598720900
Reset training subject: 694043144597900
Adding measurement 68fea627 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1059.2903874764463;dx=-0.00575718989586926
New Minimum: -1059.2903874764463 > -1059.3027187730615
WOLFE (weak): th(2.154434690031884)=-1059.3027187730615; dx=-0.005258518340302392 evalInputDelta=0.012331296615229803
New Minimum: -1059.3027187730615 > -1059.3151089265177
WOLFE (weak): th(4.308869380063768)=-1059.3151089265177; dx=-0.005256626091846342 evalInputDelta=0.0247214500714108
New Minimum: -1059.3151089265177 > -1059.3645500959526
WOLFE (weak): th(12.926608140191302)=-1059.3645500959526; dx=-0.005255031296630692 evalInputDelta=0.07416261950629632
New Minimum: -1059.3645500959526 > -1059.587065794973
WOLFE (weak): th(51.70643256076521)=-1059.587065794973; dx=-0.005255347586176195 evalInputDelta=0.296678318526574
New Minimum: -1059.587065794973 > -1060.772477961226
WOLFE (weak): th(258.53216280382605)=-1060.772477961226; dx=-0.0052463428892269535 evalInputDelta=1.4820904847797465
New Minimum: -1060.772477961226 > -1068.145823378063
WOLFE (weak): th(1551.1929768229563)=-1068.145823378063; dx=-0.00520038226714733 evalInputDelta=8.855435901616602
New Minimum: -1068.145823378063 > -1118.8629272614228
END: th(10858.350837760694)=-1118.8629272614228; dx=-0.0047665075166610565 evalInputDelta=59.57253978497647
Fitness changed from -1059.2903874764463 to -1118.8629272614228
Iteration 1 complete. Error: -1118.8629272614228 Total: 49.6274; Orientation: 0.0986; Line Search: 36.2924
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/70ce035f-9420-4d01-9f33-59ff23d4df98.jpg)
Adding measurement 4f1d7e4b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1118.8629272614228;dx=-0.004503323274318243
New Minimum: -1118.8629272614228 > -1223.4303208601625
END: th(23393.607721408407)=-1223.4303208601625; dx=-0.003677101273635205 evalInputDelta=104.56739359873973
Fitness changed from -1118.8629272614228 to -1223.4303208601625
Iteration 2 complete. Error: -1223.4303208601625 Total: 14.6688; Orientation: 0.0981; Line Search: 9.0400
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/49722a1f-0d47-4787-9bb6-794bc0570d18.jpg)
Adding measurement 30a1a52b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1223.4303208601625;dx=-0.0034214069781730453
New Minimum: -1223.4303208601625 > -1385.5554842733654
END: th(50400.00000000001)=-1385.5554842733654; dx=-0.002480945571845191 evalInputDelta=162.12516341320293
Fitness changed from -1223.4303208601625 to -1385.5554842733654
Iteration 3 complete. Error: -1385.5554842733654 Total: 14.9111; Orientation: 0.0840; Line Search: 9.4140
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e50fdfe3-3d7c-4c98-9714-8f87a9338a38.jpg)
Adding measurement 17523793 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.273e+04, gradient 4.960e-02, dot -0.880; [5ec9a10a-b9ad-4f20-9f79-eec5b53b29b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1385.5554842733654, -1223.4303208601625, -1118.8629272614228, -1059.2903874764463
LBFGS Accumulation History: 3 points
Removed measurement 17523793 to history. Total: 3
th(0)=-1385.5554842733654;dx=-0.0024575171904331577
New Minimum: -1385.5554842733654 > -1608.9105009291225
END: th(108583.50837760697)=-1608.9105009291225; dx=-0.0014333961938652912 evalInputDelta=223.35501665575703
Fitness changed from -1385.5554842733654 to -1608.9105009291225
Iteration 4 complete. Error: -1608.9105009291225 Total: 16.3663; Orientation: 1.7387; Line Search: 8.9140
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/726df90f-5a43-4d9d-9ad3-4f9f8b96810f.jpg)
Adding measurement 78c2fe82 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.273e+04, gradient 4.652e-02, dot -0.681; [5ec9a10a-b9ad-4f20-9f79-eec5b53b29b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1608.9105009291225, -1223.4303208601625, -1118.8629272614228, -1059.2903874764463
LBFGS Accumulation History: 3 points
Removed measurement 78c2fe82 to history. Total: 3
th(0)=-1608.9105009291225;dx=-0.0021557622458899498
New Minimum: -1608.9105009291225 > -1851.1226998770233
END: th(233936.07721408413)=-1851.1226998770233; dx=-5.142346374120723E-4 evalInputDelta=242.2121989479008
Fitness changed from -1608.9105009291225 to -1851.1226998770233
Iteration 5 complete. Error: -1851.1226998770233 Total: 16.4322; Orientation: 1.7512; Line Search: 9.2096
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ded7bcdf-798c-4bd3-97e7-dfbf9e42a6db.jpg)
Adding measurement 3e4c2140 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.300e+04, gradient 5.367e-02, dot -0.391; [5ec9a10a-b9ad-4f20-9f79-eec5b53b29b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1851.1226998770233, -1223.4303208601625, -1118.8629272614228, -1059.2903874764463
LBFGS Accumulation History: 3 points
Removed measurement 3e4c2140 to history. Total: 3
th(0)=-1851.1226998770233;dx=-0.0028753795855308113
New Minimum: -1851.1226998770233 > -1953.2202896754886
WOLF (strong): th(504000.0000000002)=-1953.2202896754886; dx=2.2569207968865015E-4 evalInputDelta=102.09758979846538
New Minimum: -1953.2202896754886 > -2021.5456957486763
WOLF (strong): th(252000.0000000001)=-2021.5456957486763; dx=1.401274012356787E-4 evalInputDelta=170.42299587165303
END: th(84000.00000000003)=-2003.4900174445593; dx=-7.700198095440881E-4 evalInputDelta=152.36731756753602
Fitness changed from -1851.1226998770233 to -2021.5456957486763
Iteration 6 complete. Error: -2021.5456957486763 Total: 25.4676; Orientation: 1.7235; Line Search: 18.2011
Adding measurement 38b25c4b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.527e+04, gradient 5.611e-02, dot -0.309; [5ec9a10a-b9ad-4f20-9f79-eec5b53b29b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2021.5456957486763, -1223.4303208601625, -1118.8629272614228, -1059.2903874764463
LBFGS Accumulation History: 3 points
Removed measurement 38b25c4b to history. Total: 3
th(0)=-2021.5456957486763;dx=-0.0031471560565737777
New Minimum: -2021.5456957486763 > -2266.3538999900256
WOLF (strong): th(180972.5139626783)=-2266.3538999900256; dx=3.614363523468163E-5 evalInputDelta=244.80820424134936
END: th(90486.25698133915)=-2228.0720365374186; dx=-0.0010619041214432949 evalInputDelta=206.52634078874235
Fitness changed from -2021.5456957486763 to -2266.3538999900256
Iteration 7 complete. Error: -2266.3538999900256 Total: 20.1932; Orientation: 1.6513; Line Search: 14.0086
Adding measurement 323e52ad to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.134e+04, gradient 5.163e-02, dot -0.343; [5ec9a10a-b9ad-4f20-9f79-eec5b53b29b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2266.3538999900256, -1223.4303208601625, -1118.8629272614228, -1059.2903874764463
LBFGS Accumulation History: 3 points
Removed measurement 323e52ad to history. Total: 3
th(0)=-2266.3538999900256;dx=-0.0026650957603286682
New Minimum: -2266.3538999900256 > -2439.806242306958
WOLF (strong): th(194946.7310117368)=-2439.806242306958; dx=2.497036593138008E-4 evalInputDelta=173.45234231693257
END: th(97473.3655058684)=-2431.4967612563255; dx=-6.21833818568931E-4 evalInputDelta=165.14286126629986
Fitness changed from -2266.3538999900256 to -2439.806242306958
Iteration 8 complete. Error: -2439.806242306958 Total: 19.5869; Orientation: 1.6291; Line Search: 13.6297
Adding measurement 643c5919 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.823e+04, gradient 5.301e-02, dot -0.336; [5ec9a10a-b9ad-4f20-9f79-eec5b53b29b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2439.806242306958, -1223.4303208601625, -1118.8629272614228, -1059.2903874764463
LBFGS Accumulation History: 3 points
Removed measurement 643c5919 to history. Total: 3
th(0)=-2439.806242306958;dx=-0.0028058973144793886
New Minimum: -2439.806242306958 > -2585.2820929252575
WOLF (strong): th(210000.0000000001)=-2585.2820929252575; dx=5.929881143399767E-4 evalInputDelta=145.47585061829932
New Minimum: -2585.2820929252575 > -2611.65627523991
END: th(105000.00000000004)=-2611.65627523991; dx=-4.2226002723130655E-4 evalInputDelta=171.85003293295176
Fitness changed from -2439.806242306958 to -2611.65627523991
Iteration 9 complete. Error: -2611.65627523991 Total: 19.5711; Orientation: 1.6242; Line Search: 13.5922
Adding measurement 5d040eba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.757e+04, gradient 4.004e-02, dot -0.470; [5ec9a10a-b9ad-4f20-9f79-eec5b53b29b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2611.65627523991, -1223.4303208601625, -1118.8629272614228, -1059.2903874764463
LBFGS Accumulation History: 3 points
Removed measurement 5d040eba to history. Total: 3
th(0)=-2611.65627523991;dx=-0.0016023175645616008
New Minimum: -2611.65627523991 > -2747.418151647106
END: th(226215.6424533479)=-2747.418151647106; dx=-3.4960131891301887E-5 evalInputDelta=135.7618764071958
Fitness changed from -2611.65627523991 to -2747.418151647106
Iteration 10 complete. Error: -2747.418151647106 Total: 15.8687; Orientation: 1.7169; Line Search: 9.6150
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/92f99237-7e8e-4b6b-b211-7472e6055bc7.jpg)
Final threshold in iteration 11: -2747.418151647106 (> -Infinity) after 213.688s (< 5400.000s)
Returns
-2747.418151647106