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 12.44 seconds (0.598 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: 676163874702300
Reset training subject: 676164268383700
Adding measurement ca7e37f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-7.878171978288011;dx=-0.06579188599114563
New Minimum: -7.878171978288011 > -8.161539868935675
WOLFE (weak): th(2.154434690031884)=-8.161539868935675; dx=-0.06669412742422626 evalInputDelta=0.2833678906476642
New Minimum: -8.161539868935675 > -8.445756051892923
WOLFE (weak): th(4.308869380063768)=-8.445756051892923; dx=-0.059935741593589414 evalInputDelta=0.5675840736049125
New Minimum: -8.445756051892923 > -9.592740381652428
WOLFE (weak): th(12.926608140191302)=-9.592740381652428; dx=-0.0668971244435755 evalInputDelta=1.7145684033644173
New Minimum: -9.592740381652428 > -15.75540552777765
WOLFE (weak): th(51.70643256076521)=-15.75540552777765; dx=-0.07750887780435513 evalInputDelta=7.87723354948964
New Minimum: -15.75540552777765 > -58.272102583081086
END: th(258.53216280382605)=-58.272102583081086; dx=-0.05859498811656204 evalInputDelta=50.39393060479308
Fitness changed from -7.878171978288011 to -58.272102583081086
Iteration 1 complete. Error: -58.272102583081086 Total: 2.1770; Orientation: 0.0258; Line Search: 1.3341
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d96f3ee2-3c60-44ac-ba1e-aebe72d06b85.jpg)
Adding measurement fbbd90c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-58.272102583081086;dx=-0.0728830750228531
New Minimum: -58.272102583081086 > -165.17182696172796
END: th(556.9906600335335)=-165.17182696172796; dx=-0.032183353742862 evalInputDelta=106.89972437864688
Fitness changed from -58.272102583081086 to -165.17182696172796
Iteration 2 complete. Error: -165.17182696172796 Total: 0.5581; Orientation: 0.0029; Line Search: 0.3616
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7e5f38fb-3a4f-462e-9241-9dc29bc5fcdb.jpg)
Adding measurement 6fefc5ea to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-165.17182696172796;dx=-0.039408516072696256
New Minimum: -165.17182696172796 > -270.8659723922516
END: th(1200.0)=-270.8659723922516; dx=-0.014074480902232882 evalInputDelta=105.69414543052363
Fitness changed from -165.17182696172796 to -270.8659723922516
Iteration 3 complete. Error: -270.8659723922516 Total: 0.5720; Orientation: 0.0027; Line Search: 0.3711
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/2c0b1748-8ad3-451e-a8d8-efbcd3cd116c.jpg)
Adding measurement 2651e783 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.677e+03, gradient 1.582e-01, dot -0.382; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -270.8659723922516, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 2651e783 to history. Total: 3
th(0)=-270.8659723922516;dx=-0.024693596912825917
New Minimum: -270.8659723922516 > -379.9422447885994
END: th(2585.3216280382608)=-379.9422447885994; dx=-0.0037862671271547722 evalInputDelta=109.0762723963478
Fitness changed from -270.8659723922516 to -379.9422447885994
Iteration 4 complete. Error: -379.9422447885994 Total: 0.8145; Orientation: 0.0766; Line Search: 0.3556
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/98d96e45-25c4-418c-a944-fd5027959029.jpg)
Adding measurement 29d81c22 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.334e+03, gradient 1.868e-01, dot -0.227; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -379.9422447885994, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 29d81c22 to history. Total: 3
th(0)=-379.9422447885994;dx=-0.03481838966976625
Armijo: th(5569.9066003353355)=-339.248526157447; dx=0.0043687040887275845 evalInputDelta=-40.69371863115242
New Minimum: -379.9422447885994 > -428.6964434480417
WOLF (strong): th(2784.9533001676677)=-428.6964434480417; dx=0.006528920675861572 evalInputDelta=48.754198659442295
New Minimum: -428.6964434480417 > -453.5975983732718
END: th(928.3177667225559)=-453.5975983732718; dx=-0.009637355238179584 evalInputDelta=73.65535358467241
Fitness changed from -379.9422447885994 to -453.5975983732718
Iteration 5 complete. Error: -453.5975983732718 Total: 0.9165; Orientation: 0.0411; Line Search: 0.6758
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/55e1982b-bccc-4f27-a926-690cb0705068.jpg)
Adding measurement 5b1cedfd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.952e+03, gradient 1.356e-01, dot -0.318; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -453.5975983732718, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 5b1cedfd to history. Total: 3
th(0)=-453.5975983732718;dx=-0.01739770998675522
New Minimum: -453.5975983732718 > -530.9109800616295
END: th(2000.0000000000005)=-530.9109800616295; dx=-0.0060039229223383525 evalInputDelta=77.31338168835771
Fitness changed from -453.5975983732718 to -530.9109800616295
Iteration 6 complete. Error: -530.9109800616295 Total: 0.5667; Orientation: 0.0393; Line Search: 0.3314
Adding measurement 3b9c386d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.060e+03, gradient 1.679e-01, dot -0.364; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -530.9109800616295, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 3b9c386d to history. Total: 3
th(0)=-530.9109800616295;dx=-0.02767640744583389
New Minimum: -530.9109800616295 > -545.5960043841964
WOLF (strong): th(4308.869380063768)=-545.5960043841964; dx=0.0017806683516825865 evalInputDelta=14.685024322566846
New Minimum: -545.5960043841964 > -572.7972754387018
WOLF (strong): th(2154.434690031884)=-572.7972754387018; dx=0.0018689146301456192 evalInputDelta=41.886295377072315
New Minimum: -572.7972754387018 > -573.6661431093872
END: th(718.1448966772947)=-573.6661431093872; dx=-0.0077640582292088 evalInputDelta=42.75516304775772
Fitness changed from -530.9109800616295 to -573.6661431093872
Iteration 7 complete. Error: -573.6661431093872 Total: 1.0420; Orientation: 0.0437; Line Search: 0.8356
Adding measurement 282c0891 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.907e+03, gradient 1.292e-01, dot -0.398; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -573.6661431093872, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 282c0891 to history. Total: 3
th(0)=-573.6661431093872;dx=-0.016480660859996304
New Minimum: -573.6661431093872 > -629.3536366781398
END: th(1547.1962778709267)=-629.3536366781398; dx=-0.00578775425580431 evalInputDelta=55.68749356875253
Fitness changed from -573.6661431093872 to -629.3536366781398
Iteration 8 complete. Error: -629.3536366781398 Total: 0.5388; Orientation: 0.0351; Line Search: 0.3363
Adding measurement 4dfe14d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.540e+03, gradient 1.493e-01, dot -0.367; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -629.3536366781398, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 4dfe14d4 to history. Total: 3
th(0)=-629.3536366781398;dx=-0.018847733547442985
New Minimum: -629.3536366781398 > -657.312306860293
WOLF (strong): th(3333.3333333333344)=-657.312306860293; dx=5.163590530490108E-4 evalInputDelta=27.95867018215324
New Minimum: -657.312306860293 > -668.3473554223133
WOLF (strong): th(1666.6666666666672)=-668.3473554223133; dx=0.001123168913747767 evalInputDelta=38.99371874417352
END: th(555.5555555555558)=-657.9921874536202; dx=-0.009376525249853645 evalInputDelta=28.63855077548044
Fitness changed from -629.3536366781398 to -668.3473554223133
Iteration 9 complete. Error: -668.3473554223133 Total: 0.8698; Orientation: 0.0370; Line Search: 0.6671
Adding measurement 47bcaf67 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.891e+03, gradient 1.675e-01, dot -0.277; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -668.3473554223133, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 47bcaf67 to history. Total: 3
th(0)=-668.3473554223133;dx=-0.027830363386265343
New Minimum: -668.3473554223133 > -729.3550661372004
WOLF (strong): th(1196.9081611288248)=-729.3550661372004; dx=2.102927557368395E-4 evalInputDelta=61.00771071488714
END: th(598.4540805644124)=-713.105225405059; dx=-0.014356161774670818 evalInputDelta=44.75786998274566
Fitness changed from -668.3473554223133 to -729.3550661372004
Iteration 10 complete. Error: -729.3550661372004 Total: 0.8819; Orientation: 0.1815; Line Search: 0.5330
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0afa2afb-20ba-4906-8c7e-d20900fef962.jpg)
Adding measurement 76c6b12c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.578e+03, gradient 1.435e-01, dot -0.365; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -729.3550661372004, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 76c6b12c to history. Total: 3
th(0)=-729.3550661372004;dx=-0.020302309999919006
New Minimum: -729.3550661372004 > -769.6547115427801
END: th(1289.3302315591059)=-769.6547115427801; dx=-0.001930894572807171 evalInputDelta=40.29964540557967
Fitness changed from -729.3550661372004 to -769.6547115427801
Iteration 11 complete. Error: -769.6547115427801 Total: 0.5586; Orientation: 0.0452; Line Search: 0.3316
Adding measurement 7531ba53 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.109e+03, gradient 1.346e-01, dot -0.355; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -769.6547115427801, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 7531ba53 to history. Total: 3
th(0)=-769.6547115427801;dx=-0.017972323733109172
New Minimum: -769.6547115427801 > -819.019955495591
WOLF (strong): th(2777.777777777779)=-819.019955495591; dx=0.0016582399772519488 evalInputDelta=49.36524395281094
END: th(1388.8888888888896)=-815.8680576539322; dx=-0.0028023355259166713 evalInputDelta=46.21334611115208
Fitness changed from -769.6547115427801 to -819.019955495591
Iteration 12 complete. Error: -819.019955495591 Total: 0.6956; Orientation: 0.0361; Line Search: 0.5010
Adding measurement 347544b7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.701e+03, gradient 1.731e-01, dot -0.315; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -819.019955495591, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 347544b7 to history. Total: 3
th(0)=-819.019955495591;dx=-0.029765709641689845
New Minimum: -819.019955495591 > -861.6022501711564
WOLF (strong): th(2992.2704028220624)=-861.6022501711564; dx=0.009267823766828068 evalInputDelta=42.58229467556532
New Minimum: -861.6022501711564 > -898.1753726305348
END: th(1496.1352014110312)=-898.1753726305348; dx=-0.002063579828085612 evalInputDelta=79.15541713494372
Fitness changed from -819.019955495591 to -898.1753726305348
Iteration 13 complete. Error: -898.1753726305348 Total: 0.8281; Orientation: 0.0351; Line Search: 0.6335
Adding measurement 69b783ea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.865e+03, gradient 1.280e-01, dot -0.399; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -898.1753726305348, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 69b783ea to history. Total: 3
th(0)=-898.1753726305348;dx=-0.016283225881854
New Minimum: -898.1753726305348 > -967.650601973667
END: th(3223.325578897765)=-967.650601973667; dx=-8.29376404618767E-4 evalInputDelta=69.47522934313224
Fitness changed from -898.1753726305348 to -967.650601973667
Iteration 14 complete. Error: -967.650601973667 Total: 0.5329; Orientation: 0.0357; Line Search: 0.3326
Adding measurement 7f277cf6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.482e+03, gradient 1.632e-01, dot -0.331; [87615ad3-b2dc-404e-874f-12dc6edb4e97 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -967.650601973667, -165.17182696172796, -58.272102583081086, -7.878171978288011
LBFGS Accumulation History: 3 points
Removed measurement 7f277cf6 to history. Total: 3
th(0)=-967.650601973667;dx=-0.026117683613992665
Armijo: th(6944.444444444449)=-904.5399728591324; dx=0.005415542789874972 evalInputDelta=-63.11062911453462
New Minimum: -967.650601973667 > -1005.6452841335259
WOLF (strong): th(3472.2222222222244)=-1005.6452841335259; dx=0.00793076873764628 evalInputDelta=37.99468215985894
New Minimum: -1005.6452841335259 > -1040.6376050287631
END: th(1157.407407407408)=-1040.6376050287631; dx=-0.00810899960305288 evalInputDelta=72.98700305509612
Fitness changed from -967.650601973667 to -1040.6376050287631
Iteration 15 complete. Error: -1040.6376050287631 Total: 0.8611; Orientation: 0.0344; Line Search: 0.6650
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/ee5c1b42-c6ae-4c07-9334-a0fd8b8c98d3.jpg)
Final threshold in iteration 16: -1040.6376050287631 (> -Infinity) after 12.430s (< 5400.000s)

Returns

    -1040.6376050287631