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.65 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: 165455151501400
Reset training subject: 165455275816500
Adding measurement 3ea9c331 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.7408738458198241;dx=-4.416595339934269E-4
New Minimum: -0.7408738458198241 > -0.7421860378598463
WOLFE (weak): th(2.154434690031884)=-0.7421860378598463; dx=-4.3354409672568346E-4 evalInputDelta=0.0013121920400221976
New Minimum: -0.7421860378598463 > -0.7435076185108784
WOLFE (weak): th(4.308869380063768)=-0.7435076185108784; dx=-4.324588919686663E-4 evalInputDelta=0.002633772691054359
New Minimum: -0.7435076185108784 > -0.7488330119879592
WOLFE (weak): th(12.926608140191302)=-0.7488330119879592; dx=-4.424120864775083E-4 evalInputDelta=0.007959166168135079
New Minimum: -0.7488330119879592 > -0.7730140997353233
WOLFE (weak): th(51.70643256076521)=-0.7730140997353233; dx=-4.6110049439358975E-4 evalInputDelta=0.03214025391549924
New Minimum: -0.7730140997353233 > -0.9089776003170326
WOLFE (weak): th(258.53216280382605)=-0.9089776003170326; dx=-4.920660230610352E-4 evalInputDelta=0.1681037544972085
New Minimum: -0.9089776003170326 > -1.8496033587110783
END: th(1551.1929768229563)=-1.8496033587110783; dx=-3.934610596667028E-4 evalInputDelta=1.1087295128912542
Fitness changed from -0.7408738458198241 to -1.8496033587110783
Iteration 1 complete. Error: -1.8496033587110783 Total: 1.1229; Orientation: 0.0015; Line Search: 0.7803
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/322ac727-5c86-4241-b98e-cf230164cc23.jpg)
Adding measurement 753fd52a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1.8496033587110783;dx=-7.296236980101716E-4
New Minimum: -1.8496033587110783 > -3.524105031973915
END: th(3341.943960201201)=-3.524105031973915; dx=-2.0643046177773548E-4 evalInputDelta=1.6745016732628368
Fitness changed from -1.8496033587110783 to -3.524105031973915
Iteration 2 complete. Error: -3.524105031973915 Total: 0.3515; Orientation: 0.0015; Line Search: 0.2261
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6c0280c3-b516-4f95-9442-7e8814c4006d.jpg)
Adding measurement 362499c9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-3.524105031973915;dx=-9.97506276318907E-4
Armijo: th(7200.000000000001)=-3.3983753773596486; dx=6.626221175137274E-5 evalInputDelta=-0.12572965461426655
New Minimum: -3.524105031973915 > -4.333088425236919
WOLF (strong): th(3600.0000000000005)=-4.333088425236919; dx=1.0983228429889988E-4 evalInputDelta=0.8089833932630035
New Minimum: -4.333088425236919 > -5.075123346103652
END: th(1200.0000000000002)=-5.075123346103652; dx=-2.684002889473118E-4 evalInputDelta=1.551018314129737
Fitness changed from -3.524105031973915 to -5.075123346103652
Iteration 3 complete. Error: -5.075123346103652 Total: 0.5626; Orientation: 0.0015; Line Search: 0.4422
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/edeef7dd-0bda-452f-aec7-bbf09df0655c.jpg)
Adding measurement 429450ef to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.386e+03, gradient 2.392e-02, dot -0.402; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.075123346103652, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 429450ef to history. Total: 3
th(0)=-5.075123346103652;dx=-5.620351979649112E-4
New Minimum: -5.075123346103652 > -5.110503493946135
END: th(2585.321628038261)=-5.110503493946135; dx=-6.175770936967323E-5 evalInputDelta=0.03538014784248311
Fitness changed from -5.075123346103652 to -5.110503493946135
Iteration 4 complete. Error: -5.110503493946135 Total: 0.3671; Orientation: 0.0262; Line Search: 0.2218
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/9360fd66-4820-41fd-b468-0cb8a6b8b239.jpg)
Adding measurement 2742eb7f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.761e+02, gradient 3.010e-02, dot -0.082; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.110503493946135, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 2742eb7f to history. Total: 3
th(0)=-5.110503493946135;dx=-8.775809301361692E-4
Armijo: th(5569.906600335336)=-4.237164884270404; dx=1.0309923824085459E-4 evalInputDelta=-0.8733386096757307
New Minimum: -5.110503493946135 > -5.820911855960372
WOLF (strong): th(2784.953300167668)=-5.820911855960372; dx=1.1631940916433347E-4 evalInputDelta=0.7104083620142365
New Minimum: -5.820911855960372 > -6.680785028302409
END: th(928.317766722556)=-6.680785028302409; dx=-4.2752191390551907E-4 evalInputDelta=1.5702815343562735
Fitness changed from -5.110503493946135 to -6.680785028302409
Iteration 5 complete. Error: -6.680785028302409 Total: 0.5871; Orientation: 0.0287; Line Search: 0.4392
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/171d79ec-3758-4cf2-beed-fba372577331.jpg)
Adding measurement 2f9adc15 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.049e+03, gradient 2.085e-02, dot -0.235; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.680785028302409, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 2f9adc15 to history. Total: 3
th(0)=-6.680785028302409;dx=-4.1142838034528606E-4
New Minimum: -6.680785028302409 > -7.209572291656942
END: th(2000.0000000000007)=-7.209572291656942; dx=-1.4264746739314427E-4 evalInputDelta=0.5287872633545332
Fitness changed from -6.680785028302409 to -7.209572291656942
Iteration 6 complete. Error: -7.209572291656942 Total: 0.3678; Orientation: 0.0267; Line Search: 0.2215
Adding measurement 60538382 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.908e+03, gradient 2.335e-02, dot -0.266; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.209572291656942, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 60538382 to history. Total: 3
th(0)=-7.209572291656942;dx=-5.194966318221839E-4
Armijo: th(4308.869380063769)=-5.593235379596804; dx=-2.626991853085416E-5 evalInputDelta=-1.616336912060138
Armijo: th(2154.4346900318847)=-6.875841895981651; dx=5.3865241818567734E-5 evalInputDelta=-0.33373039567529084
New Minimum: -7.209572291656942 > -7.684183560900522
END: th(718.1448966772949)=-7.684183560900522; dx=-2.4458318024866066E-4 evalInputDelta=0.47461126924357977
Fitness changed from -7.209572291656942 to -7.684183560900522
Iteration 7 complete. Error: -7.684183560900522 Total: 0.5864; Orientation: 0.0286; Line Search: 0.4518
Adding measurement 5cd8e78 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.802e+03, gradient 1.811e-02, dot -0.193; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.684183560900522, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 5cd8e78 to history. Total: 3
th(0)=-7.684183560900522;dx=-3.0915243654230966E-4
New Minimum: -7.684183560900522 > -8.093452674467269
END: th(1547.1962778709271)=-8.093452674467269; dx=-2.2428481782532872E-4 evalInputDelta=0.4092691135667472
Fitness changed from -7.684183560900522 to -8.093452674467269
Iteration 8 complete. Error: -8.093452674467269 Total: 0.3525; Orientation: 0.0264; Line Search: 0.2188
Adding measurement 14ddda31 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.558e+03, gradient 1.982e-02, dot -0.387; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.093452674467269, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 14ddda31 to history. Total: 3
th(0)=-8.093452674467269;dx=-3.727740647035579E-4
Armijo: th(3333.3333333333353)=-7.4492795792679445; dx=3.235774671246149E-5 evalInputDelta=-0.6441730951993243
New Minimum: -8.093452674467269 > -8.193142434868689
END: th(1666.6666666666677)=-8.193142434868689; dx=-1.029933962345401E-4 evalInputDelta=0.09968976040141975
Fitness changed from -8.093452674467269 to -8.193142434868689
Iteration 9 complete. Error: -8.193142434868689 Total: 0.4770; Orientation: 0.0275; Line Search: 0.3316
Adding measurement 631db8ce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.433e+02, gradient 2.244e-02, dot -0.168; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.193142434868689, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 631db8ce to history. Total: 3
th(0)=-8.193142434868689;dx=-4.903132714943891E-4
Armijo: th(3590.724483386475)=-7.406658570661644; dx=9.327673769545528E-5 evalInputDelta=-0.7864838642070442
New Minimum: -8.193142434868689 > -8.672485075865275
WOLF (strong): th(1795.3622416932376)=-8.672485075865275; dx=1.1747657232512118E-5 evalInputDelta=0.4793426409965864
New Minimum: -8.672485075865275 > -8.788117727369595
END: th(598.4540805644125)=-8.788117727369595; dx=-3.5536933657960394E-4 evalInputDelta=0.5949752925009069
Fitness changed from -8.193142434868689 to -8.788117727369595
Iteration 10 complete. Error: -8.788117727369595 Total: 0.5869; Orientation: 0.0301; Line Search: 0.4496
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/2b5de9a7-376d-4a85-87d8-c8ac688bba02.jpg)
Adding measurement 77501cc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.127e+03, gradient 1.895e-02, dot -0.114; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.788117727369595, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 77501cc to history. Total: 3
th(0)=-8.788117727369595;dx=-3.352243852886548E-4
New Minimum: -8.788117727369595 > -9.045653217213461
END: th(1289.330231559106)=-9.045653217213461; dx=-1.7135350762606126E-4 evalInputDelta=0.25753548984386576
Fitness changed from -8.788117727369595 to -9.045653217213461
Iteration 11 complete. Error: -9.045653217213461 Total: 0.3784; Orientation: 0.0283; Line Search: 0.2304
Adding measurement 57a8ddc0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.231e+03, gradient 2.114e-02, dot -0.327; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.045653217213461, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 57a8ddc0 to history. Total: 3
th(0)=-9.045653217213461;dx=-4.3425995200291356E-4
Armijo: th(2777.7777777777796)=-8.38168392351846; dx=4.0319907965476904E-5 evalInputDelta=-0.6639692936950006
New Minimum: -9.045653217213461 > -9.162246446267346
END: th(1388.8888888888898)=-9.162246446267346; dx=-6.753728127359463E-5 evalInputDelta=0.11659322905388514
Fitness changed from -9.045653217213461 to -9.162246446267346
Iteration 12 complete. Error: -9.162246446267346 Total: 0.4696; Orientation: 0.0289; Line Search: 0.3349
Adding measurement 66aeed19 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.173e+02, gradient 2.343e-02, dot -0.205; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.162246446267346, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 66aeed19 to history. Total: 3
th(0)=-9.162246446267346;dx=-5.176283692582563E-4
Armijo: th(2992.270402822063)=-8.068061473670303; dx=1.0168134618617364E-4 evalInputDelta=-1.0941849725970432
New Minimum: -9.162246446267346 > -9.359740315539387
WOLF (strong): th(1496.1352014110314)=-9.359740315539387; dx=3.9332485701141004E-5 evalInputDelta=0.1974938692720407
New Minimum: -9.359740315539387 > -9.645743288798412
END: th(498.71173380367713)=-9.645743288798412; dx=-3.5239838250223634E-4 evalInputDelta=0.48349684253106595
Fitness changed from -9.162246446267346 to -9.645743288798412
Iteration 13 complete. Error: -9.645743288798412 Total: 0.5912; Orientation: 0.0287; Line Search: 0.4570
Adding measurement 17544a5c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.533e+03, gradient 1.809e-02, dot -0.127; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.645743288798412, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 17544a5c to history. Total: 3
th(0)=-9.645743288798412;dx=-2.9563345521422136E-4
New Minimum: -9.645743288798412 > -9.832667999504416
END: th(1074.4418596325886)=-9.832667999504416; dx=-1.9605144716746873E-4 evalInputDelta=0.1869247107060037
Fitness changed from -9.645743288798412 to -9.832667999504416
Iteration 14 complete. Error: -9.832667999504416 Total: 0.3750; Orientation: 0.0284; Line Search: 0.2301
Adding measurement 33bbd88c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.554e+03, gradient 2.097e-02, dot -0.259; [79034ff9-56ac-4289-9aac-b30ee0d5ec0f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.832667999504416, -3.524105031973915, -1.8496033587110783, -0.7408738458198241
LBFGS Accumulation History: 3 points
Removed measurement 33bbd88c to history. Total: 3
th(0)=-9.832667999504416;dx=-4.007662679691603E-4
Armijo: th(2314.814814814817)=-9.107735946727491; dx=-1.6274693603409307E-6 evalInputDelta=-0.724932052776925
New Minimum: -9.832667999504416 > -9.901713991182643
END: th(1157.4074074074085)=-9.901713991182643; dx=-1.1629423409011727E-4 evalInputDelta=0.06904599167822667
Fitness changed from -9.832667999504416 to -9.901713991182643
Iteration 15 complete. Error: -9.901713991182643 Total: 0.4682; Orientation: 0.0286; Line Search: 0.3296
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/3033210f-b5a5-4971-a3cc-007818f5b1fe.jpg)
Final threshold in iteration 16: -9.901713991182643 (> -Infinity) after 7.655s (< 5400.000s)

Returns

    -9.901713991182643