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 8.80 seconds (0.310 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: 139575138107800
Reset training subject: 139575275233400
Adding measurement 554a0494 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-6.692685655713243;dx=-0.002396674375613429
New Minimum: -6.692685655713243 > -6.695847021204749
WOLFE (weak): th(2.154434690031884)=-6.695847021204749; dx=-0.0024177780888052823 evalInputDelta=0.0031613654915059186
New Minimum: -6.695847021204749 > -6.69900285740097
WOLFE (weak): th(4.308869380063768)=-6.69900285740097; dx=-0.002398174876778455 evalInputDelta=0.006317201687727092
New Minimum: -6.69900285740097 > -6.711686048767541
WOLFE (weak): th(12.926608140191302)=-6.711686048767541; dx=-0.002424416482780015 evalInputDelta=0.01900039305429857
New Minimum: -6.711686048767541 > -6.769560577706778
WOLFE (weak): th(51.70643256076521)=-6.769560577706778; dx=-0.002432483342923841 evalInputDelta=0.07687492199353496
New Minimum: -6.769560577706778 > -7.0870400329604895
WOLFE (weak): th(258.53216280382605)=-7.0870400329604895; dx=-0.0023946650200538117 evalInputDelta=0.39435437724724665
New Minimum: -7.0870400329604895 > -9.257402368594287
END: th(1551.1929768229563)=-9.257402368594287; dx=-0.0018688164181023142 evalInputDelta=2.5647167128810437
Fitness changed from -6.692685655713243 to -9.257402368594287
Iteration 1 complete. Error: -9.257402368594287 Total: 1.2280; Orientation: 0.0017; Line Search: 0.8585
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/385bb660-08fa-4c1f-9112-784c2eaccee5.jpg)
Adding measurement 1fa0432c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-9.257402368594287;dx=-0.0035014045861195943
New Minimum: -9.257402368594287 > -14.009353062208156
END: th(3341.943960201201)=-14.009353062208156; dx=-7.514842614013243E-4 evalInputDelta=4.751950693613869
Fitness changed from -9.257402368594287 to -14.009353062208156
Iteration 2 complete. Error: -14.009353062208156 Total: 0.3946; Orientation: 0.0018; Line Search: 0.2476
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/630d56e1-100f-4cdb-804e-890af2beb03b.jpg)
Adding measurement 29dc7e9e to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-14.009353062208156;dx=-0.0027811003478055325
New Minimum: -14.009353062208156 > -17.34830016122865
END: th(7200.000000000001)=-17.34830016122865; dx=-9.715115700910262E-6 evalInputDelta=3.338947099020494
Fitness changed from -14.009353062208156 to -17.34830016122865
Iteration 3 complete. Error: -17.34830016122865 Total: 0.3813; Orientation: 0.0017; Line Search: 0.2498
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/6593f1c5-71a8-4277-83c1-5df53cd7dce5.jpg)
Adding measurement 6e7ec945 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.741e+03, gradient 6.358e-02, dot -0.311; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.34830016122865, -14.009353062208156, -9.257402368594287, -6.692685655713243
LBFGS Accumulation History: 3 points
Removed measurement 6e7ec945 to history. Total: 3
th(0)=-17.34830016122865;dx=-0.003948763555062173
New Minimum: -17.34830016122865 > -23.3149717151984
END: th(15511.929768229566)=-23.3149717151984; dx=-2.091809320554428E-4 evalInputDelta=5.96667155396975
Fitness changed from -17.34830016122865 to -23.3149717151984
Iteration 4 complete. Error: -23.3149717151984 Total: 0.3992; Orientation: 0.0306; Line Search: 0.2387
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a639bac6-06b3-4108-9875-636ee8f0896d.jpg)
Adding measurement 23624954 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.480e+03, gradient 4.637e-02, dot -0.182; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.3149717151984, -14.009353062208156, -9.257402368594287, -6.692685655713243
LBFGS Accumulation History: 3 points
Removed measurement 23624954 to history. Total: 3
th(0)=-23.3149717151984;dx=-0.0018997465205916847
New Minimum: -23.3149717151984 > -45.84429299661335
END: th(33419.43960201202)=-45.84429299661335; dx=-1.84266134058223E-4 evalInputDelta=22.529321281414948
Fitness changed from -23.3149717151984 to -45.84429299661335
Iteration 5 complete. Error: -45.84429299661335 Total: 0.7341; Orientation: 0.0324; Line Search: 0.5696
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/bbf44f2a-4825-4f0b-9437-4807176997bb.jpg)
Adding measurement 1148b77e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.003e+03, gradient 4.637e-02, dot -0.207; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.84429299661335, -14.009353062208156, -9.257402368594287, -6.692685655713243
LBFGS Accumulation History: 3 points
Removed measurement 1148b77e to history. Total: 3
th(0)=-45.84429299661335;dx=-0.0019641003191121914
New Minimum: -45.84429299661335 > -71.17694259934117
WOLF (strong): th(72000.00000000003)=-71.17694259934117; dx=6.013886766749681E-5 evalInputDelta=25.332649602727827
New Minimum: -71.17694259934117 > -88.78857752335999
END: th(36000.000000000015)=-88.78857752335999; dx=-2.815155604788672E-4 evalInputDelta=42.94428452674664
Fitness changed from -45.84429299661335 to -88.78857752335999
Iteration 6 complete. Error: -88.78857752335999 Total: 0.5466; Orientation: 0.0305; Line Search: 0.3605
Adding measurement 25fe5546 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.450e+04, gradient 5.315e-02, dot -0.215; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -88.78857752335999, -14.009353062208156, -9.257402368594287, -6.692685655713243
LBFGS Accumulation History: 3 points
Removed measurement 25fe5546 to history. Total: 3
th(0)=-88.78857752335999;dx=-0.0027354898065647328
Armijo: th(77559.64884114785)=-84.126643960522; dx=1.3099544262241324E-4 evalInputDelta=-4.661933562837987
New Minimum: -88.78857752335999 > -122.23676730102368
END: th(38779.824420573925)=-122.23676730102368; dx=-1.5858274004399922E-4 evalInputDelta=33.448189777663686
Fitness changed from -88.78857752335999 to -122.23676730102368
Iteration 7 complete. Error: -122.23676730102368 Total: 0.5082; Orientation: 0.0300; Line Search: 0.3637
Adding measurement 109a3c7c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.728e+04, gradient 6.368e-02, dot -0.219; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -122.23676730102368, -14.009353062208156, -9.257402368594287, -6.692685655713243
LBFGS Accumulation History: 3 points
Removed measurement 109a3c7c to history. Total: 3
th(0)=-122.23676730102368;dx=-0.003938217952746055
Armijo: th(83548.59900503006)=-68.10899834719123; dx=2.4551797674748606E-4 evalInputDelta=-54.127768953832444
New Minimum: -122.23676730102368 > -128.97665242194674
END: th(41774.29950251503)=-128.97665242194674; dx=-2.8653493896391448E-5 evalInputDelta=6.739885120923063
Fitness changed from -122.23676730102368 to -128.97665242194674
Iteration 8 complete. Error: -128.97665242194674 Total: 0.5080; Orientation: 0.0314; Line Search: 0.3556
Adding measurement 79869427 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 3.625e+04, gradient 5.582e-02, dot 0.237; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-128.97665242194674;dx=-448.4709763971152
Armijo: th(90000.00000000004)=-102.0869261135869; dx=3.634488112344086E-4 evalInputDelta=-26.88972630835984
Armijo: th(45000.00000000002)=-102.0869261135869; dx=7.100810125799878E-4 evalInputDelta=-26.88972630835984
Armijo: th(15000.000000000007)=-102.0869261135869; dx=0.0020903218290439568 evalInputDelta=-26.88972630835984
Armijo: th(3750.000000000002)=-102.10598732457; dx=0.008756387899352729 evalInputDelta=-26.870665097376744
Armijo: th(750.0000000000003)=-101.96628684303157; dx=0.044246564284174464 evalInputDelta=-27.01036557891517
Armijo: th(125.00000000000006)=-101.65417064107709; dx=0.2614194022471493 evalInputDelta=-27.32248178086965
Armijo: th(17.857142857142865)=-102.93161704501684; dx=1.7583408071969275 evalInputDelta=-26.045035376929903
Armijo: th(2.232142857142858)=-109.83064893913368; dx=14.650849592920709 evalInputDelta=-19.146003482813057
New Minimum: -128.97665242194674 > -148.74089982126375
WOLF (strong): th(0.24801587301587313)=-148.74089982126375; dx=29.545094368340994 evalInputDelta=19.764247399317014
END: th(0.024801587301587314)=-139.82077032879496; dx=-267.7549856742135 evalInputDelta=10.844117906848226
Fitness changed from -128.97665242194674 to -148.74089982126375
Iteration 9 complete. Error: -148.74089982126375 Total: 1.6397; Orientation: 0.0315; Line Search: 1.4914
Adding measurement b82e2b9 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 3.869e+04, gradient 4.317e-02, dot -0.116; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -148.74089982126375, -128.97665242194674, -14.009353062208156, -9.257402368594287, -6.692685655713243
Rejected: LBFGS Orientation magnitude: 2.405e+05, gradient 4.317e-02, dot -0.159; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -148.74089982126375, -128.97665242194674, -14.009353062208156, -9.257402368594287
LBFGS Accumulation History: 3 points
Removed measurement b82e2b9 to history. Total: 4
Removed measurement 79869427 to history. Total: 3
th(0)=-148.74089982126375;dx=-0.0017928060383512725
New Minimum: -148.74089982126375 > -148.74097430154103
END: th(0.05343340005039397)=-148.74097430154103; dx=-0.0013554556293037135 evalInputDelta=7.448027727718909E-5
Fitness changed from -148.74089982126375 to -148.74097430154103
Iteration 10 complete. Error: -148.74097430154103 Total: 0.4291; Orientation: 0.0660; Line Search: 0.2493
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/81ce959c-23ac-4371-8969-9d3936385ca1.jpg)
Adding measurement 5dcbb4c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.820e+03, gradient 4.362e-02, dot -0.102; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -148.74097430154103, -14.009353062208156, -9.257402368594287, -6.692685655713243
LBFGS Accumulation History: 3 points
Removed measurement 5dcbb4c3 to history. Total: 3
th(0)=-148.74097430154103;dx=-0.001846109652190315
New Minimum: -148.74097430154103 > -148.7411418820286
END: th(0.11511877067492018)=-148.7411418820286; dx=-0.0013992540087036855 evalInputDelta=1.675804875560516E-4
Fitness changed from -148.74097430154103 to -148.7411418820286
Iteration 11 complete. Error: -148.7411418820286 Total: 0.4368; Orientation: 0.0354; Line Search: 0.2655
Adding measurement 320d7ffd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.008e+03, gradient 4.340e-02, dot -0.104; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -148.7411418820286, -14.009353062208156, -9.257402368594287, -6.692685655713243
LBFGS Accumulation History: 3 points
Removed measurement 320d7ffd to history. Total: 3
th(0)=-148.7411418820286;dx=-0.0017935224028416046
New Minimum: -148.7411418820286 > -148.74151428243601
END: th(0.2480158730158732)=-148.74151428243601; dx=-0.0013974274107633794 evalInputDelta=3.724004074285858E-4
Fitness changed from -148.7411418820286 to -148.74151428243601
Iteration 12 complete. Error: -148.74151428243601 Total: 0.4168; Orientation: 0.0374; Line Search: 0.2536
Adding measurement 658c8301 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.699e+03, gradient 4.353e-02, dot -0.101; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -148.74151428243601, -14.009353062208156, -9.257402368594287, -6.692685655713243
LBFGS Accumulation History: 3 points
Removed measurement 658c8301 to history. Total: 3
th(0)=-148.74151428243601;dx=-0.0018052345745460019
New Minimum: -148.74151428243601 > -148.7422963202568
END: th(0.5343340005039399)=-148.7422963202568; dx=-0.0013726106037208554 evalInputDelta=7.820378207838985E-4
Fitness changed from -148.74151428243601 to -148.7422963202568
Iteration 13 complete. Error: -148.7422963202568 Total: 0.4024; Orientation: 0.0332; Line Search: 0.2435
Adding measurement 45a3b659 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.985e+03, gradient 4.350e-02, dot -0.104; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -148.7422963202568, -14.009353062208156, -9.257402368594287, -6.692685655713243
LBFGS Accumulation History: 3 points
Removed measurement 45a3b659 to history. Total: 3
th(0)=-148.7422963202568;dx=-0.0018144421717618698
New Minimum: -148.7422963202568 > -148.74400934111577
END: th(1.1511877067492022)=-148.74400934111577; dx=-0.0013683375850297615 evalInputDelta=0.0017130208589719587
Fitness changed from -148.7422963202568 to -148.74400934111577
Iteration 14 complete. Error: -148.74400934111577 Total: 0.3848; Orientation: 0.0317; Line Search: 0.2340
Adding measurement 10f345c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.916e+03, gradient 4.365e-02, dot -0.103; [65a2c6cc-199c-4ef9-9162-472c7b25c13f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -148.74400934111577, -14.009353062208156, -9.257402368594287, -6.692685655713243
LBFGS Accumulation History: 3 points
Removed measurement 10f345c1 to history. Total: 3
th(0)=-148.74400934111577;dx=-0.0018509782076502521
New Minimum: -148.74400934111577 > -148.7476277225037
END: th(2.480158730158733)=-148.7476277225037; dx=-0.0013849174021136716 evalInputDelta=0.003618381387923364
Fitness changed from -148.74400934111577 to -148.7476277225037
Iteration 15 complete. Error: -148.7476277225037 Total: 0.3808; Orientation: 0.0298; Line Search: 0.2347
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/2c7ff90c-3616-433e-a08b-6c5d2c664d97.jpg)
Final threshold in iteration 16: -148.7476277225037 (> -Infinity) after 8.802s (< 5400.000s)

Returns

    -148.7476277225037