BasicOptimizer.scala:89 executed in 94.86 seconds (1.533 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: 288970389487200
Reset training subject: 288972369781200
Corrupt weights measurement
LBFGS Accumulation History: 0 points
Constructing line search parameters: GD+Trust
New Minimum: -52.5866300335243 > -52.644285708912015
th(0)=-52.644285708912015;dx=-4.9163522791661975E-6
New Minimum: -52.644285708912015 > -52.64428748897201
END: th(2.154434690031884)=-52.64428748897201; dx=-3.360102719473939E-6 evalInputDelta=1.7800599962924935E-6
Fitness changed from -52.5866300335243 to -52.64428748897201
Iteration 1 complete. Error: -52.64428748897201 Total: 9.6373; Orientation: 0.0365; Line Search: 3.8058
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/803beaf0-d89f-4899-9a9d-4161c195f725.jpg)
Adding measurement 52258734 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-52.64428748897201;dx=-3.3676344985230405E-6
New Minimum: -52.64428748897201 > -52.644308849687334
WOLFE (weak): th(4.641588833612779)=-52.644308849687334; dx=-3.367599073772914E-6 evalInputDelta=2.1360715322771284E-5
New Minimum: -52.644308849687334 > -52.644323090159396
WOLFE (weak): th(9.283177667225559)=-52.644323090159396; dx=-3.3676049981631914E-6 evalInputDelta=3.560118738477058E-5
New Minimum: -52.644323090159396 > -52.644383612122695
WOLFE (weak): th(27.849533001676676)=-52.644383612122695; dx=-3.3676179270323127E-6 evalInputDelta=9.612315068352473E-5
New Minimum: -52.644383612122695 > -52.64466486033331
WOLFE (weak): th(111.3981320067067)=-52.64466486033331; dx=-3.3676608263481313E-6 evalInputDelta=3.773713612957863E-4
New Minimum: -52.64466486033331 > -52.64616897873944
WOLFE (weak): th(556.9906600335335)=-52.64616897873944; dx=-3.3675711487670414E-6 evalInputDelta=0.0018814897674275244
New Minimum: -52.64616897873944 > -52.65554338491481
WOLFE (weak): th(3341.9439602012008)=-52.65554338491481; dx=-3.3666731946053218E-6 evalInputDelta=0.011255895942795746
New Minimum: -52.65554338491481 > -52.723001635867064
WOLFE (weak): th(23393.607721408407)=-52.723001635867064; dx=-3.3617947104802904E-6 evalInputDelta=0.0787141468950523
New Minimum: -52.723001635867064 > -53.268311157621575
WOLFE (weak): th(187148.86177126726)=-53.268311157621575; dx=-3.295837296881567E-6 evalInputDelta=0.6240236686495635
New Minimum: -53.268311157621575 > -57.75049901424828
END: th(1684339.7559414054)=-57.75049901424828; dx=-2.6843821759657077E-6 evalInputDelta=5.106211525276265
Fitness changed from -52.64428748897201 to -57.75049901424828
Iteration 2 complete. Error: -57.75049901424828 Total: 21.3910; Orientation: 0.0584; Line Search: 19.0357
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/52b51381-c758-48c5-9390-7b61b463edaa.jpg)
Adding measurement 15fc43bc to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-57.75049901424828;dx=-2.435195763659084E-6
New Minimum: -57.75049901424828 > -64.99717661666861
END: th(3628800.0000000005)=-64.99717661666861; dx=-1.5476809106670442E-6 evalInputDelta=7.246677602420334
Fitness changed from -57.75049901424828 to -64.99717661666861
Iteration 3 complete. Error: -64.99717661666861 Total: 6.1913; Orientation: 0.0579; Line Search: 3.7714
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/81534d4b-0f91-4e48-a911-ab312c418704.jpg)
Adding measurement 396ecca1 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-64.99717661666861;dx=-1.4998138383470025E-6
New Minimum: -64.99717661666861 > -73.57718696420625
END: th(7818012.603187701)=-73.57718696420625; dx=-7.272206751516855E-7 evalInputDelta=8.580010347537637
Fitness changed from -64.99717661666861 to -73.57718696420625
Iteration 4 complete. Error: -73.57718696420625 Total: 6.0399; Orientation: 0.0543; Line Search: 3.7810
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d538fd34-3e60-4ef3-97df-14725f82c4c8.jpg)
Adding measurement 7c1cecba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.271e+04, gradient 1.060e-03, dot -0.709; [837228ac-b1bc-4133-98c7-c85c34ffc884 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.57718696420625, -64.99717661666861, -57.75049901424828, -52.64428748897201
LBFGS Accumulation History: 3 points
Removed measurement 7c1cecba to history. Total: 3
th(0)=-73.57718696420625;dx=-1.122688895456505E-6
New Minimum: -73.57718696420625 > -81.16144550673502
END: th(1.6843397559414055E7)=-81.16144550673502; dx=-9.132984311051656E-8 evalInputDelta=7.584258542528772
Fitness changed from -73.57718696420625 to -81.16144550673502
Iteration 5 complete. Error: -81.16144550673502 Total: 7.1669; Orientation: 1.0126; Line Search: 3.7993
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1c6b427c-d715-40d3-87af-e31ba99af300.jpg)
Adding measurement 24cdb3b3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.947e+04, gradient 1.279e-03, dot -0.451; [837228ac-b1bc-4133-98c7-c85c34ffc884 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.16144550673502, -64.99717661666861, -57.75049901424828, -52.64428748897201
LBFGS Accumulation History: 3 points
Removed measurement 24cdb3b3 to history. Total: 3
th(0)=-81.16144550673502;dx=-1.6357469209805114E-6
Armijo: th(3.628800000000001E7)=-75.92749773696598; dx=3.7071377564105296E-7 evalInputDelta=-5.2339477697690455
New Minimum: -81.16144550673502 > -84.32246670207239
WOLF (strong): th(1.8144000000000004E7)=-84.32246670207239; dx=5.333694065955473E-7 evalInputDelta=3.1610211953373692
New Minimum: -84.32246670207239 > -87.52125421964851
END: th(6048000.000000001)=-87.52125421964851; dx=-4.138310057222156E-7 evalInputDelta=6.359808712913491
Fitness changed from -81.16144550673502 to -87.52125421964851
Iteration 6 complete. Error: -87.52125421964851 Total: 11.4286; Orientation: 0.9935; Line Search: 7.6882
Adding measurement 20690486 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.119e+04, gradient 8.807e-04, dot -0.604; [837228ac-b1bc-4133-98c7-c85c34ffc884 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.52125421964851, -64.99717661666861, -57.75049901424828, -52.64428748897201
LBFGS Accumulation History: 3 points
Removed measurement 20690486 to history. Total: 3
th(0)=-87.52125421964851;dx=-7.756833388118213E-7
New Minimum: -87.52125421964851 > -92.18283878706684
END: th(1.3030021005312836E7)=-92.18283878706684; dx=-4.798337927572439E-8 evalInputDelta=4.6615845674183305
Fitness changed from -87.52125421964851 to -92.18283878706684
Iteration 7 complete. Error: -92.18283878706684 Total: 6.4087; Orientation: 0.9935; Line Search: 3.6305
Adding measurement 1af0d280 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.485e+04, gradient 1.076e-03, dot -0.464; [837228ac-b1bc-4133-98c7-c85c34ffc884 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.18283878706684, -64.99717661666861, -57.75049901424828, -52.64428748897201
LBFGS Accumulation History: 3 points
Removed measurement 1af0d280 to history. Total: 3
th(0)=-92.18283878706684;dx=-1.1567263978373346E-6
Armijo: th(2.8072329265690096E7)=-88.85125932510063; dx=3.5439779588152963E-7 evalInputDelta=-3.3315794619662142
New Minimum: -92.18283878706684 > -94.54887559608505
WOLF (strong): th(1.4036164632845048E7)=-94.54887559608505; dx=4.145238360476581E-7 evalInputDelta=2.366036809018212
New Minimum: -94.54887559608505 > -95.91436718473814
END: th(4678721.544281683)=-95.91436718473814; dx=-3.9347431514592633E-7 evalInputDelta=3.7315283976712976
Fitness changed from -92.18283878706684 to -95.91436718473814
Iteration 8 complete. Error: -95.91436718473814 Total: 10.6431; Orientation: 0.9677; Line Search: 7.5652
Adding measurement 15032c9f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.184e+04, gradient 7.001e-04, dot -0.680; [837228ac-b1bc-4133-98c7-c85c34ffc884 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.91436718473814, -64.99717661666861, -57.75049901424828, -52.64428748897201
LBFGS Accumulation History: 3 points
Removed measurement 15032c9f to history. Total: 3
th(0)=-95.91436718473814;dx=-4.901487875511885E-7
New Minimum: -95.91436718473814 > -99.40536177790484
END: th(1.0080000000000004E7)=-99.40536177790484; dx=-2.281429539171179E-7 evalInputDelta=3.490994593166704
Fitness changed from -95.91436718473814 to -99.40536177790484
Iteration 9 complete. Error: -99.40536177790484 Total: 6.8598; Orientation: 0.9459; Line Search: 3.7658
Adding measurement 2ae2ccff to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.442e+04, gradient 7.656e-04, dot -0.592; [837228ac-b1bc-4133-98c7-c85c34ffc884 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -99.40536177790484, -64.99717661666861, -57.75049901424828, -52.64428748897201
LBFGS Accumulation History: 3 points
Removed measurement 2ae2ccff to history. Total: 3
th(0)=-99.40536177790484;dx=-5.861688995624834E-7
New Minimum: -99.40536177790484 > -101.57144075796273
WOLF (strong): th(2.1716701675521396E7)=-101.57144075796273; dx=1.0283565373965563E-7 evalInputDelta=2.1660789800578897
New Minimum: -101.57144075796273 > -102.1420796928968
END: th(1.0858350837760698E7)=-102.1420796928968; dx=-2.5500985543567853E-8 evalInputDelta=2.7367179149919565
Fitness changed from -99.40536177790484 to -102.1420796928968
Iteration 10 complete. Error: -102.1420796928968 Total: 8.7364; Orientation: 1.0100; Line Search: 5.8655
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/2aa536e9-4835-439d-b292-86750305850d.jpg)
Final threshold in iteration 11: -102.1420796928968 (> -Infinity) after 94.855s (< 5400.000s)
Returns
-102.1420796928968