Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

BasicOptimizer.scala:89 executed in 61.55 seconds (1.267 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
Logging
Reset training subject: 141465007493600
Reset training subject: 141465886441400
Adding measurement 2a0c1d27 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-40.32589257914433;dx=-0.00862040422329706
New Minimum: -40.32589257914433 > -40.3411008643209
WOLFE (weak): th(2.154434690031884)=-40.3411008643209; dx=-0.008405544684415539 evalInputDelta=0.015208285176569802
New Minimum: -40.3411008643209 > -40.356301905843964
WOLFE (weak): th(4.308869380063768)=-40.356301905843964; dx=-0.008503668150940067 evalInputDelta=0.030409326699633255
New Minimum: -40.356301905843964 > -40.41719538287123
WOLFE (weak): th(12.926608140191302)=-40.41719538287123; dx=-0.008514075058918533 evalInputDelta=0.09130280372689725
New Minimum: -40.41719538287123 > -40.690930574941234
WOLFE (weak): th(51.70643256076521)=-40.690930574941234; dx=-0.00851325856379997 evalInputDelta=0.36503799579690366
New Minimum: -40.690930574941234 > -42.16070329517464
WOLFE (weak): th(258.53216280382605)=-42.16070329517464; dx=-0.008515874423215735 evalInputDelta=1.8348107160303115
New Minimum: -42.16070329517464 > -51.01436397752353
WOLFE (weak): th(1551.1929768229563)=-51.01436397752353; dx=-0.00802980123364097 evalInputDelta=10.6884713983792
New Minimum: -51.01436397752353 > -92.68112545510547
END: th(10858.350837760694)=-92.68112545510547; dx=-0.00428155767692159 evalInputDelta=52.35523287596114
Fitness changed from -40.32589257914433 to -92.68112545510547
Iteration 1 complete. Error: -92.68112545510547 Total: 10.0757; Orientation: 0.0147; Line Search: 6.7956
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c7df6c96-b42f-46f1-9527-48be44afec39.jpg)
Adding measurement 17861d97 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-92.68112545510547;dx=-0.010512409080734152
New Minimum: -92.68112545510547 > -191.26826914376048
END: th(23393.607721408407)=-191.26826914376048; dx=-0.0023238622342171868 evalInputDelta=98.587143688655
Fitness changed from -92.68112545510547 to -191.26826914376048
Iteration 2 complete. Error: -191.26826914376048 Total: 2.7924; Orientation: 0.0149; Line Search: 1.8494
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/9f5151e6-acd8-48ca-8bc9-f16021cb41f9.jpg)
Adding measurement 2b3ff345 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-191.26826914376048;dx=-0.018424854598649485
New Minimum: -191.26826914376048 > -314.70946422851665
WOLF (strong): th(50400.00000000001)=-314.70946422851665; dx=2.71467464674743E-4 evalInputDelta=123.44119508475617
END: th(25200.000000000004)=-305.83870340426176; dx=-0.0026091711019651225 evalInputDelta=114.57043426050129
Fitness changed from -191.26826914376048 to -314.70946422851665
Iteration 3 complete. Error: -314.70946422851665 Total: 3.4959; Orientation: 0.0149; Line Search: 2.5491
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a0e1dfa9-f6fe-44b4-8af7-9fb032984759.jpg)
Adding measurement 7b1cbbb9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.386e+03, gradient 1.301e-01, dot -0.149; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -314.70946422851665, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 7b1cbbb9 to history. Total: 3
th(0)=-314.70946422851665;dx=-0.016873963025392145
New Minimum: -314.70946422851665 > -417.60150337971726
WOLF (strong): th(54291.75418880348)=-417.60150337971726; dx=2.2503782558249102E-5 evalInputDelta=102.8920391512006
New Minimum: -417.60150337971726 > -453.1435685850567
END: th(27145.87709440174)=-453.1435685850567; dx=-0.0022439494651912972 evalInputDelta=138.43410435654005
Fitness changed from -314.70946422851665 to -453.1435685850567
Iteration 4 complete. Error: -453.1435685850567 Total: 3.8562; Orientation: 0.3077; Line Search: 2.6411
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/43a8a565-7c2b-4899-af24-5c2243dc12d6.jpg)
Adding measurement 110c1b97 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.087e+04, gradient 1.165e-01, dot -0.156; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -453.1435685850567, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 110c1b97 to history. Total: 3
th(0)=-453.1435685850567;dx=-0.013540902035166984
New Minimum: -453.1435685850567 > -497.3012008581922
WOLF (strong): th(58484.01930352103)=-497.3012008581922; dx=9.075932565459111E-4 evalInputDelta=44.157632273135505
New Minimum: -497.3012008581922 > -566.1574703649153
END: th(29242.009651760516)=-566.1574703649153; dx=-8.166874641869157E-4 evalInputDelta=113.0139017798586
Fitness changed from -453.1435685850567 to -566.1574703649153
Iteration 5 complete. Error: -566.1574703649153 Total: 3.9032; Orientation: 0.2763; Line Search: 2.7365
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/13f37235-00b6-4ae5-8a05-576531f054ac.jpg)
Adding measurement 4e67d1d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.527e+04, gradient 1.378e-01, dot -0.162; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -566.1574703649153, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 4e67d1d to history. Total: 3
th(0)=-566.1574703649153;dx=-0.01897462055999532
Armijo: th(63000.00000000002)=-520.2236297978014; dx=4.684152508268361E-4 evalInputDelta=-45.93384056711386
New Minimum: -566.1574703649153 > -616.4602075560109
END: th(31500.00000000001)=-616.4602075560109; dx=-2.2407739459641998E-4 evalInputDelta=50.302737191095616
Fitness changed from -566.1574703649153 to -616.4602075560109
Iteration 6 complete. Error: -616.4602075560109 Total: 3.7846; Orientation: 0.2752; Line Search: 2.6086
Adding measurement 3468cbfe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.969e+04, gradient 1.205e-01, dot -0.178; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -616.4602075560109, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 3468cbfe to history. Total: 3
th(0)=-616.4602075560109;dx=-0.01449450226146791
New Minimum: -616.4602075560109 > -653.0519935273148
WOLF (strong): th(67864.69273600436)=-653.0519935273148; dx=0.0018156863541380318 evalInputDelta=36.59178597130392
New Minimum: -653.0519935273148 > -762.9676025232002
WOLF (strong): th(33932.34636800218)=-762.9676025232002; dx=3.064890082614874E-5 evalInputDelta=146.50739496718927
END: th(11310.782122667393)=-729.0413225599767; dx=-0.007986455435733762 evalInputDelta=112.5811150039658
Fitness changed from -616.4602075560109 to -762.9676025232002
Iteration 7 complete. Error: -762.9676025232002 Total: 4.4849; Orientation: 0.2905; Line Search: 3.3954
Adding measurement 5bfaee7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.863e+04, gradient 1.294e-01, dot -0.164; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -762.9676025232002, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 5bfaee7 to history. Total: 3
th(0)=-762.9676025232002;dx=-0.016717023326572225
New Minimum: -762.9676025232002 > -868.4470694866786
END: th(24368.3413764671)=-868.4470694866786; dx=-0.0014590919377993022 evalInputDelta=105.47946696347844
Fitness changed from -762.9676025232002 to -868.4470694866786
Iteration 8 complete. Error: -868.4470694866786 Total: 2.9462; Orientation: 0.2624; Line Search: 1.7220
Adding measurement 2511a424 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.479e+04, gradient 1.160e-01, dot -0.234; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -868.4470694866786, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 2511a424 to history. Total: 3
th(0)=-868.4470694866786;dx=-0.013434861857390335
Armijo: th(52500.00000000002)=-847.7835808742701; dx=0.0027069934911590847 evalInputDelta=-20.663488612408514
New Minimum: -868.4470694866786 > -954.6100643718355
WOLF (strong): th(26250.00000000001)=-954.6100643718355; dx=1.371845171355509E-5 evalInputDelta=86.16299488515688
END: th(8750.000000000004)=-940.2338472422698; dx=-0.006627610779274372 evalInputDelta=71.78677775559117
Fitness changed from -868.4470694866786 to -954.6100643718355
Iteration 9 complete. Error: -954.6100643718355 Total: 4.5493; Orientation: 0.2876; Line Search: 3.4322
Adding measurement 52341283 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.544e+04, gradient 1.446e-01, dot -0.178; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -954.6100643718355, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 52341283 to history. Total: 3
th(0)=-954.6100643718355;dx=-0.020816568139806327
New Minimum: -954.6100643718355 > -1003.7651929111709
WOLF (strong): th(18851.303537778993)=-1003.7651929111709; dx=7.733838735618233E-4 evalInputDelta=49.15512853933535
New Minimum: -1003.7651929111709 > -1034.086009478902
END: th(9425.651768889496)=-1034.086009478902; dx=-0.0019279517374028341 evalInputDelta=79.47594510706654
Fitness changed from -954.6100643718355 to -1034.086009478902
Iteration 10 complete. Error: -1034.086009478902 Total: 3.7752; Orientation: 0.2746; Line Search: 2.6859
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/5025c437-9da9-4aa6-8d45-ecc43cbf29a7.jpg)
Adding measurement 56fb5bfa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.840e+04, gradient 1.041e-01, dot -0.272; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1034.086009478902, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 56fb5bfa to history. Total: 3
th(0)=-1034.086009478902;dx=-0.010800697498141758
New Minimum: -1034.086009478902 > -1098.413059827677
END: th(20306.95114705592)=-1098.413059827677; dx=-0.001999427591497407 evalInputDelta=64.32705034877495
Fitness changed from -1034.086009478902 to -1098.413059827677
Iteration 11 complete. Error: -1098.413059827677 Total: 2.8892; Orientation: 0.2682; Line Search: 1.6787
Adding measurement 3e4ab855 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.734e+04, gradient 1.188e-01, dot -0.245; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1098.413059827677, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 3e4ab855 to history. Total: 3
th(0)=-1098.413059827677;dx=-0.014081688986120364
Armijo: th(43750.00000000003)=-1038.5371322201242; dx=3.909435276936693E-4 evalInputDelta=-59.87592760755274
New Minimum: -1098.413059827677 > -1121.1290068497915
WOLF (strong): th(21875.000000000015)=-1121.1290068497915; dx=4.644790538133173E-4 evalInputDelta=22.715947022114506
New Minimum: -1121.1290068497915 > -1147.4551189480135
END: th(7291.6666666666715)=-1147.4551189480135; dx=-0.004266774313755828 evalInputDelta=49.04205912033649
Fitness changed from -1098.413059827677 to -1147.4551189480135
Iteration 12 complete. Error: -1147.4551189480135 Total: 4.5103; Orientation: 0.2835; Line Search: 3.3799
Adding measurement 3422a2b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.106e+05, gradient 9.389e-02, dot -0.318; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1147.4551189480135, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 3422a2b to history. Total: 3
th(0)=-1147.4551189480135;dx=-0.008797219764539796
New Minimum: -1147.4551189480135 > -1202.0172107752867
END: th(15709.41961481583)=-1202.0172107752867; dx=-0.004325748686840109 evalInputDelta=54.56209182727321
Fitness changed from -1147.4551189480135 to -1202.0172107752867
Iteration 13 complete. Error: -1202.0172107752867 Total: 2.9544; Orientation: 0.2799; Line Search: 1.8530
Adding measurement 6645ab41 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.141e+05, gradient 9.467e-02, dot -0.317; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1202.0172107752867, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 6645ab41 to history. Total: 3
th(0)=-1202.0172107752867;dx=-0.008936715209788868
New Minimum: -1202.0172107752867 > -1264.6623561251438
END: th(33844.918578426536)=-1264.6623561251438; dx=-0.002350587637436157 evalInputDelta=62.6451453498571
Fitness changed from -1202.0172107752867 to -1264.6623561251438
Iteration 14 complete. Error: -1264.6623561251438 Total: 2.8285; Orientation: 0.2688; Line Search: 1.7608
Adding measurement 13b64f85 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.912e+05, gradient 1.225e-01, dot -0.276; [a5640f47-e1cd-4242-bbf9-ea96d9231b14 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1264.6623561251438, -191.26826914376048, -92.68112545510547, -40.32589257914433
LBFGS Accumulation History: 3 points
Removed measurement 13b64f85 to history. Total: 3
th(0)=-1264.6623561251438;dx=-0.014970820756328135
Armijo: th(72916.66666666672)=-1048.403429029112; dx=0.0018053147351997137 evalInputDelta=-216.2589270960318
Armijo: th(36458.33333333336)=-1201.7483097554164; dx=0.0038275340138122773 evalInputDelta=-62.91404636972743
New Minimum: -1264.6623561251438 > -1336.4053932097102
END: th(12152.777777777786)=-1336.4053932097102; dx=-0.0020956070007732653 evalInputDelta=71.74303708456637
Fitness changed from -1264.6623561251438 to -1336.4053932097102
Iteration 15 complete. Error: -1336.4053932097102 Total: 4.6042; Orientation: 0.2762; Line Search: 3.4952
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/f3315e6b-0ef4-46dd-98de-2233561704c7.jpg)
Final threshold in iteration 16: -1336.4053932097102 (> -Infinity) after 61.555s (< 5400.000s)

Returns

    -1336.4053932097102