BasicOptimizer.scala:89 executed in 132.38 seconds (1.656 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: 31568339549900
Reset training subject: 31571098005000
Adding measurement 4461bcab to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-75.68363399902583;dx=-4.746624633592005E-6
New Minimum: -75.68363399902583 > -75.68364304164064
END: th(2.154434690031884)=-75.68364304164064; dx=-3.322495425859355E-6 evalInputDelta=9.042614806276106E-6
Fitness changed from -75.68363399902583 to -75.68364304164064
Iteration 1 complete. Error: -75.68364304164064 Total: 13.0010; Orientation: 0.0641; Line Search: 5.1327
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/971eef32-1b90-4558-8938-d1f92ad85678.jpg)
Adding measurement 3335c3dc to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-75.68364304164064;dx=-3.2958294240651375E-6
New Minimum: -75.68364304164064 > -75.683661126867
WOLFE (weak): th(4.641588833612779)=-75.683661126867; dx=-3.2942732782123577E-6 evalInputDelta=1.8085226358266482E-5
New Minimum: -75.683661126867 > -75.68367469078393
WOLFE (weak): th(9.283177667225559)=-75.68367469078393; dx=-3.2935459124675067E-6 evalInputDelta=3.164914329545354E-5
New Minimum: -75.68367469078393 > -75.68374929228361
WOLFE (weak): th(27.849533001676676)=-75.68374929228361; dx=-3.2918056068101444E-6 evalInputDelta=1.0625064297187237E-4
New Minimum: -75.68374929228361 > -75.6840635220357
WOLFE (weak): th(111.3981320067067)=-75.6840635220357; dx=-3.2904933590724643E-6 evalInputDelta=4.2048039506425994E-4
New Minimum: -75.6840635220357 > -75.68574542025571
WOLFE (weak): th(556.9906600335335)=-75.68574542025571; dx=-3.289449961286884E-6 evalInputDelta=0.0021023786150777823
New Minimum: -75.68574542025571 > -75.69626321829334
WOLFE (weak): th(3341.9439602012008)=-75.69626321829334; dx=-3.289094381114453E-6 evalInputDelta=0.012620176652703208
New Minimum: -75.69626321829334 > -75.77190626696846
WOLFE (weak): th(23393.607721408407)=-75.77190626696846; dx=-3.2834108045707545E-6 evalInputDelta=0.08826322532782171
New Minimum: -75.77190626696846 > -76.38302722500221
WOLFE (weak): th(187148.86177126726)=-76.38302722500221; dx=-3.2193483786526878E-6 evalInputDelta=0.6993841833615733
New Minimum: -76.38302722500221 > -81.37941250192846
END: th(1684339.7559414054)=-81.37941250192846; dx=-2.5663050635114213E-6 evalInputDelta=5.695769460287821
Fitness changed from -75.68364304164064 to -81.37941250192846
Iteration 2 complete. Error: -81.37941250192846 Total: 29.5014; Orientation: 0.0621; Line Search: 26.2411
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f2da4210-760c-4962-8d68-6e711825b4f8.jpg)
Adding measurement 7d8c2de8 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-81.37941250192846;dx=-2.45771624493232E-6
New Minimum: -81.37941250192846 > -89.26745766098027
END: th(3628800.0000000005)=-89.26745766098027; dx=-1.4237712812577345E-6 evalInputDelta=7.8880451590518135
Fitness changed from -81.37941250192846 to -89.26745766098027
Iteration 3 complete. Error: -89.26745766098027 Total: 8.3572; Orientation: 0.0613; Line Search: 5.3484
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/eb1eedca-8a45-4896-8b41-e2c462ec6c12.jpg)
Adding measurement 74f62734 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.541e+03, gradient 1.233e-03, dot -0.704; [33e82c9c-c07e-49ec-80fe-b03a8bdf7079 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.26745766098027, -81.37941250192846, -75.68364304164064, -75.68363399902583
LBFGS Accumulation History: 3 points
Removed measurement 74f62734 to history. Total: 3
th(0)=-89.26745766098027;dx=-1.5193841880776044E-6
New Minimum: -89.26745766098027 > -98.76819342841213
END: th(7818012.603187701)=-98.76819342841213; dx=-6.853793477978203E-7 evalInputDelta=9.500735767431863
Fitness changed from -89.26745766098027 to -98.76819342841213
Iteration 4 complete. Error: -98.76819342841213 Total: 9.4959; Orientation: 1.0672; Line Search: 5.3114
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a549e63f-83ca-4feb-a284-2f91023b784f.jpg)
Adding measurement 2e769d21 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.280e+04, gradient 1.183e-03, dot -0.517; [33e82c9c-c07e-49ec-80fe-b03a8bdf7079 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.76819342841213, -81.37941250192846, -75.68364304164064, -75.68363399902583
LBFGS Accumulation History: 3 points
Removed measurement 2e769d21 to history. Total: 3
th(0)=-98.76819342841213;dx=-1.3977379970393577E-6
New Minimum: -98.76819342841213 > -102.7001033960619
WOLF (strong): th(1.6843397559414055E7)=-102.7001033960619; dx=2.8751678612161753E-7 evalInputDelta=3.931909967649773
New Minimum: -102.7001033960619 > -104.34755093966423
END: th(8421698.779707028)=-104.34755093966423; dx=-6.149023213727676E-8 evalInputDelta=5.579357511252098
Fitness changed from -98.76819342841213 to -104.34755093966423
Iteration 5 complete. Error: -104.34755093966423 Total: 11.8678; Orientation: 1.0346; Line Search: 7.7131
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/038a98dd-7ca4-44fd-bbd2-c7a588fc6563.jpg)
Adding measurement 3423841e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.172e+04, gradient 1.425e-03, dot -0.331; [33e82c9c-c07e-49ec-80fe-b03a8bdf7079 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -104.34755093966423, -81.37941250192846, -75.68364304164064, -75.68363399902583
LBFGS Accumulation History: 3 points
Removed measurement 3423841e to history. Total: 3
th(0)=-104.34755093966423;dx=-2.0295778663905423E-6
Armijo: th(1.8144000000000004E7)=-97.2404638636025; dx=9.289849718102998E-7 evalInputDelta=-7.107087076061731
New Minimum: -104.34755093966423 > -107.47218525543938
WOLF (strong): th(9072000.000000002)=-107.47218525543938; dx=8.126508295709952E-7 evalInputDelta=3.124634315775154
New Minimum: -107.47218525543938 > -109.30051911493597
END: th(3024000.0000000005)=-109.30051911493597; dx=-7.80402952560964E-7 evalInputDelta=4.952968175271735
Fitness changed from -104.34755093966423 to -109.30051911493597
Iteration 6 complete. Error: -109.30051911493597 Total: 14.5275; Orientation: 1.0308; Line Search: 10.4225
Adding measurement 2de227a4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.201e+04, gradient 9.159e-04, dot -0.675; [33e82c9c-c07e-49ec-80fe-b03a8bdf7079 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -109.30051911493597, -81.37941250192846, -75.68364304164064, -75.68363399902583
LBFGS Accumulation History: 3 points
Removed measurement 2de227a4 to history. Total: 3
th(0)=-109.30051911493597;dx=-8.382733018885701E-7
New Minimum: -109.30051911493597 > -113.89935777082185
END: th(6515010.502656418)=-113.89935777082185; dx=-4.530447783541891E-7 evalInputDelta=4.598838655885885
Fitness changed from -109.30051911493597 to -113.89935777082185
Iteration 7 complete. Error: -113.89935777082185 Total: 8.9493; Orientation: 0.9796; Line Search: 5.4382
Adding measurement 524ceb6e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.617e+04, gradient 9.496e-04, dot -0.604; [33e82c9c-c07e-49ec-80fe-b03a8bdf7079 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -113.89935777082185, -81.37941250192846, -75.68364304164064, -75.68363399902583
LBFGS Accumulation History: 3 points
Removed measurement 524ceb6e to history. Total: 3
th(0)=-113.89935777082185;dx=-9.015305147024435E-7
New Minimum: -113.89935777082185 > -117.74791474416014
WOLF (strong): th(1.4036164632845048E7)=-117.74791474416014; dx=6.95922732261858E-8 evalInputDelta=3.8485569733382903
END: th(7018082.316422524)=-117.62566658001424; dx=-1.7726949933865545E-7 evalInputDelta=3.726308809192389
Fitness changed from -113.89935777082185 to -117.74791474416014
Iteration 8 complete. Error: -117.74791474416014 Total: 11.1507; Orientation: 1.0288; Line Search: 7.6992
Adding measurement 13e2c4c8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.853e+04, gradient 1.441e-03, dot -0.247; [33e82c9c-c07e-49ec-80fe-b03a8bdf7079 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -117.74791474416014, -81.37941250192846, -75.68364304164064, -75.68363399902583
LBFGS Accumulation History: 3 points
Removed measurement 13e2c4c8 to history. Total: 3
th(0)=-117.74791474416014;dx=-2.077453828315829E-6
Armijo: th(1.5120000000000006E7)=-113.33882832748198; dx=1.3096215058823238E-6 evalInputDelta=-4.409086416678164
New Minimum: -117.74791474416014 > -123.69360388393267
WOLF (strong): th(7560000.000000003)=-123.69360388393267; dx=6.630747124485556E-7 evalInputDelta=5.945689139772526
END: th(2520000.000000001)=-122.57812589492781; dx=-1.2400842664779408E-6 evalInputDelta=4.830211150767667
Fitness changed from -117.74791474416014 to -123.69360388393267
Iteration 9 complete. Error: -123.69360388393267 Total: 13.8370; Orientation: 0.9986; Line Search: 10.1512
Adding measurement ad2f7ba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.512e+04, gradient 1.302e-03, dot -0.298; [33e82c9c-c07e-49ec-80fe-b03a8bdf7079 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -123.69360388393267, -81.37941250192846, -75.68364304164064, -75.68363399902583
LBFGS Accumulation History: 3 points
Removed measurement ad2f7ba to history. Total: 3
th(0)=-123.69360388393267;dx=-1.6942860095159034E-6
New Minimum: -123.69360388393267 > -128.34484497615003
WOLF (strong): th(5429175.418880349)=-128.34484497615003; dx=2.1351728815120388E-7 evalInputDelta=4.6512410922173615
END: th(2714587.7094401745)=-127.60830342149151; dx=-7.70241665406984E-7 evalInputDelta=3.914699537558846
Fitness changed from -123.69360388393267 to -128.34484497615003
Iteration 10 complete. Error: -128.34484497615003 Total: 11.2389; Orientation: 1.0026; Line Search: 7.5462
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b25f9f8f-3910-4262-9bba-6d2a81b19c37.jpg)
Final threshold in iteration 11: -128.34484497615003 (> -Infinity) after 132.376s (< 5400.000s)
Returns
-128.34484497615003