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 7.54 seconds (0.000 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: 157341775657000
Reset training subject: 157341905048500
Adding measurement 237bd131 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-7.0293253321463265;dx=-0.009031604520530732
New Minimum: -7.0293253321463265 > -7.054254318034941
WOLFE (weak): th(2.154434690031884)=-7.054254318034941; dx=-0.008933820499406882 evalInputDelta=0.024928985888614363
New Minimum: -7.054254318034941 > -7.079196219179452
WOLFE (weak): th(4.308869380063768)=-7.079196219179452; dx=-0.008986004316203708 evalInputDelta=0.04987088703312548
New Minimum: -7.079196219179452 > -7.179642929229528
WOLFE (weak): th(12.926608140191302)=-7.179642929229528; dx=-0.009032770720586567 evalInputDelta=0.1503175970832018
New Minimum: -7.179642929229528 > -7.647435209848008
WOLFE (weak): th(51.70643256076521)=-7.647435209848008; dx=-0.009106402705209939 evalInputDelta=0.6181098777016816
New Minimum: -7.647435209848008 > -10.378528923517019
WOLFE (weak): th(258.53216280382605)=-10.378528923517019; dx=-0.008515538743226525 evalInputDelta=3.349203591370692
New Minimum: -10.378528923517019 > -26.84148660487774
END: th(1551.1929768229563)=-26.84148660487774; dx=-0.0036585525120844684 evalInputDelta=19.812161272731416
Fitness changed from -7.0293253321463265 to -26.84148660487774
Iteration 1 complete. Error: -26.84148660487774 Total: 1.1644; Orientation: 0.0013; Line Search: 0.8127
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/1aed4e17-c402-48bb-b83e-29e921e09b97.jpg)
Adding measurement 1193eda1 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-26.84148660487774;dx=-0.01398863872770127
New Minimum: -26.84148660487774 > -48.2847647356139
END: th(3341.943960201201)=-48.2847647356139; dx=-9.934447576703598E-4 evalInputDelta=21.443278130736157
Fitness changed from -26.84148660487774 to -48.2847647356139
Iteration 2 complete. Error: -48.2847647356139 Total: 0.3522; Orientation: 0.0015; Line Search: 0.2301
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1accdeff-1f72-4872-ad1f-6d56b76eee63.jpg)
Adding measurement 56196731 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-48.2847647356139;dx=-0.018959356640043695
Armijo: th(7200.000000000001)=-44.89950628640386; dx=0.0011111444206002071 evalInputDelta=-3.385258449210035
New Minimum: -48.2847647356139 > -71.16234151501675
WOLF (strong): th(3600.0000000000005)=-71.16234151501675; dx=0.0010367618801122164 evalInputDelta=22.87757677940285
END: th(1200.0000000000002)=-70.77978826297323; dx=-0.006770981986554749 evalInputDelta=22.49502352735933
Fitness changed from -48.2847647356139 to -71.16234151501675
Iteration 3 complete. Error: -71.16234151501675 Total: 0.5715; Orientation: 0.0013; Line Search: 0.4477
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e9c27478-4f55-4b7d-afd0-99f0212665db.jpg)
Adding measurement 6e0cc7e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.681e+03, gradient 1.400e-01, dot -0.292; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -71.16234151501675, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement 6e0cc7e4 to history. Total: 3
th(0)=-71.16234151501675;dx=-0.01928651624419378
New Minimum: -71.16234151501675 > -106.42312363469874
END: th(2585.321628038261)=-106.42312363469874; dx=-0.0019281170500913634 evalInputDelta=35.26078211968199
Fitness changed from -71.16234151501675 to -106.42312363469874
Iteration 4 complete. Error: -106.42312363469874 Total: 0.3760; Orientation: 0.0325; Line Search: 0.2267
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/f8522a24-2cf4-499e-900b-a84553330a03.jpg)
Adding measurement 55522845 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.514e+02, gradient 9.802e-02, dot -0.235; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -106.42312363469874, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement 55522845 to history. Total: 3
th(0)=-106.42312363469874;dx=-0.009303347602108526
New Minimum: -106.42312363469874 > -121.43544755696738
END: th(5569.906600335336)=-121.43544755696738; dx=-1.0059937411071096E-5 evalInputDelta=15.012323922268635
Fitness changed from -106.42312363469874 to -121.43544755696738
Iteration 5 complete. Error: -121.43544755696738 Total: 0.3784; Orientation: 0.0277; Line Search: 0.2283
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/9ebc96ce-3901-4c32-80d4-fbd472a29b0f.jpg)
Adding measurement a47c929 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.532e+03, gradient 1.217e-01, dot -0.289; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -121.43544755696738, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement a47c929 to history. Total: 3
th(0)=-121.43544755696738;dx=-0.014620756635965088
New Minimum: -121.43544755696738 > -141.80199042580827
WOLF (strong): th(12000.000000000004)=-141.80199042580827; dx=8.192213213808193E-4 evalInputDelta=20.366542868840895
New Minimum: -141.80199042580827 > -163.06773360655606
WOLF (strong): th(6000.000000000002)=-163.06773360655606; dx=2.432492892805007E-4 evalInputDelta=41.632286049588686
END: th(2000.0000000000007)=-157.05077464512493; dx=-0.004217254855677593 evalInputDelta=35.61532708815756
Fitness changed from -121.43544755696738 to -163.06773360655606
Iteration 6 complete. Error: -163.06773360655606 Total: 0.6046; Orientation: 0.0287; Line Search: 0.4550
Adding measurement c41fd18 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.674e+03, gradient 1.055e-01, dot -0.214; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -163.06773360655606, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement c41fd18 to history. Total: 3
th(0)=-163.06773360655606;dx=-0.010871347324200972
New Minimum: -163.06773360655606 > -203.8649255188528
END: th(4308.869380063769)=-203.8649255188528; dx=-0.002407750523910881 evalInputDelta=40.79719191229674
Fitness changed from -163.06773360655606 to -203.8649255188528
Iteration 7 complete. Error: -203.8649255188528 Total: 0.3694; Orientation: 0.0283; Line Search: 0.2264
Adding measurement a9463bd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.079e+03, gradient 8.598e-02, dot -0.358; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -203.8649255188528, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement a9463bd to history. Total: 3
th(0)=-203.8649255188528;dx=-0.007153389076422677
New Minimum: -203.8649255188528 > -248.54042626866615
END: th(9283.177667225562)=-248.54042626866615; dx=-0.001412172384771051 evalInputDelta=44.67550074981335
Fitness changed from -203.8649255188528 to -248.54042626866615
Iteration 8 complete. Error: -248.54042626866615 Total: 0.3662; Orientation: 0.0286; Line Search: 0.2273
Adding measurement 5e695b71 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.948e+03, gradient 9.581e-02, dot -0.286; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -248.54042626866615, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement 5e695b71 to history. Total: 3
th(0)=-248.54042626866615;dx=-0.009045235170275095
Armijo: th(20000.00000000001)=-236.44184502661173; dx=8.704082811416263E-4 evalInputDelta=-12.098581242054422
New Minimum: -248.54042626866615 > -288.44910299515726
END: th(10000.000000000005)=-288.44910299515726; dx=-3.291029706351038E-4 evalInputDelta=39.90867672649111
Fitness changed from -248.54042626866615 to -288.44910299515726
Iteration 9 complete. Error: -288.44910299515726 Total: 0.4769; Orientation: 0.0271; Line Search: 0.3354
Adding measurement 270ce763 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.304e+03, gradient 9.730e-02, dot -0.333; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -288.44910299515726, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement 270ce763 to history. Total: 3
th(0)=-288.44910299515726;dx=-0.009317279580371022
Armijo: th(21544.34690031885)=-279.7193809973679; dx=0.0018442404137584668 evalInputDelta=-8.72972199778934
New Minimum: -288.44910299515726 > -340.3610636012456
WOLF (strong): th(10772.173450159426)=-340.3610636012456; dx=3.6247229304180677E-4 evalInputDelta=51.911960606088314
END: th(3590.724483386475)=-332.00548289377105; dx=-0.004049941240613209 evalInputDelta=43.556379898613784
Fitness changed from -288.44910299515726 to -340.3610636012456
Iteration 10 complete. Error: -340.3610636012456 Total: 0.5861; Orientation: 0.0277; Line Search: 0.4487
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/4f4e63b2-0601-42e9-8fb5-e3676fa3a0b3.jpg)
Adding measurement 3d6b6a21 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.153e+04, gradient 9.533e-02, dot -0.327; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -340.3610636012456, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement 3d6b6a21 to history. Total: 3
th(0)=-340.3610636012456;dx=-0.008900652259140343
New Minimum: -340.3610636012456 > -388.91089567378174
END: th(7735.981389354637)=-388.91089567378174; dx=-0.00102026001029415 evalInputDelta=48.54983207253616
Fitness changed from -340.3610636012456 to -388.91089567378174
Iteration 11 complete. Error: -388.91089567378174 Total: 0.3758; Orientation: 0.0284; Line Search: 0.2262
Adding measurement 3f87baa0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.525e+04, gradient 7.974e-02, dot -0.403; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -388.91089567378174, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement 3f87baa0 to history. Total: 3
th(0)=-388.91089567378174;dx=-0.006265180994405696
New Minimum: -388.91089567378174 > -399.37309814622046
END: th(16666.66666666668)=-399.37309814622046; dx=-4.977392959021942E-5 evalInputDelta=10.462202472438719
Fitness changed from -388.91089567378174 to -399.37309814622046
Iteration 12 complete. Error: -399.37309814622046 Total: 0.3707; Orientation: 0.0272; Line Search: 0.2295
Adding measurement 70c9003f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.168e+04, gradient 9.715e-02, dot -0.339; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -399.37309814622046, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement 70c9003f to history. Total: 3
th(0)=-399.37309814622046;dx=-0.009307124965328109
Armijo: th(35907.24483386476)=-292.05894720464977; dx=0.0016413384910203693 evalInputDelta=-107.31415094157069
New Minimum: -399.37309814622046 > -401.16264770164713
WOLF (strong): th(17953.62241693238)=-401.16264770164713; dx=0.001596242977873013 evalInputDelta=1.7895495554266745
New Minimum: -401.16264770164713 > -440.01543718580444
END: th(5984.5408056441265)=-440.01543718580444; dx=-0.0020074744959639487 evalInputDelta=40.64233903958399
Fitness changed from -399.37309814622046 to -440.01543718580444
Iteration 13 complete. Error: -440.01543718580444 Total: 0.5840; Orientation: 0.0277; Line Search: 0.4488
Adding measurement 15c4a7eb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.107e+04, gradient 7.164e-02, dot -0.457; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -440.01543718580444, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement 15c4a7eb to history. Total: 3
th(0)=-440.01543718580444;dx=-0.004947530518449003
New Minimum: -440.01543718580444 > -447.41254959020125
END: th(12893.302315591063)=-447.41254959020125; dx=-0.0011853900358409024 evalInputDelta=7.3971124043968075
Fitness changed from -440.01543718580444 to -447.41254959020125
Iteration 14 complete. Error: -447.41254959020125 Total: 0.3577; Orientation: 0.0269; Line Search: 0.2219
Adding measurement 4df4c506 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.656e+04, gradient 8.156e-02, dot -0.419; [58f707b2-71c5-4d9d-a0f6-1b837c6f5d3f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -447.41254959020125, -48.2847647356139, -26.84148660487774, -7.0293253321463265
LBFGS Accumulation History: 3 points
Removed measurement 4df4c506 to history. Total: 3
th(0)=-447.41254959020125;dx=-0.006509078396619286
Armijo: th(27777.777777777803)=-397.98126448937234; dx=8.513123826805395E-4 evalInputDelta=-49.431285100828916
New Minimum: -447.41254959020125 > -451.70897105756654
WOLF (strong): th(13888.888888888901)=-451.70897105756654; dx=1.4517189380830787E-4 evalInputDelta=4.296421467365292
New Minimum: -451.70897105756654 > -468.1711760827602
END: th(4629.629629629634)=-468.1711760827602; dx=-0.0018047101136217454 evalInputDelta=20.75862649255896
Fitness changed from -447.41254959020125 to -468.1711760827602
Iteration 15 complete. Error: -468.1711760827602 Total: 0.5937; Orientation: 0.0276; Line Search: 0.4583
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/2612d926-16c8-4ddf-a91d-8cbabc8c9f38.jpg)
Final threshold in iteration 16: -468.1711760827602 (> -Infinity) after 7.539s (< 5400.000s)

Returns

    -468.1711760827602