BasicOptimizer.scala:89 executed in 309.21 seconds (4.208 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: 655231551634600
Reset training subject: 655237850401400
Adding measurement 70435b2e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-39.14208601310633;dx=-1.685073822571743E-6
New Minimum: -39.14208601310633 > -39.14208987223875
END: th(2.154434690031884)=-39.14208987223875; dx=-1.4747724331288995E-6 evalInputDelta=3.8591324198478105E-6
Fitness changed from -39.14208601310633 to -39.14208987223875
Iteration 1 complete. Error: -39.14208987223875 Total: 32.5324; Orientation: 0.1549; Line Search: 13.3990
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7d5cf686-7f92-48d0-8c13-8ba8ac990ed7.jpg)
Adding measurement 64b3db05 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-39.14208987223875;dx=-1.4726554262286013E-6
New Minimum: -39.14208987223875 > -39.14209759050243
WOLFE (weak): th(4.641588833612779)=-39.14209759050243; dx=-1.4717979016206576E-6 evalInputDelta=7.718263681510962E-6
New Minimum: -39.14209759050243 > -39.1421053087646
WOLFE (weak): th(9.283177667225559)=-39.1421053087646; dx=-1.471860662102334E-6 evalInputDelta=1.5436525849565896E-5
New Minimum: -39.1421053087646 > -39.14213811136182
WOLFE (weak): th(27.849533001676676)=-39.14213811136182; dx=-1.4709038001754762E-6 evalInputDelta=4.823912306761713E-5
New Minimum: -39.14213811136182 > -39.14227125103303
WOLFE (weak): th(111.3981320067067)=-39.14227125103303; dx=-1.471002253696863E-6 evalInputDelta=1.813787942808176E-4
New Minimum: -39.14227125103303 > -39.143000616848155
WOLFE (weak): th(556.9906600335335)=-39.143000616848155; dx=-1.4707312810881999E-6 evalInputDelta=9.107446094063221E-4
New Minimum: -39.143000616848155 > -39.14754823418541
WOLFE (weak): th(3341.9439602012008)=-39.14754823418541; dx=-1.4703418969091095E-6 evalInputDelta=0.0054583619466583855
New Minimum: -39.14754823418541 > -39.18027858154689
WOLFE (weak): th(23393.607721408407)=-39.18027858154689; dx=-1.468074817011053E-6 evalInputDelta=0.03818870930813745
New Minimum: -39.18027858154689 > -39.44603592015268
WOLFE (weak): th(187148.86177126726)=-39.44603592015268; dx=-1.4531643190755542E-6 evalInputDelta=0.3039460479139322
New Minimum: -39.44603592015268 > -41.72107001556326
END: th(1684339.7559414054)=-41.72107001556326; dx=-1.2775555660206028E-6 evalInputDelta=2.5789801433245074
Fitness changed from -39.14208987223875 to -41.72107001556326
Iteration 2 complete. Error: -41.72107001556326 Total: 69.7903; Orientation: 0.1485; Line Search: 62.3173
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6d2b7e3a-5cdf-41e5-af2c-cf3ebfb3a8fd.jpg)
Adding measurement 11859315 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-41.72107001556326;dx=-1.215874885152274E-6
New Minimum: -41.72107001556326 > -45.84215460243086
END: th(3628800.0000000005)=-45.84215460243086; dx=-8.577372814114345E-7 evalInputDelta=4.121084586867603
Fitness changed from -41.72107001556326 to -45.84215460243086
Iteration 3 complete. Error: -45.84215460243086 Total: 20.7973; Orientation: 0.1487; Line Search: 12.9139
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c9f08a62-bbba-455e-ad66-adeeaae436de.jpg)
Adding measurement 27614b01 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.101e+04, gradient 8.925e-04, dot -0.849; [db62bf8d-8554-4b1a-8a02-c53321fd957a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.84215460243086, -41.72107001556326, -39.14208987223875, -39.14208601310633
LBFGS Accumulation History: 3 points
Removed measurement 27614b01 to history. Total: 3
th(0)=-45.84215460243086;dx=-7.955690689488022E-7
New Minimum: -45.84215460243086 > -51.29614775962341
END: th(7818012.603187701)=-51.29614775962341; dx=-4.7468542314276427E-7 evalInputDelta=5.453993157192549
Fitness changed from -45.84215460243086 to -51.29614775962341
Iteration 4 complete. Error: -51.29614775962341 Total: 22.7053; Orientation: 2.6480; Line Search: 12.8153
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/dc2bb895-286d-431a-bc89-77ff191cbd16.jpg)
Adding measurement 4d1d52e7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.344e+03, gradient 7.557e-04, dot -0.648; [db62bf8d-8554-4b1a-8a02-c53321fd957a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.29614775962341, -41.72107001556326, -39.14208987223875, -39.14208601310633
LBFGS Accumulation History: 3 points
Removed measurement 4d1d52e7 to history. Total: 3
th(0)=-51.29614775962341;dx=-5.70271978007173E-7
New Minimum: -51.29614775962341 > -57.83265354986392
END: th(1.6843397559414055E7)=-57.83265354986392; dx=-2.036394846675371E-7 evalInputDelta=6.536505790240511
Fitness changed from -51.29614775962341 to -57.83265354986392
Iteration 5 complete. Error: -57.83265354986392 Total: 22.5198; Orientation: 2.5839; Line Search: 12.9157
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ab01041f-b46a-42c8-b781-2f3743bbff5c.jpg)
Adding measurement 5fdae18b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.455e+04, gradient 8.693e-04, dot -0.423; [db62bf8d-8554-4b1a-8a02-c53321fd957a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -57.83265354986392, -41.72107001556326, -39.14208987223875, -39.14208601310633
LBFGS Accumulation History: 3 points
Removed measurement 5fdae18b to history. Total: 3
th(0)=-57.83265354986392;dx=-7.551504689378386E-7
New Minimum: -57.83265354986392 > -58.05128148140571
WOLF (strong): th(3.628800000000001E7)=-58.05128148140571; dx=1.31841451435722E-7 evalInputDelta=0.21862793154178917
New Minimum: -58.05128148140571 > -61.18484693572579
WOLF (strong): th(1.8144000000000004E7)=-61.18484693572579; dx=1.2803404883454176E-7 evalInputDelta=3.3521933858618667
New Minimum: -61.18484693572579 > -61.32163219035161
END: th(6048000.000000001)=-61.32163219035161; dx=-2.750098226790901E-7 evalInputDelta=3.4889786404876872
Fitness changed from -57.83265354986392 to -61.32163219035161
Iteration 6 complete. Error: -61.32163219035161 Total: 34.4948; Orientation: 2.5598; Line Search: 24.5249
Adding measurement 2ac4bc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.161e+04, gradient 6.607e-04, dot -0.659; [db62bf8d-8554-4b1a-8a02-c53321fd957a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.32163219035161, -41.72107001556326, -39.14208987223875, -39.14208601310633
LBFGS Accumulation History: 3 points
Removed measurement 2ac4bc to history. Total: 3
th(0)=-61.32163219035161;dx=-4.362018946913533E-7
New Minimum: -61.32163219035161 > -65.41085807609318
END: th(1.3030021005312836E7)=-65.41085807609318; dx=-1.8514815559842684E-7 evalInputDelta=4.08922588574157
Fitness changed from -61.32163219035161 to -65.41085807609318
Iteration 7 complete. Error: -65.41085807609318 Total: 21.1474; Orientation: 2.5536; Line Search: 12.4691
Adding measurement 67b50cfb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.934e+04, gradient 7.742e-04, dot -0.530; [db62bf8d-8554-4b1a-8a02-c53321fd957a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.41085807609318, -41.72107001556326, -39.14208987223875, -39.14208601310633
LBFGS Accumulation History: 3 points
Removed measurement 67b50cfb to history. Total: 3
th(0)=-65.41085807609318;dx=-5.987533392398657E-7
New Minimum: -65.41085807609318 > -67.1574923350329
WOLF (strong): th(2.8072329265690096E7)=-67.1574923350329; dx=8.63591135410041E-8 evalInputDelta=1.7466342589397215
New Minimum: -67.1574923350329 > -68.54150023068595
WOLF (strong): th(1.4036164632845048E7)=-68.54150023068595; dx=3.653118578374724E-8 evalInputDelta=3.1306421545927776
END: th(4678721.544281683)=-67.75433483313488; dx=-3.0204952959759807E-7 evalInputDelta=2.3434767570416994
Fitness changed from -65.41085807609318 to -68.54150023068595
Iteration 8 complete. Error: -68.54150023068595 Total: 33.0653; Orientation: 2.5054; Line Search: 24.7389
Adding measurement 4ebff5d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.000e+04, gradient 9.034e-04, dot -0.382; [db62bf8d-8554-4b1a-8a02-c53321fd957a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.54150023068595, -41.72107001556326, -39.14208987223875, -39.14208601310633
LBFGS Accumulation History: 3 points
Removed measurement 4ebff5d to history. Total: 3
th(0)=-68.54150023068595;dx=-8.156431166172053E-7
New Minimum: -68.54150023068595 > -73.1030523513
WOLF (strong): th(1.0080000000000004E7)=-73.1030523513; dx=2.6506959219219704E-8 evalInputDelta=4.561552120614039
END: th(5040000.000000002)=-72.09466238449696; dx=-4.3092504666073746E-7 evalInputDelta=3.5531621538110016
Fitness changed from -68.54150023068595 to -73.1030523513
Iteration 9 complete. Error: -73.1030523513 Total: 28.4188; Orientation: 2.7141; Line Search: 19.4145
Adding measurement 1fa8ed04 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.539e+04, gradient 7.329e-04, dot -0.527; [db62bf8d-8554-4b1a-8a02-c53321fd957a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.1030523513, -41.72107001556326, -39.14208987223875, -39.14208601310633
LBFGS Accumulation History: 3 points
Removed measurement 1fa8ed04 to history. Total: 3
th(0)=-73.1030523513;dx=-5.366804905862404E-7
New Minimum: -73.1030523513 > -76.22234651115998
END: th(1.0858350837760698E7)=-76.22234651115998; dx=-2.5228391198170705E-8 evalInputDelta=3.11929415985999
Fitness changed from -73.1030523513 to -76.22234651115998
Iteration 10 complete. Error: -76.22234651115998 Total: 22.7307; Orientation: 2.8362; Line Search: 13.6067
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b33ce304-5582-4953-976e-d98cb5bbf77e.jpg)
Final threshold in iteration 11: -76.22234651115998 (> -Infinity) after 309.212s (< 5400.000s)
Returns
-76.22234651115998