BasicOptimizer.scala:89 executed in 284.10 seconds (4.146 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: 643358517605100
Reset training subject: 643364092324300
Adding measurement 6d5a8db6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-37.71154863534369;dx=-1.7170384106719153E-6
New Minimum: -37.71154863534369 > -37.71155063810547
END: th(2.154434690031884)=-37.71155063810547; dx=-1.4854523272066212E-6 evalInputDelta=2.0027617821938293E-6
Fitness changed from -37.71154863534369 to -37.71155063810547
Iteration 1 complete. Error: -37.71155063810547 Total: 28.9595; Orientation: 0.1423; Line Search: 11.9420
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/66b87c95-5e7d-4758-befa-53e1d4f5d0bd.jpg)
Adding measurement 1d1c5d65 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-37.71155063810547;dx=-1.482102178838836E-6
New Minimum: -37.71155063810547 > -37.71156065191276
WOLFE (weak): th(4.641588833612779)=-37.71156065191276; dx=-1.4826900304966502E-6 evalInputDelta=1.0013807290931709E-5
New Minimum: -37.71156065191276 > -37.71156866295668
WOLFE (weak): th(9.283177667225559)=-37.71156866295668; dx=-1.480888702481717E-6 evalInputDelta=1.802485120805386E-5
New Minimum: -37.71156866295668 > -37.71159870435621
WOLFE (weak): th(27.849533001676676)=-37.71159870435621; dx=-1.4803111154175949E-6 evalInputDelta=4.8066250741385375E-5
New Minimum: -37.71159870435621 > -37.711738897237616
WOLFE (weak): th(111.3981320067067)=-37.711738897237616; dx=-1.4798094706420506E-6 evalInputDelta=1.8825913214470802E-4
New Minimum: -37.711738897237616 > -37.712473899958475
WOLFE (weak): th(556.9906600335335)=-37.712473899958475; dx=-1.4792092658943472E-6 evalInputDelta=9.232618530035097E-4
New Minimum: -37.712473899958475 > -37.71707184800839
WOLFE (weak): th(3341.9439602012008)=-37.71707184800839; dx=-1.479519011485762E-6 evalInputDelta=0.005521209902916269
New Minimum: -37.71707184800839 > -37.75016614395793
WOLFE (weak): th(23393.607721408407)=-37.75016614395793; dx=-1.477740840063159E-6 evalInputDelta=0.0386155058524551
New Minimum: -37.75016614395793 > -38.018768625266674
WOLFE (weak): th(187148.86177126726)=-38.018768625266674; dx=-1.4609309215671482E-6 evalInputDelta=0.3072179871612022
New Minimum: -38.018768625266674 > -40.30667261616098
END: th(1684339.7559414054)=-40.30667261616098; dx=-1.2717475763309036E-6 evalInputDelta=2.5951219780555093
Fitness changed from -37.71155063810547 to -40.30667261616098
Iteration 2 complete. Error: -40.30667261616098 Total: 65.4297; Orientation: 0.1426; Line Search: 58.4257
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c755ee6a-62c8-4740-9451-b7bfbd356760.jpg)
Adding measurement 26d7d3ff to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-40.30667261616098;dx=-1.2112780654968353E-6
New Minimum: -40.30667261616098 > -44.39289940496048
END: th(3628800.0000000005)=-44.39289940496048; dx=-8.362469341511508E-7 evalInputDelta=4.0862267887995
Fitness changed from -40.30667261616098 to -44.39289940496048
Iteration 3 complete. Error: -44.39289940496048 Total: 18.7364; Orientation: 0.1357; Line Search: 11.8706
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a2b5943d-48ac-42db-83e3-c66b8011e6d3.jpg)
Adding measurement 3fa0ea71 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.024e+04, gradient 8.883e-04, dot -0.831; [1171cc55-c30f-435e-a625-e7c078724598 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.39289940496048, -40.30667261616098, -37.71155063810547, -37.71154863534369
LBFGS Accumulation History: 3 points
Removed measurement 3fa0ea71 to history. Total: 3
th(0)=-44.39289940496048;dx=-7.891301478215128E-7
New Minimum: -44.39289940496048 > -49.80718798228391
END: th(7818012.603187701)=-49.80718798228391; dx=-4.7107652303276164E-7 evalInputDelta=5.4142885773234255
Fitness changed from -44.39289940496048 to -49.80718798228391
Iteration 4 complete. Error: -49.80718798228391 Total: 21.1645; Orientation: 2.4827; Line Search: 11.8346
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/144185ad-d2ea-4a46-b097-50eb092d81b5.jpg)
Adding measurement 62b1b6ff to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.794e+03, gradient 7.730e-04, dot -0.644; [1171cc55-c30f-435e-a625-e7c078724598 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.80718798228391, -40.30667261616098, -37.71155063810547, -37.71154863534369
LBFGS Accumulation History: 3 points
Removed measurement 62b1b6ff to history. Total: 3
th(0)=-49.80718798228391;dx=-5.970394978541869E-7
New Minimum: -49.80718798228391 > -56.29816632035977
END: th(1.6843397559414055E7)=-56.29816632035977; dx=-1.9562556933410535E-7 evalInputDelta=6.4909783380758626
Fitness changed from -49.80718798228391 to -56.29816632035977
Iteration 5 complete. Error: -56.29816632035977 Total: 20.6524; Orientation: 2.4598; Line Search: 11.3880
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/032d8170-8e28-4a7f-9433-ce6f03b468e4.jpg)
Adding measurement 4a2281d0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.489e+04, gradient 9.207e-04, dot -0.403; [1171cc55-c30f-435e-a625-e7c078724598 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.29816632035977, -40.30667261616098, -37.71155063810547, -37.71154863534369
LBFGS Accumulation History: 3 points
Removed measurement 4a2281d0 to history. Total: 3
th(0)=-56.29816632035977;dx=-8.474531918054346E-7
Armijo: th(3.628800000000001E7)=-55.62449166484872; dx=1.516324720351919E-7 evalInputDelta=-0.67367465551105
New Minimum: -56.29816632035977 > -59.47383367551881
WOLF (strong): th(1.8144000000000004E7)=-59.47383367551881; dx=1.7477983818306555E-7 evalInputDelta=3.1756673551590424
New Minimum: -59.47383367551881 > -60.13911127503222
END: th(6048000.000000001)=-60.13911127503222; dx=-2.7771959794238344E-7 evalInputDelta=3.8409449546724517
Fitness changed from -56.29816632035977 to -60.13911127503222
Iteration 6 complete. Error: -60.13911127503222 Total: 32.5681; Orientation: 2.3821; Line Search: 23.4096
Adding measurement 423d0165 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.348e+04, gradient 6.843e-04, dot -0.650; [1171cc55-c30f-435e-a625-e7c078724598 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.13911127503222, -40.30667261616098, -37.71155063810547, -37.71154863534369
LBFGS Accumulation History: 3 points
Removed measurement 423d0165 to history. Total: 3
th(0)=-60.13911127503222;dx=-4.6648731223497544E-7
New Minimum: -60.13911127503222 > -64.28923554650972
END: th(1.3030021005312836E7)=-64.28923554650972; dx=-1.6832536737847116E-7 evalInputDelta=4.150124271477495
Fitness changed from -60.13911127503222 to -64.28923554650972
Iteration 7 complete. Error: -64.28923554650972 Total: 19.1268; Orientation: 2.3438; Line Search: 11.1547
Adding measurement 19512b0c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.050e+04, gradient 8.117e-04, dot -0.505; [1171cc55-c30f-435e-a625-e7c078724598 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.28923554650972, -40.30667261616098, -37.71155063810547, -37.71154863534369
LBFGS Accumulation History: 3 points
Removed measurement 19512b0c to history. Total: 3
th(0)=-64.28923554650972;dx=-6.588501244695725E-7
New Minimum: -64.28923554650972 > -65.2203829707095
WOLF (strong): th(2.8072329265690096E7)=-65.2203829707095; dx=1.240578478978821E-7 evalInputDelta=0.9311474241997786
New Minimum: -65.2203829707095 > -67.33687173604888
WOLF (strong): th(1.4036164632845048E7)=-67.33687173604888; dx=8.14787299389036E-8 evalInputDelta=3.047636189539162
END: th(4678721.544281683)=-66.83860926223848; dx=-3.1033655525828444E-7 evalInputDelta=2.5493737157287626
Fitness changed from -64.28923554650972 to -67.33687173604888
Iteration 8 complete. Error: -67.33687173604888 Total: 31.3192; Orientation: 2.4039; Line Search: 23.2437
Adding measurement 473db0fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.075e+04, gradient 9.446e-04, dot -0.361; [1171cc55-c30f-435e-a625-e7c078724598 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.33687173604888, -40.30667261616098, -37.71155063810547, -37.71154863534369
LBFGS Accumulation History: 3 points
Removed measurement 473db0fb to history. Total: 3
th(0)=-67.33687173604888;dx=-8.913819478700856E-7
New Minimum: -67.33687173604888 > -72.27460199188128
WOLF (strong): th(1.0080000000000004E7)=-72.27460199188128; dx=5.0025148275504256E-8 evalInputDelta=4.937730255832406
END: th(5040000.000000002)=-71.23530933689005; dx=-4.658683702868226E-7 evalInputDelta=3.898437600841177
Fitness changed from -67.33687173604888 to -72.27460199188128
Iteration 9 complete. Error: -72.27460199188128 Total: 26.0213; Orientation: 2.3700; Line Search: 17.9726
Adding measurement 65ccbd0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.638e+04, gradient 7.442e-04, dot -0.518; [1171cc55-c30f-435e-a625-e7c078724598 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.27460199188128, -40.30667261616098, -37.71155063810547, -37.71154863534369
LBFGS Accumulation History: 3 points
Removed measurement 65ccbd0 to history. Total: 3
th(0)=-72.27460199188128;dx=-5.533216130563252E-7
New Minimum: -72.27460199188128 > -75.46323395489456
END: th(1.0858350837760698E7)=-75.46323395489456; dx=-1.9551685345397746E-8 evalInputDelta=3.188631963013279
Fitness changed from -72.27460199188128 to -75.46323395489456
Iteration 10 complete. Error: -75.46323395489456 Total: 19.2032; Orientation: 2.3912; Line Search: 11.2637
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1eccedd1-5ac4-48d3-ae2f-8f964e4307c2.jpg)
Final threshold in iteration 11: -75.46323395489456 (> -Infinity) after 284.097s (< 5400.000s)
Returns
-75.46323395489456