BasicOptimizer.scala:89 executed in 60.70 seconds (0.741 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: 143154838241600
Reset training subject: 143155731351200
Adding measurement 5d67c977 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-238.41804475018245;dx=-0.016171768009939164
New Minimum: -238.41804475018245 > -238.45675708605953
WOLFE (weak): th(2.154434690031884)=-238.45675708605953; dx=-0.01571121299745855 evalInputDelta=0.03871233587707934
New Minimum: -238.45675708605953 > -238.49546313819053
WOLFE (weak): th(4.308869380063768)=-238.49546313819053; dx=-0.015715301243425704 evalInputDelta=0.0774183880080841
New Minimum: -238.49546313819053 > -238.65024912253915
WOLFE (weak): th(12.926608140191302)=-238.65024912253915; dx=-0.015717300364720705 evalInputDelta=0.23220437235670488
New Minimum: -238.65024912253915 > -239.34693862936706
WOLFE (weak): th(51.70643256076521)=-239.34693862936706; dx=-0.01570087409843998 evalInputDelta=0.9288938791846135
New Minimum: -239.34693862936706 > -243.06108575057834
WOLFE (weak): th(258.53216280382605)=-243.06108575057834; dx=-0.015682230222555785 evalInputDelta=4.643041000395897
New Minimum: -243.06108575057834 > -265.9900873387954
WOLFE (weak): th(1551.1929768229563)=-265.9900873387954; dx=-0.015307937873265278 evalInputDelta=27.57204258861293
New Minimum: -265.9900873387954 > -399.2674346537669
END: th(10858.350837760694)=-399.2674346537669; dx=-0.010399882304534272 evalInputDelta=160.84938990358444
Fitness changed from -238.41804475018245 to -399.2674346537669
Iteration 1 complete. Error: -399.2674346537669 Total: 9.7069; Orientation: 0.0144; Line Search: 7.1449
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9135209b-81fa-4ffd-ad53-6ef4cb0fe3b2.jpg)
Adding measurement 15fc4ad4 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-399.2674346537669;dx=-0.01525307244891599
New Minimum: -399.2674346537669 > -658.7114789496233
END: th(23393.607721408407)=-658.7114789496233; dx=-0.005833146434465577 evalInputDelta=259.4440442958564
Fitness changed from -399.2674346537669 to -658.7114789496233
Iteration 2 complete. Error: -658.7114789496233 Total: 2.6561; Orientation: 0.0157; Line Search: 1.7340
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/0e4bc20d-51be-4eea-a301-e5ecb1877f21.jpg)
Adding measurement 106935eb to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-658.7114789496233;dx=-0.014471378403554147
New Minimum: -658.7114789496233 > -973.9229949025744
END: th(50400.00000000001)=-973.9229949025744; dx=-0.0022942023699589324 evalInputDelta=315.2115159529511
Fitness changed from -658.7114789496233 to -973.9229949025744
Iteration 3 complete. Error: -973.9229949025744 Total: 2.6403; Orientation: 0.0151; Line Search: 1.7111
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f2a61e07-c086-4f61-a740-dcab86822894.jpg)
Adding measurement 97b7df0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.110e+04, gradient 1.329e-01, dot -0.309; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -973.9229949025744, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 97b7df0 to history. Total: 3
th(0)=-973.9229949025744;dx=-0.017642677827921265
New Minimum: -973.9229949025744 > -1135.8969473504187
WOLF (strong): th(108583.50837760697)=-1135.8969473504187; dx=8.259492276969961E-4 evalInputDelta=161.97395244784434
New Minimum: -1135.8969473504187 > -1283.95643422976
END: th(54291.75418880348)=-1283.95643422976; dx=-3.2963204656358627E-4 evalInputDelta=310.03343932718553
Fitness changed from -973.9229949025744 to -1283.95643422976
Iteration 4 complete. Error: -1283.95643422976 Total: 3.7914; Orientation: 0.2908; Line Search: 2.5974
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/fe827979-6a7d-40d5-bfcb-2a38a0c96aff.jpg)
Adding measurement 5777b708 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.404e+04, gradient 1.390e-01, dot -0.265; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1283.95643422976, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 5777b708 to history. Total: 3
th(0)=-1283.95643422976;dx=-0.01927399210131865
New Minimum: -1283.95643422976 > -1326.9317051001533
WOLF (strong): th(116968.03860704206)=-1326.9317051001533; dx=0.001896499562076055 evalInputDelta=42.97527087039339
New Minimum: -1326.9317051001533 > -1614.4254395914356
WOLF (strong): th(58484.01930352103)=-1614.4254395914356; dx=0.0014605308153650522 evalInputDelta=330.4690053616757
END: th(19494.673101173677)=-1586.9111506319439; dx=-0.007444222316820091 evalInputDelta=302.954716402184
Fitness changed from -1283.95643422976 to -1614.4254395914356
Iteration 5 complete. Error: -1614.4254395914356 Total: 5.0496; Orientation: 0.3668; Line Search: 3.5072
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0657de21-5ae9-487c-96db-5b2fc73f1559.jpg)
Adding measurement 4397d72c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.458e+04, gradient 1.424e-01, dot -0.215; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1614.4254395914356, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 4397d72c to history. Total: 3
th(0)=-1614.4254395914356;dx=-0.020255686779624006
New Minimum: -1614.4254395914356 > -2020.8947275897376
END: th(42000.000000000015)=-2020.8947275897376; dx=-1.8869716275197085E-4 evalInputDelta=406.469287998302
Fitness changed from -1614.4254395914356 to -2020.8947275897376
Iteration 6 complete. Error: -2020.8947275897376 Total: 2.9231; Orientation: 0.2865; Line Search: 1.7293
Adding measurement 2b00c41f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.804e+04, gradient 1.313e-01, dot -0.289; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2020.8947275897376, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 2b00c41f to history. Total: 3
th(0)=-2020.8947275897376;dx=-0.01722873317545867
Armijo: th(90486.25698133915)=-1957.9950842634921; dx=0.0034603772431356207 evalInputDelta=-62.899643326245496
New Minimum: -2020.8947275897376 > -2263.2139757433456
WOLF (strong): th(45243.12849066957)=-2263.2139757433456; dx=0.0012340782404249963 evalInputDelta=242.319248153608
END: th(15081.04283022319)=-2222.524015618279; dx=-0.00809105085539699 evalInputDelta=201.6292880285414
Fitness changed from -2020.8947275897376 to -2263.2139757433456
Iteration 7 complete. Error: -2263.2139757433456 Total: 4.6817; Orientation: 0.2841; Line Search: 3.5687
Adding measurement 1a55e27b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.303e+04, gradient 1.430e-01, dot -0.267; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2263.2139757433456, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 1a55e27b to history. Total: 3
th(0)=-2263.2139757433456;dx=-0.020435151893289157
New Minimum: -2263.2139757433456 > -2500.9407230080446
WOLF (strong): th(32491.12183528946)=-2500.9407230080446; dx=0.0011387817611051255 evalInputDelta=237.72674726469904
END: th(16245.56091764473)=-2492.687104311329; dx=-0.006136557765971608 evalInputDelta=229.47312856798362
Fitness changed from -2263.2139757433456 to -2500.9407230080446
Iteration 8 complete. Error: -2500.9407230080446 Total: 3.7257; Orientation: 0.2753; Line Search: 2.6332
Adding measurement 4f7ad92c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.674e+05, gradient 1.319e-01, dot -0.326; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2500.9407230080446, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 4f7ad92c to history. Total: 3
th(0)=-2500.9407230080446;dx=-0.01735802369003807
New Minimum: -2500.9407230080446 > -2698.3977653415
WOLF (strong): th(35000.000000000015)=-2698.3977653415; dx=0.0013835573992914399 evalInputDelta=197.45704233345532
New Minimum: -2698.3977653415 > -2699.239337294861
END: th(17500.000000000007)=-2699.239337294861; dx=-0.005300672607504213 evalInputDelta=198.29861428681625
Fitness changed from -2500.9407230080446 to -2699.239337294861
Iteration 9 complete. Error: -2699.239337294861 Total: 3.8148; Orientation: 0.3110; Line Search: 2.6686
Adding measurement 1b59bf55 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.802e+05, gradient 1.057e-01, dot -0.420; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2699.239337294861, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 1b59bf55 to history. Total: 3
th(0)=-2699.239337294861;dx=-0.011103603094345296
New Minimum: -2699.239337294861 > -2884.3433394795425
END: th(37702.607075557986)=-2884.3433394795425; dx=-0.0031894450755761486 evalInputDelta=185.10400218468158
Fitness changed from -2699.239337294861 to -2884.3433394795425
Iteration 10 complete. Error: -2884.3433394795425 Total: 2.9962; Orientation: 0.4005; Line Search: 1.8038
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/8d28abac-d840-4e77-b9a5-4cc53a377d63.jpg)
Adding measurement 56a3b5c5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.555e+05, gradient 1.184e-01, dot -0.381; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2884.3433394795425, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 56a3b5c5 to history. Total: 3
th(0)=-2884.3433394795425;dx=-0.013979398977899415
New Minimum: -2884.3433394795425 > -2923.3761304354935
WOLF (strong): th(81227.80458822368)=-2923.3761304354935; dx=4.8659813903089366E-4 evalInputDelta=39.032790955950986
New Minimum: -2923.3761304354935 > -3012.8879833143483
END: th(40613.90229411184)=-3012.8879833143483; dx=-7.861300767910719E-4 evalInputDelta=128.5446438348058
Fitness changed from -2884.3433394795425 to -3012.8879833143483
Iteration 11 complete. Error: -3012.8879833143483 Total: 3.7304; Orientation: 0.2813; Line Search: 2.5337
Adding measurement 2474e7be to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.392e+06, gradient 1.299e-01, dot -0.338; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3012.8879833143483, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 2474e7be to history. Total: 3
th(0)=-3012.8879833143483;dx=-0.01685667521929555
Armijo: th(87500.00000000006)=-2872.8860053959675; dx=0.0029606776114963086 evalInputDelta=-140.00197791838082
New Minimum: -3012.8879833143483 > -3148.391176458224
WOLF (strong): th(43750.00000000003)=-3148.391176458224; dx=0.0020193495061950895 evalInputDelta=135.5031931438757
New Minimum: -3148.391176458224 > -3168.8633608914097
END: th(14583.333333333343)=-3168.8633608914097; dx=-0.005995209356244983 evalInputDelta=155.9753775770614
Fitness changed from -3012.8879833143483 to -3168.8633608914097
Iteration 12 complete. Error: -3168.8633608914097 Total: 4.4767; Orientation: 0.2754; Line Search: 3.4115
Adding measurement 29f8c3a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.853e+06, gradient 1.089e-01, dot -0.408; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3168.8633608914097, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 29f8c3a1 to history. Total: 3
th(0)=-3168.8633608914097;dx=-0.011762304109303654
New Minimum: -3168.8633608914097 > -3325.6551234305703
END: th(31418.83922963166)=-3325.6551234305703; dx=-0.0033045531647334925 evalInputDelta=156.79176253916057
Fitness changed from -3168.8633608914097 to -3325.6551234305703
Iteration 13 complete. Error: -3325.6551234305703 Total: 2.9551; Orientation: 0.2627; Line Search: 1.6462
Adding measurement 290a342b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.268e+05, gradient 1.122e-01, dot -0.323; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3325.6551234305703, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 290a342b to history. Total: 3
th(0)=-3325.6551234305703;dx=-0.01256879899761176
New Minimum: -3325.6551234305703 > -3429.8307538419444
END: th(67689.83715685307)=-3429.8307538419444; dx=-3.832840393366787E-4 evalInputDelta=104.17563041137419
Fitness changed from -3325.6551234305703 to -3429.8307538419444
Iteration 14 complete. Error: -3429.8307538419444 Total: 2.8129; Orientation: 0.2777; Line Search: 1.6943
Adding measurement 1e70000 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.031e+06, gradient 1.442e-01, dot -0.280; [28babb24-3c30-44f7-befe-c9bd7e7eb242 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3429.8307538419444, -658.7114789496233, -399.2674346537669, -238.41804475018245
LBFGS Accumulation History: 3 points
Removed measurement 1e70000 to history. Total: 3
th(0)=-3429.8307538419444;dx=-0.02067715065120538
Armijo: th(145833.33333333343)=-2674.3145850853075; dx=0.003585921847208403 evalInputDelta=-755.516168756637
Armijo: th(72916.66666666672)=-3307.1983611510213; dx=0.005026426088987931 evalInputDelta=-122.6323926909231
New Minimum: -3429.8307538419444 > -3674.0440933663276
END: th(24305.555555555573)=-3674.0440933663276; dx=-0.002710048934721292 evalInputDelta=244.21333952438317
Fitness changed from -3429.8307538419444 to -3674.0440933663276
Iteration 15 complete. Error: -3674.0440933663276 Total: 4.5197; Orientation: 0.2737; Line Search: 3.4512
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/0108aef5-b0de-4d9e-b503-ec78d6620fe6.jpg)
Final threshold in iteration 16: -3674.0440933663276 (> -Infinity) after 60.703s (< 5400.000s)
Returns
-3674.0440933663276