Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 85.92 seconds (0.855 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: 308932406752700
Reset training subject: 308934192826400
Adding measurement 5bd8d12c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-140.6383822329059;dx=-2.6127487261067536E-5
New Minimum: -140.6383822329059 > -140.6384261361259
END: th(2.154434690031884)=-140.6384261361259; dx=-1.6962082507933548E-5 evalInputDelta=4.390321998926083E-5
Fitness changed from -140.6383822329059 to -140.6384261361259
Iteration 1 complete. Error: -140.6384261361259 Total: 8.3600; Orientation: 0.0615; Line Search: 3.3161
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3c0a9c36-ecc8-4b65-b94c-4fe9e321eb45.jpg)
Adding measurement 2e007aa7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-140.6384261361259;dx=-1.6845772971185623E-5
New Minimum: -140.6384261361259 > -140.63851394252478
WOLFE (weak): th(4.641588833612779)=-140.63851394252478; dx=-1.6843825439053902E-5 evalInputDelta=8.780639888072983E-5
New Minimum: -140.63851394252478 > -140.6385944316756
WOLFE (weak): th(9.283177667225559)=-140.6385944316756; dx=-1.6820768850044833E-5 evalInputDelta=1.6829554971309335E-4
New Minimum: -140.6385944316756 > -140.63894565652188
WOLFE (weak): th(27.849533001676676)=-140.63894565652188; dx=-1.6829475364329508E-5 evalInputDelta=5.195203959829087E-4
New Minimum: -140.63894565652188 > -140.64049688910103
WOLFE (weak): th(111.3981320067067)=-140.64049688910103; dx=-1.682071644728359E-5 evalInputDelta=0.002070752975129153
New Minimum: -140.64049688910103 > -140.64878691279074
WOLFE (weak): th(556.9906600335335)=-140.64878691279074; dx=-1.681695998168732E-5 evalInputDelta=0.010360776664839477
New Minimum: -140.64878691279074 > -140.7005866660284
WOLFE (weak): th(3341.9439602012008)=-140.7005866660284; dx=-1.681285315357093E-5 evalInputDelta=0.06216052990251342
New Minimum: -140.7005866660284 > -141.07278500378155
WOLFE (weak): th(23393.607721408407)=-141.07278500378155; dx=-1.675131374944014E-5 evalInputDelta=0.43435886765564646
New Minimum: -141.07278500378155 > -144.05546370202782
WOLFE (weak): th(187148.86177126726)=-144.05546370202782; dx=-1.6187114978786386E-5 evalInputDelta=3.4170375659019214
New Minimum: -144.05546370202782 > -165.44414467348628
END: th(1684339.7559414054)=-165.44414467348628; dx=-9.441813052890383E-6 evalInputDelta=24.805718537360377
Fitness changed from -140.6384261361259 to -165.44414467348628
Iteration 2 complete. Error: -165.44414467348628 Total: 18.1856; Orientation: 0.0605; Line Search: 16.2849
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e0f292ec-914c-4815-9756-04a705719401.jpg)
Adding measurement 229bd8f8 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-165.44414467348628;dx=-1.1269560866118416E-5
New Minimum: -165.44414467348628 > -192.85612184788545
END: th(3628800.0000000005)=-192.85612184788545; dx=-3.752180528470554E-6 evalInputDelta=27.41197717439917
Fitness changed from -165.44414467348628 to -192.85612184788545
Iteration 3 complete. Error: -192.85612184788545 Total: 5.1376; Orientation: 0.0760; Line Search: 3.1717
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c15e1c61-6089-477e-8d39-cdd8023723c2.jpg)
Adding measurement 6ef03c82 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.155e+04, gradient 3.003e-03, dot -0.400; [d5039b6b-c504-4db3-8783-e36ba3d13870 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -192.85612184788545, -165.44414467348628, -140.6384261361259, -140.6383822329059
LBFGS Accumulation History: 3 points
Removed measurement 6ef03c82 to history. Total: 3
th(0)=-192.85612184788545;dx=-9.014886999792208E-6
New Minimum: -192.85612184788545 > -212.3767799591023
WOLF (strong): th(7818012.603187701)=-212.3767799591023; dx=3.654191652963153E-7 evalInputDelta=19.520658111216846
END: th(3909006.3015938504)=-211.32164986778514; dx=-1.4640287767976256E-6 evalInputDelta=18.465528019899693
Fitness changed from -192.85612184788545 to -212.3767799591023
Iteration 4 complete. Error: -212.3767799591023 Total: 7.7687; Orientation: 1.0630; Line Search: 4.9084
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1475d277-747b-4e4b-a7d3-f61f3562a2a6.jpg)
Adding measurement 24325eb2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.414e+03, gradient 3.748e-03, dot -0.139; [d5039b6b-c504-4db3-8783-e36ba3d13870 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -212.3767799591023, -165.44414467348628, -140.6384261361259, -140.6383822329059
LBFGS Accumulation History: 3 points
Removed measurement 24325eb2 to history. Total: 3
th(0)=-212.3767799591023;dx=-1.4031439536437872E-5
New Minimum: -212.3767799591023 > -220.2233142808532
WOLF (strong): th(8421698.779707028)=-220.2233142808532; dx=4.565835095937668E-6 evalInputDelta=7.846534321750909
New Minimum: -220.2233142808532 > -238.96082438340616
WOLF (strong): th(4210849.389853514)=-238.96082438340616; dx=1.3898519610441818E-6 evalInputDelta=26.58404442430387
END: th(1403616.4632845046)=-229.9514836804604; dx=-8.51891177981841E-6 evalInputDelta=17.574703721358105
Fitness changed from -212.3767799591023 to -238.96082438340616
Iteration 5 complete. Error: -238.96082438340616 Total: 9.4419; Orientation: 1.0553; Line Search: 6.5021
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/17723714-a95c-4b10-a93d-691cacfda15c.jpg)
Adding measurement 24586b74 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.714e+04, gradient 3.081e-03, dot -0.240; [d5039b6b-c504-4db3-8783-e36ba3d13870 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -238.96082438340616, -165.44414467348628, -140.6384261361259, -140.6383822329059
LBFGS Accumulation History: 3 points
Removed measurement 24586b74 to history. Total: 3
th(0)=-238.96082438340616;dx=-9.492043088106318E-6
New Minimum: -238.96082438340616 > -256.00500925678995
END: th(3024000.0000000005)=-256.00500925678995; dx=-1.0578504671567698E-6 evalInputDelta=17.044184873383784
Fitness changed from -238.96082438340616 to -256.00500925678995
Iteration 6 complete. Error: -256.00500925678995 Total: 6.3575; Orientation: 1.0673; Line Search: 3.4610
Adding measurement 2a49b8c5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.020e+04, gradient 2.347e-03, dot -0.419; [d5039b6b-c504-4db3-8783-e36ba3d13870 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -256.00500925678995, -165.44414467348628, -140.6384261361259, -140.6383822329059
LBFGS Accumulation History: 3 points
Removed measurement 2a49b8c5 to history. Total: 3
th(0)=-256.00500925678995;dx=-5.509422485933119E-6
New Minimum: -256.00500925678995 > -267.16084435310853
WOLF (strong): th(6515010.502656418)=-267.16084435310853; dx=7.973577478269833E-7 evalInputDelta=11.155835096318583
New Minimum: -267.16084435310853 > -267.4354215471677
END: th(3257505.251328209)=-267.4354215471677; dx=-1.3202623240627605E-6 evalInputDelta=11.430412290377774
Fitness changed from -256.00500925678995 to -267.4354215471677
Iteration 7 complete. Error: -267.4354215471677 Total: 7.3607; Orientation: 1.0111; Line Search: 4.8323
Adding measurement 146cfb54 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.371e+04, gradient 2.221e-03, dot -0.431; [d5039b6b-c504-4db3-8783-e36ba3d13870 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -267.4354215471677, -165.44414467348628, -140.6384261361259, -140.6383822329059
LBFGS Accumulation History: 3 points
Removed measurement 146cfb54 to history. Total: 3
th(0)=-267.4354215471677;dx=-4.931231158149128E-6
New Minimum: -267.4354215471677 > -275.6218786532159
WOLF (strong): th(7018082.316422524)=-275.6218786532159; dx=8.913248413541313E-7 evalInputDelta=8.18645710604818
New Minimum: -275.6218786532159 > -277.1884186940456
END: th(3509041.158211262)=-277.1884186940456; dx=-7.135254777921708E-7 evalInputDelta=9.752997146877874
Fitness changed from -267.4354215471677 to -277.1884186940456
Iteration 8 complete. Error: -277.1884186940456 Total: 7.6342; Orientation: 0.9769; Line Search: 4.9729
Adding measurement 3e50b867 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.594e+04, gradient 2.249e-03, dot -0.404; [d5039b6b-c504-4db3-8783-e36ba3d13870 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -277.1884186940456, -165.44414467348628, -140.6384261361259, -140.6383822329059
LBFGS Accumulation History: 3 points
Removed measurement 3e50b867 to history. Total: 3
th(0)=-277.1884186940456;dx=-5.051045387905875E-6
New Minimum: -277.1884186940456 > -280.6586742770676
WOLF (strong): th(7560000.000000003)=-280.6586742770676; dx=1.6484346065112237E-6 evalInputDelta=3.470255583021981
New Minimum: -280.6586742770676 > -285.8953535959245
WOLF (strong): th(3780000.0000000014)=-285.8953535959245; dx=1.3884066867137513E-7 evalInputDelta=8.706934901878924
END: th(1260000.0000000005)=-282.6940631196653; dx=-3.0613332567917494E-6 evalInputDelta=5.505644425619721
Fitness changed from -277.1884186940456 to -285.8953535959245
Iteration 9 complete. Error: -285.8953535959245 Total: 9.1977; Orientation: 1.0596; Line Search: 6.6089
Adding measurement 7e3ad848 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.482e+04, gradient 2.331e-03, dot -0.350; [d5039b6b-c504-4db3-8783-e36ba3d13870 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -285.8953535959245, -165.44414467348628, -140.6384261361259, -140.6383822329059
LBFGS Accumulation History: 3 points
Removed measurement 7e3ad848 to history. Total: 3
th(0)=-285.8953535959245;dx=-5.421955281852785E-6
New Minimum: -285.8953535959245 > -294.42282585037515
END: th(2714587.7094401745)=-294.42282585037515; dx=-5.584662982611123E-7 evalInputDelta=8.527472254450629
Fitness changed from -285.8953535959245 to -294.42282585037515
Iteration 10 complete. Error: -294.42282585037515 Total: 6.1960; Orientation: 1.0593; Line Search: 3.5229
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/7a9029ff-8b45-4e3b-b4e7-5a0d4333efc2.jpg)
Final threshold in iteration 11: -294.42282585037515 (> -Infinity) after 85.917s (< 5400.000s)

Returns

    -294.42282585037515