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 112.72 seconds (1.204 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: 40120777488500
Reset training subject: 40123568436100
Adding measurement 3d5e0bf0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-75.34017231550213;dx=-1.643819952353958E-6
New Minimum: -75.34017231550213 > -75.34017695854597
END: th(2.154434690031884)=-75.34017695854597; dx=-1.4075304228269647E-6 evalInputDelta=4.643043837404548E-6
Fitness changed from -75.34017231550213 to -75.34017695854597
Iteration 1 complete. Error: -75.34017695854597 Total: 12.1446; Orientation: 0.0535; Line Search: 4.7071
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/2d0bdee4-bc47-4ab5-8fba-c277719bb197.jpg)
Adding measurement 1be3a294 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-75.34017695854597;dx=-1.3700441092532902E-6
New Minimum: -75.34017695854597 > -75.34018392311123
WOLFE (weak): th(4.641588833612779)=-75.34018392311123; dx=-1.3698864516782687E-6 evalInputDelta=6.964565258726907E-6
New Minimum: -75.34018392311123 > -75.34018624463282
WOLFE (weak): th(9.283177667225559)=-75.34018624463282; dx=-1.3694459753283108E-6 evalInputDelta=9.286086850579522E-6
New Minimum: -75.34018624463282 > -75.34021874592777
WOLFE (weak): th(27.849533001676676)=-75.34021874592777; dx=-1.370087875399894E-6 evalInputDelta=4.178738180371511E-5
New Minimum: -75.34021874592777 > -75.34034642945076
WOLFE (weak): th(111.3981320067067)=-75.34034642945076; dx=-1.3699452151732595E-6 evalInputDelta=1.6947090479391136E-4
New Minimum: -75.34034642945076 > -75.34101734477032
WOLFE (weak): th(556.9906600335335)=-75.34101734477032; dx=-1.3698786676434607E-6 evalInputDelta=8.403862243540061E-4
New Minimum: -75.34101734477032 > -75.3452191352894
WOLFE (weak): th(3341.9439602012008)=-75.3452191352894; dx=-1.3690222146345292E-6 evalInputDelta=0.005042176743430105
New Minimum: -75.3452191352894 > -75.3754651126169
WOLFE (weak): th(23393.607721408407)=-75.3754651126169; dx=-1.3686184042505182E-6 evalInputDelta=0.035288154070926225
New Minimum: -75.3754651126169 > -75.61938903038943
WOLFE (weak): th(187148.86177126726)=-75.61938903038943; dx=-1.333325627544299E-6 evalInputDelta=0.2792120718434603
New Minimum: -75.61938903038943 > -77.57007350851188
END: th(1684339.7559414054)=-77.57007350851188; dx=-1.0612558877014768E-6 evalInputDelta=2.2298965499659147
Fitness changed from -75.34017695854597 to -77.57007350851188
Iteration 2 complete. Error: -77.57007350851188 Total: 25.7471; Orientation: 0.0549; Line Search: 23.0567
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/57fd80c4-52d5-4ac2-9aad-88dbe8c0f574.jpg)
Adding measurement 14941b06 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-77.57007350851188;dx=-1.0010127034526335E-6
New Minimum: -77.57007350851188 > -80.93603438421032
END: th(3628800.0000000005)=-80.93603438421032; dx=-7.317682796337134E-7 evalInputDelta=3.365960875698434
Fitness changed from -77.57007350851188 to -80.93603438421032
Iteration 3 complete. Error: -80.93603438421032 Total: 7.1315; Orientation: 0.0533; Line Search: 4.5095
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/dfcc8664-0280-435b-bb79-438482e017a7.jpg)
Adding measurement 43f4621b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.579e+03, gradient 8.201e-04, dot -0.889; [de2b5e0a-1dd7-4e29-ab15-47e262d98744 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.93603438421032, -77.57007350851188, -75.34017695854597, -75.34017231550213
LBFGS Accumulation History: 3 points
Removed measurement 43f4621b to history. Total: 3
th(0)=-80.93603438421032;dx=-6.719522175985633E-7
New Minimum: -80.93603438421032 > -85.58832602339493
END: th(7818012.603187701)=-85.58832602339493; dx=-4.501979347445387E-7 evalInputDelta=4.652291639184611
Fitness changed from -80.93603438421032 to -85.58832602339493
Iteration 4 complete. Error: -85.58832602339493 Total: 8.3478; Orientation: 1.1727; Line Search: 4.5014
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e88d1613-028f-4b91-856f-0693294d7692.jpg)
Adding measurement 685a3c14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.100e+03, gradient 6.665e-04, dot -0.801; [de2b5e0a-1dd7-4e29-ab15-47e262d98744 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -85.58832602339493, -77.57007350851188, -75.34017695854597, -75.34017231550213
LBFGS Accumulation History: 3 points
Removed measurement 685a3c14 to history. Total: 3
th(0)=-85.58832602339493;dx=-4.43295571979751E-7
New Minimum: -85.58832602339493 > -91.80922009284721
END: th(1.6843397559414055E7)=-91.80922009284721; dx=-2.7759601435431197E-7 evalInputDelta=6.220894069452285
Fitness changed from -85.58832602339493 to -91.80922009284721
Iteration 5 complete. Error: -91.80922009284721 Total: 8.5564; Orientation: 1.0614; Line Search: 4.7566
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/86e50d25-de07-4d76-a70c-4e139e2bb65f.jpg)
Adding measurement 4baf0b7f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.409e+04, gradient 5.720e-04, dot -0.717; [de2b5e0a-1dd7-4e29-ab15-47e262d98744 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.80922009284721, -77.57007350851188, -75.34017695854597, -75.34017231550213
LBFGS Accumulation History: 3 points
Removed measurement 4baf0b7f to history. Total: 3
th(0)=-91.80922009284721;dx=-3.271373624667808E-7
New Minimum: -91.80922009284721 > -99.28094854884161
END: th(3.628800000000001E7)=-99.28094854884161; dx=-1.2193463862642806E-7 evalInputDelta=7.471728455994395
Fitness changed from -91.80922009284721 to -99.28094854884161
Iteration 6 complete. Error: -99.28094854884161 Total: 9.5165; Orientation: 1.1095; Line Search: 5.4399
Adding measurement 71e839ee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.787e+04, gradient 6.281e-04, dot -0.435; [de2b5e0a-1dd7-4e29-ab15-47e262d98744 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -99.28094854884161, -77.57007350851188, -75.34017695854597, -75.34017231550213
LBFGS Accumulation History: 3 points
Removed measurement 71e839ee to history. Total: 3
th(0)=-99.28094854884161;dx=-3.9398589106446283E-7
Armijo: th(7.818012603187701E7)=-94.87807281746443; dx=1.4904733839041089E-7 evalInputDelta=-4.402875731377179
New Minimum: -99.28094854884161 > -101.53146679109267
WOLF (strong): th(3.9090063015938506E7)=-101.53146679109267; dx=1.0515990779460722E-7 evalInputDelta=2.2505182422510615
New Minimum: -101.53146679109267 > -102.66634296399513
END: th(1.3030021005312836E7)=-102.66634296399513; dx=-1.203305307976377E-7 evalInputDelta=3.3853944151535273
Fitness changed from -99.28094854884161 to -102.66634296399513
Iteration 7 complete. Error: -102.66634296399513 Total: 12.1396; Orientation: 1.0727; Line Search: 8.7699
Adding measurement 37445c57 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.482e+04, gradient 4.792e-04, dot -0.642; [de2b5e0a-1dd7-4e29-ab15-47e262d98744 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.66634296399513, -77.57007350851188, -75.34017695854597, -75.34017231550213
LBFGS Accumulation History: 3 points
Removed measurement 37445c57 to history. Total: 3
th(0)=-102.66634296399513;dx=-2.2906386105288452E-7
New Minimum: -102.66634296399513 > -106.24636465164086
END: th(2.8072329265690096E7)=-106.24636465164086; dx=-5.892281827986103E-8 evalInputDelta=3.5800216876457256
Fitness changed from -102.66634296399513 to -106.24636465164086
Iteration 8 complete. Error: -106.24636465164086 Total: 7.9472; Orientation: 1.1184; Line Search: 4.6374
Adding measurement 4d048945 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.583e+04, gradient 5.836e-04, dot -0.445; [de2b5e0a-1dd7-4e29-ab15-47e262d98744 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -106.24636465164086, -77.57007350851188, -75.34017695854597, -75.34017231550213
LBFGS Accumulation History: 3 points
Removed measurement 4d048945 to history. Total: 3
th(0)=-106.24636465164086;dx=-3.394621141117632E-7
Armijo: th(6.048000000000002E7)=-102.74969424277165; dx=1.4672218793500068E-7 evalInputDelta=-3.496670408869207
New Minimum: -106.24636465164086 > -107.86279283713489
WOLF (strong): th(3.024000000000001E7)=-107.86279283713489; dx=1.0476291338152545E-7 evalInputDelta=1.61642818549403
New Minimum: -107.86279283713489 > -108.65834759553306
END: th(1.0080000000000004E7)=-108.65834759553306; dx=-1.2332757787822984E-7 evalInputDelta=2.4119829438921983
Fitness changed from -106.24636465164086 to -108.65834759553306
Iteration 9 complete. Error: -108.65834759553306 Total: 12.6019; Orientation: 1.1235; Line Search: 9.3060
Adding measurement 2f738b8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.218e+04, gradient 4.042e-04, dot -0.694; [de2b5e0a-1dd7-4e29-ab15-47e262d98744 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -108.65834759553306, -77.57007350851188, -75.34017695854597, -75.34017231550213
LBFGS Accumulation History: 3 points
Removed measurement 2f738b8 to history. Total: 3
th(0)=-108.65834759553306;dx=-1.620977521401668E-7
New Minimum: -108.65834759553306 > -111.28233955802848
END: th(2.1716701675521396E7)=-111.28233955802848; dx=-9.465136575514377E-8 evalInputDelta=2.623991962495424
Fitness changed from -108.65834759553306 to -111.28233955802848
Iteration 10 complete. Error: -111.28233955802848 Total: 8.1572; Orientation: 1.1871; Line Search: 4.4927
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c5950aca-3c92-4d66-9580-6d5a18cf8ddd.jpg)
Final threshold in iteration 11: -111.28233955802848 (> -Infinity) after 112.717s (< 5400.000s)

Returns

    -111.28233955802848