BasicOptimizer.scala:89 executed in 207.58 seconds (2.424 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: 9123492922093
Reset training subject: 9127919903946
Adding measurement 5df576d7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.002966076135635376;dx=-5.689879930802561E-7
New Minimum: -0.002966076135635376 > -0.0029661953449249268
WOLFE (weak): th(2.154434690031884)=-0.0029661953449249268; dx=-5.486361222834243E-7 evalInputDelta=1.1920928955078125E-7
New Minimum: -0.0029661953449249268 > -0.0029667317867279053
WOLFE (weak): th(4.308869380063768)=-0.0029667317867279053; dx=-5.486353179198034E-7 evalInputDelta=6.556510925292969E-7
New Minimum: -0.0029667317867279053 > -0.0029693543910980225
WOLFE (weak): th(12.926608140191302)=-0.0029693543910980225; dx=-5.486354835397134E-7 evalInputDelta=3.2782554626464844E-6
New Minimum: -0.0029693543910980225 > -0.0029801130294799805
WOLFE (weak): th(51.70643256076521)=-0.0029801130294799805; dx=-5.48626977728656E-7 evalInputDelta=1.4036893844604492E-5
New Minimum: -0.0029801130294799805 > -0.0030368566513061523
WOLFE (weak): th(258.53216280382605)=-0.0030368566513061523; dx=-5.485957765644353E-7 evalInputDelta=7.078051567077637E-5
New Minimum: -0.0030368566513061523 > -0.0033913850784301758
WOLFE (weak): th(1551.1929768229563)=-0.0033913850784301758; dx=-5.484205166643881E-7 evalInputDelta=4.253089427947998E-4
New Minimum: -0.0033913850784301758 > -0.005939960479736328
WOLFE (weak): th(10858.350837760694)=-0.005939960479736328; dx=-5.470311376598562E-7 evalInputDelta=0.002973884344100952
New Minimum: -0.005939960479736328 > -0.02650284767150879
WOLFE (weak): th(86866.80670208555)=-0.02650284767150879; dx=-5.350361513237467E-7 evalInputDelta=0.023536771535873413
New Minimum: -0.02650284767150879 > -0.19228297472000122
END: th(781801.26031877)=-0.19228297472000122; dx=-4.182836787931085E-7 evalInputDelta=0.18931689858436584
Fitness changed from -0.002966076135635376 to -0.19228297472000122
Iteration 1 complete. Error: -0.19228297472000122 Total: 57.6039; Orientation: 0.0455; Line Search: 43.8802
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/809f39ae-c2e9-4d3d-b6d9-436a4838e877.jpg)
Adding measurement 20f24db8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.19228297472000122;dx=-3.6789356268069134E-7
New Minimum: -0.19228297472000122 > -0.4455181509256363
END: th(1684339.7559414052)=-0.4455181509256363; dx=-2.389473879474409E-7 evalInputDelta=0.25323517620563507
Fitness changed from -0.19228297472000122 to -0.4455181509256363
Iteration 2 complete. Error: -0.4455181509256363 Total: 12.9004; Orientation: 0.0494; Line Search: 8.5284
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/be76ae76-183b-4ade-8fcf-36be66cd6168.jpg)
Adding measurement 73f36a58 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.4455181509256363;dx=-2.1697180373809886E-7
New Minimum: -0.4455181509256363 > -0.7423050999641418
END: th(3628800.0)=-0.7423050999641418; dx=-1.208362214173536E-7 evalInputDelta=0.29678694903850555
Fitness changed from -0.4455181509256363 to -0.7423050999641418
Iteration 3 complete. Error: -0.7423050999641418 Total: 12.7793; Orientation: 0.0448; Line Search: 8.3327
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c7ff8fc5-6f49-4a90-a256-cfa642f1ca80.jpg)
Adding measurement 1bdc0ea6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.257e+03, gradient 3.735e-04, dot -0.823; [740f7a50-26cc-4a3f-b32b-2a87db92fdda = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.7423050999641418, -0.4455181509256363, -0.19228297472000122, -0.002966076135635376
LBFGS Accumulation History: 3 points
Removed measurement 1bdc0ea6 to history. Total: 3
th(0)=-0.7423050999641418;dx=-1.3951309066262622E-7
New Minimum: -0.7423050999641418 > -1.047411248087883
END: th(7818012.6031877)=-1.047411248087883; dx=-4.3161478364223736E-8 evalInputDelta=0.30510614812374115
Fitness changed from -0.7423050999641418 to -1.047411248087883
Iteration 4 complete. Error: -1.047411248087883 Total: 13.9661; Orientation: 1.0315; Line Search: 8.8161
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1286ba03-9255-4098-86f1-66b6a86de65d.jpg)
Adding measurement 10df2a15 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.779e+03, gradient 3.395e-04, dot -0.603; [740f7a50-26cc-4a3f-b32b-2a87db92fdda = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.047411248087883, -0.4455181509256363, -0.19228297472000122, -0.002966076135635376
LBFGS Accumulation History: 3 points
Removed measurement 10df2a15 to history. Total: 3
th(0)=-1.047411248087883;dx=-1.1522894639265047E-7
New Minimum: -1.047411248087883 > -1.2210902869701385
WOLF (strong): th(1.684339755941405E7)=-1.2210902869701385; dx=1.0507051836821842E-8 evalInputDelta=0.17367903888225555
New Minimum: -1.2210902869701385 > -1.2409151643514633
END: th(8421698.779707026)=-1.2409151643514633; dx=-5.287339234829464E-9 evalInputDelta=0.19350391626358032
Fitness changed from -1.047411248087883 to -1.2409151643514633
Iteration 5 complete. Error: -1.2409151643514633 Total: 18.0833; Orientation: 1.0155; Line Search: 12.7426
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0cd41ed6-e1cb-476a-8929-3bc5fd39d56b.jpg)
Adding measurement 2b46fe06 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.908e+03, gradient 3.142e-04, dot -0.516; [740f7a50-26cc-4a3f-b32b-2a87db92fdda = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2409151643514633, -0.4455181509256363, -0.19228297472000122, -0.002966076135635376
LBFGS Accumulation History: 3 points
Removed measurement 2b46fe06 to history. Total: 3
th(0)=-1.2409151643514633;dx=-9.871124337843391E-8
New Minimum: -1.2409151643514633 > -1.3031559884548187
WOLF (strong): th(1.8144E7)=-1.3031559884548187; dx=2.8251266984724213E-8 evalInputDelta=0.06224082410335541
New Minimum: -1.3031559884548187 > -1.4075197726488113
WOLF (strong): th(9072000.0)=-1.4075197726488113; dx=8.08137734533318E-9 evalInputDelta=0.16660460829734802
END: th(3024000.0)=-1.3521999567747116; dx=-5.012978615652657E-8 evalInputDelta=0.11128479242324829
Fitness changed from -1.2409151643514633 to -1.4075197726488113
Iteration 6 complete. Error: -1.4075197726488113 Total: 22.8834; Orientation: 1.0106; Line Search: 17.7180
Adding measurement 41296597 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.849e+03, gradient 2.784e-04, dot -0.478; [740f7a50-26cc-4a3f-b32b-2a87db92fdda = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4075197726488113, -0.4455181509256363, -0.19228297472000122, -0.002966076135635376
LBFGS Accumulation History: 3 points
Removed measurement 41296597 to history. Total: 3
th(0)=-1.4075197726488113;dx=-7.748973125095836E-8
New Minimum: -1.4075197726488113 > -1.5373149663209915
END: th(6515010.502656417)=-1.5373149663209915; dx=-1.2077912145527509E-8 evalInputDelta=0.12979519367218018
Fitness changed from -1.4075197726488113 to -1.5373149663209915
Iteration 7 complete. Error: -1.5373149663209915 Total: 13.6957; Orientation: 1.0223; Line Search: 8.1860
Adding measurement 3dc8e094 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.200e+03, gradient 1.904e-04, dot -0.605; [740f7a50-26cc-4a3f-b32b-2a87db92fdda = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5373149663209915, -0.4455181509256363, -0.19228297472000122, -0.002966076135635376
LBFGS Accumulation History: 3 points
Removed measurement 3dc8e094 to history. Total: 3
th(0)=-1.5373149663209915;dx=-3.625454215243837E-8
New Minimum: -1.5373149663209915 > -1.6449396312236786
WOLF (strong): th(1.4036164632845046E7)=-1.6449396312236786; dx=9.345466528589819E-10 evalInputDelta=0.10762466490268707
END: th(7018082.316422523)=-1.624308094382286; dx=-1.4150240768222135E-8 evalInputDelta=0.08699312806129456
Fitness changed from -1.5373149663209915 to -1.6449396312236786
Iteration 8 complete. Error: -1.6449396312236786 Total: 18.6744; Orientation: 1.0190; Line Search: 13.4641
Adding measurement 7663655e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.916e+03, gradient 2.408e-04, dot -0.409; [740f7a50-26cc-4a3f-b32b-2a87db92fdda = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6449396312236786, -0.4455181509256363, -0.19228297472000122, -0.002966076135635376
LBFGS Accumulation History: 3 points
Removed measurement 7663655e to history. Total: 3
th(0)=-1.6449396312236786;dx=-5.7989646036422964E-8
New Minimum: -1.6449396312236786 > -1.682378813624382
WOLF (strong): th(1.5120000000000004E7)=-1.682378813624382; dx=2.090505232054194E-8 evalInputDelta=0.03743918240070343
New Minimum: -1.682378813624382 > -1.7343720644712448
WOLF (strong): th(7560000.000000002)=-1.7343720644712448; dx=1.7217983266315458E-9 evalInputDelta=0.08943243324756622
END: th(2520000.0000000005)=-1.7013754099607468; dx=-3.210403770517619E-8 evalInputDelta=0.056435778737068176
Fitness changed from -1.6449396312236786 to -1.7343720644712448
Iteration 9 complete. Error: -1.7343720644712448 Total: 22.4449; Orientation: 1.0131; Line Search: 17.3747
Adding measurement 4f6c24f9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.157e+03, gradient 1.696e-04, dot -0.514; [740f7a50-26cc-4a3f-b32b-2a87db92fdda = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7343720644712448, -0.4455181509256363, -0.19228297472000122, -0.002966076135635376
LBFGS Accumulation History: 3 points
Removed measurement 4f6c24f9 to history. Total: 3
th(0)=-1.7343720644712448;dx=-2.8768047004168413E-8
New Minimum: -1.7343720644712448 > -1.7895484864711761
END: th(5429175.418880348)=-1.7895484864711761; dx=-1.237712992400876E-8 evalInputDelta=0.055176421999931335
Fitness changed from -1.7343720644712448 to -1.7895484864711761
Iteration 10 complete. Error: -1.7895484864711761 Total: 14.4799; Orientation: 1.0279; Line Search: 9.1980
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0963f5df-04a3-4f03-afd6-dfd2ccbc1cea.jpg)
Final threshold in iteration 11: -1.7895484864711761 (> -Infinity) after 207.580s (< 5400.000s)
Returns
-1.7895484864711761