BasicOptimizer.scala:89 executed in 134.06 seconds (1.637 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: 326736393480900
Reset training subject: 326739106051600
Adding measurement 2086dfb8 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-28.07513112445855;dx=-2.4661889598753786E-5
New Minimum: -28.07513112445855 > -28.07519124384568
WOLFE (weak): th(2.154434690031884)=-28.07519124384568; dx=-2.4090095718051416E-5 evalInputDelta=6.011938712902065E-5
New Minimum: -28.07519124384568 > -28.075251363104073
WOLFE (weak): th(4.308869380063768)=-28.075251363104073; dx=-2.4087118994991796E-5 evalInputDelta=1.2023864552190844E-4
New Minimum: -28.075251363104073 > -28.07549398594588
WOLFE (weak): th(12.926608140191302)=-28.07549398594588; dx=-2.409127516770506E-5 evalInputDelta=3.628614873285585E-4
New Minimum: -28.07549398594588 > -28.076580395257807
WOLFE (weak): th(51.70643256076521)=-28.076580395257807; dx=-2.4091776303269782E-5 evalInputDelta=0.0014492707992559417
New Minimum: -28.076580395257807 > -28.082375657232824
WOLFE (weak): th(258.53216280382605)=-28.082375657232824; dx=-2.4093444119486238E-5 evalInputDelta=0.007244532774272727
New Minimum: -28.082375657232824 > -28.11860462452756
WOLFE (weak): th(1551.1929768229563)=-28.11860462452756; dx=-2.4089489330830974E-5 evalInputDelta=0.04347350006900896
New Minimum: -28.11860462452756 > -28.3790592488809
WOLFE (weak): th(10858.350837760694)=-28.3790592488809; dx=-2.4014849898051436E-5 evalInputDelta=0.30392812442234884
New Minimum: -28.3790592488809 > -30.470817521150533
WOLFE (weak): th(86866.80670208555)=-30.470817521150533; dx=-2.3168377730105582E-5 evalInputDelta=2.395686396691982
New Minimum: -30.470817521150533 > -43.735436857352454
END: th(781801.26031877)=-43.735436857352454; dx=-1.0429135960932184E-5 evalInputDelta=15.660305732893903
Fitness changed from -28.07513112445855 to -43.735436857352454
Iteration 1 complete. Error: -43.735436857352454 Total: 34.4437; Orientation: 0.3565; Line Search: 26.1752
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/11343142-84bd-4393-8844-4af5b6f135d6.jpg)
Adding measurement 752ccee0 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-43.735436857352454;dx=-1.887002759109046E-5
New Minimum: -43.735436857352454 > -62.749001917979065
END: th(1684339.7559414052)=-62.749001917979065; dx=-3.890389439096676E-6 evalInputDelta=19.01356506062661
Fitness changed from -43.735436857352454 to -62.749001917979065
Iteration 2 complete. Error: -62.749001917979065 Total: 8.0835; Orientation: 0.0643; Line Search: 5.0928
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6379bde3-9d29-4642-b56b-a8037ab8eaa5.jpg)
Adding measurement 49e11ca7 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-62.749001917979065;dx=-1.8338996492842076E-5
New Minimum: -62.749001917979065 > -79.01707193560985
WOLF (strong): th(3628800.0)=-79.01707193560985; dx=1.213428224256575E-6 evalInputDelta=16.268070017630784
New Minimum: -79.01707193560985 > -79.3328116727816
END: th(1814400.0)=-79.3328116727816; dx=-1.685266916659446E-6 evalInputDelta=16.583809754802537
Fitness changed from -62.749001917979065 to -79.3328116727816
Iteration 3 complete. Error: -79.3328116727816 Total: 11.4752; Orientation: 0.0642; Line Search: 8.2003
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/dfd69b07-3049-4c28-8d3b-df69bec81c32.jpg)
Adding measurement 601ebfa1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.449e+04, gradient 4.090e-03, dot -0.541; [870f395a-4cf6-4f80-b54f-b9f2beb28962 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.3328116727816, -62.749001917979065, -43.735436857352454, -28.07513112445855
LBFGS Accumulation History: 3 points
Removed measurement 601ebfa1 to history. Total: 3
th(0)=-79.3328116727816;dx=-1.6712533250270955E-5
New Minimum: -79.3328116727816 > -90.83852419054355
WOLF (strong): th(3909006.30159385)=-90.83852419054355; dx=2.764215063700548E-6 evalInputDelta=11.50571251776195
New Minimum: -90.83852419054355 > -94.81824871013691
END: th(1954503.150796925)=-94.81824871013691; dx=-3.246162601253622E-7 evalInputDelta=15.485437037355311
Fitness changed from -79.3328116727816 to -94.81824871013691
Iteration 4 complete. Error: -94.81824871013691 Total: 12.2343; Orientation: 1.2588; Line Search: 7.9260
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/bdd0f128-928b-445f-89c1-df23c46b24f8.jpg)
Adding measurement 1be66706 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.282e+04, gradient 3.867e-03, dot -0.481; [870f395a-4cf6-4f80-b54f-b9f2beb28962 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -94.81824871013691, -62.749001917979065, -43.735436857352454, -28.07513112445855
LBFGS Accumulation History: 3 points
Removed measurement 1be66706 to history. Total: 3
th(0)=-94.81824871013691;dx=-1.4944139571761986E-5
New Minimum: -94.81824871013691 > -102.81009770360964
WOLF (strong): th(4210849.389853513)=-102.81009770360964; dx=3.6059241589563754E-6 evalInputDelta=7.991848993472729
New Minimum: -102.81009770360964 > -109.23560673241354
WOLF (strong): th(2105424.6949267564)=-109.23560673241354; dx=4.0615358313631417E-7 evalInputDelta=14.41735802227663
END: th(701808.2316422522)=-104.11860493482767; dx=-8.299335649041838E-6 evalInputDelta=9.30035622469076
Fitness changed from -94.81824871013691 to -109.23560673241354
Iteration 5 complete. Error: -109.23560673241354 Total: 14.5194; Orientation: 1.1733; Line Search: 10.4816
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8cb53422-2a76-45af-9843-ec013d483809.jpg)
Adding measurement 6d234853 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.814e+04, gradient 3.661e-03, dot -0.487; [870f395a-4cf6-4f80-b54f-b9f2beb28962 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -109.23560673241354, -62.749001917979065, -43.735436857352454, -28.07513112445855
LBFGS Accumulation History: 3 points
Removed measurement 6d234853 to history. Total: 3
th(0)=-109.23560673241354;dx=-1.3387936405176445E-5
New Minimum: -109.23560673241354 > -122.19976487459448
END: th(1512000.0)=-122.19976487459448; dx=-2.2611010392323194E-6 evalInputDelta=12.964158142180935
Fitness changed from -109.23560673241354 to -122.19976487459448
Iteration 6 complete. Error: -122.19976487459448 Total: 9.2513; Orientation: 1.1370; Line Search: 5.2034
Adding measurement 5739cbc8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.959e+04, gradient 2.816e-03, dot -0.606; [870f395a-4cf6-4f80-b54f-b9f2beb28962 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -122.19976487459448, -62.749001917979065, -43.735436857352454, -28.07513112445855
LBFGS Accumulation History: 3 points
Removed measurement 5739cbc8 to history. Total: 3
th(0)=-122.19976487459448;dx=-7.929818159029444E-6
New Minimum: -122.19976487459448 > -133.87897704166534
END: th(3257505.2513282085)=-133.87897704166534; dx=-1.6991515253070507E-7 evalInputDelta=11.679212167070858
Fitness changed from -122.19976487459448 to -133.87897704166534
Iteration 7 complete. Error: -133.87897704166534 Total: 8.9450; Orientation: 1.2306; Line Search: 5.2201
Adding measurement 20afcc5c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.522e+04, gradient 3.666e-03, dot -0.413; [870f395a-4cf6-4f80-b54f-b9f2beb28962 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -133.87897704166534, -62.749001917979065, -43.735436857352454, -28.07513112445855
LBFGS Accumulation History: 3 points
Removed measurement 20afcc5c to history. Total: 3
th(0)=-133.87897704166534;dx=-1.34337340503709E-5
Armijo: th(7018082.316422523)=-120.14730768118424; dx=5.090922960164595E-6 evalInputDelta=-13.731669360481092
New Minimum: -133.87897704166534 > -140.85227394876247
WOLF (strong): th(3509041.1582112615)=-140.85227394876247; dx=4.426820518508665E-6 evalInputDelta=6.9732969070971365
New Minimum: -140.85227394876247 > -145.47632842916468
END: th(1169680.3860704205)=-145.47632842916468; dx=-3.956227617861061E-6 evalInputDelta=11.597351387499344
Fitness changed from -133.87897704166534 to -145.47632842916468
Iteration 8 complete. Error: -145.47632842916468 Total: 14.1362; Orientation: 1.0500; Line Search: 10.5291
Adding measurement 3fabd4e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.679e+04, gradient 2.301e-03, dot -0.650; [870f395a-4cf6-4f80-b54f-b9f2beb28962 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -145.47632842916468, -62.749001917979065, -43.735436857352454, -28.07513112445855
LBFGS Accumulation History: 3 points
Removed measurement 3fabd4e2 to history. Total: 3
th(0)=-145.47632842916468;dx=-5.293742720235928E-6
New Minimum: -145.47632842916468 > -155.90833290548477
END: th(2520000.0000000005)=-155.90833290548477; dx=-2.45645697545998E-6 evalInputDelta=10.432004476320088
Fitness changed from -145.47632842916468 to -155.90833290548477
Iteration 9 complete. Error: -155.90833290548477 Total: 8.9884; Orientation: 1.1294; Line Search: 5.2914
Adding measurement 64f91f6f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.904e+04, gradient 2.406e-03, dot -0.588; [870f395a-4cf6-4f80-b54f-b9f2beb28962 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -155.90833290548477, -62.749001917979065, -43.735436857352454, -28.07513112445855
LBFGS Accumulation History: 3 points
Removed measurement 64f91f6f to history. Total: 3
th(0)=-155.90833290548477;dx=-5.78078276874047E-6
New Minimum: -155.90833290548477 > -164.71824258057276
WOLF (strong): th(5429175.418880348)=-164.71824258057276; dx=5.039361287575375E-7 evalInputDelta=8.809909675087994
END: th(2714587.709440174)=-164.66360843227196; dx=-9.365298726724152E-7 evalInputDelta=8.755275526787187
Fitness changed from -155.90833290548477 to -164.71824258057276
Iteration 10 complete. Error: -164.71824258057276 Total: 11.4811; Orientation: 1.2059; Line Search: 7.8181
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e7b0d578-5f86-4916-b4d0-b3bb6cd6fe66.jpg)
Final threshold in iteration 11: -164.71824258057276 (> -Infinity) after 134.056s (< 5400.000s)
Returns
-164.71824258057276