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 87.10 seconds (0.927 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: 307307337259800
Reset training subject: 307309026793300
Adding measurement 6f60d3f9 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-150.52380079330368;dx=-2.9018404385623693E-5
New Minimum: -150.52380079330368 > -150.52383497659156
END: th(2.154434690031884)=-150.52383497659156; dx=-1.8228027568548395E-5 evalInputDelta=3.418328788029612E-5
Fitness changed from -150.52380079330368 to -150.52383497659156
Iteration 1 complete. Error: -150.52383497659156 Total: 8.3162; Orientation: 0.0611; Line Search: 3.4205
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5148f16e-fdd4-44ac-bb1e-715c774821fd.jpg)
Adding measurement 79545115 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-150.52383497659156;dx=-1.8118112495578955E-5
New Minimum: -150.52383497659156 > -150.5239306897563
WOLFE (weak): th(4.641588833612779)=-150.5239306897563; dx=-1.8102656409761196E-5 evalInputDelta=9.571316473966363E-5
New Minimum: -150.5239306897563 > -150.5240264028602
WOLFE (weak): th(9.283177667225559)=-150.5240264028602; dx=-1.8088921035754785E-5 evalInputDelta=1.9142626862844736E-4
New Minimum: -150.5240264028602 > -150.52440241803632
WOLFE (weak): th(27.849533001676676)=-150.52440241803632; dx=-1.805301657968137E-5 evalInputDelta=5.674414447582876E-4
New Minimum: -150.52440241803632 > -150.52607054676358
WOLFE (weak): th(111.3981320067067)=-150.52607054676358; dx=-1.8062055207355124E-5 evalInputDelta=0.002235570172018697
New Minimum: -150.52607054676358 > -150.5350193315999
WOLFE (weak): th(556.9906600335335)=-150.5350193315999; dx=-1.803134670948714E-5 evalInputDelta=0.011184355008339253
New Minimum: -150.5350193315999 > -150.5908534770107
WOLFE (weak): th(3341.9439602012008)=-150.5908534770107; dx=-1.8034909568821164E-5 evalInputDelta=0.06701850041915236
New Minimum: -150.5908534770107 > -150.99229891362992
WOLFE (weak): th(23393.607721408407)=-150.99229891362992; dx=-1.7993056485982174E-5 evalInputDelta=0.468463937038365
New Minimum: -150.99229891362992 > -154.2073008308853
WOLFE (weak): th(187148.86177126726)=-154.2073008308853; dx=-1.7368665831246563E-5 evalInputDelta=3.683465854293729
New Minimum: -154.2073008308853 > -177.18964093997081
END: th(1684339.7559414054)=-177.18964093997081; dx=-1.0125271655075251E-5 evalInputDelta=26.665805963379256
Fitness changed from -150.52383497659156 to -177.18964093997081
Iteration 2 complete. Error: -177.18964093997081 Total: 18.4140; Orientation: 0.0612; Line Search: 16.4776
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3d6b3923-68a0-4ff2-9ed8-300337e7c541.jpg)
Adding measurement 24c26f99 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-177.18964093997081;dx=-1.276087659728292E-5
New Minimum: -177.18964093997081 > -207.91057143663164
END: th(3628800.0000000005)=-207.91057143663164; dx=-4.336529242607139E-6 evalInputDelta=30.720930496660827
Fitness changed from -177.18964093997081 to -207.91057143663164
Iteration 3 complete. Error: -207.91057143663164 Total: 5.3530; Orientation: 0.0571; Line Search: 3.2613
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a78f29e4-4cc1-4236-856e-211844ecf2e8.jpg)
Adding measurement 5f916bd7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.362e+04, gradient 3.171e-03, dot -0.413; [89915de6-5620-4cd4-882d-c3db43ccae45 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -207.91057143663164, -177.18964093997081, -150.52383497659156, -150.52380079330368
LBFGS Accumulation History: 3 points
Removed measurement 5f916bd7 to history. Total: 3
th(0)=-207.91057143663164;dx=-1.0038597691258277E-5
New Minimum: -207.91057143663164 > -233.5044139158989
END: th(7818012.603187701)=-233.5044139158989; dx=-3.1016705127469916E-8 evalInputDelta=25.593842479267266
Fitness changed from -207.91057143663164 to -233.5044139158989
Iteration 4 complete. Error: -233.5044139158989 Total: 6.5097; Orientation: 1.0646; Line Search: 3.5031
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e9849a21-7742-4d4c-8b0e-74ffb29a6ffd.jpg)
Adding measurement 3e02b94c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.258e+03, gradient 3.741e-03, dot -0.152; [89915de6-5620-4cd4-882d-c3db43ccae45 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -233.5044139158989, -177.18964093997081, -150.52383497659156, -150.52380079330368
LBFGS Accumulation History: 3 points
Removed measurement 3e02b94c to history. Total: 3
th(0)=-233.5044139158989;dx=-1.3979847663152523E-5
Armijo: th(1.6843397559414055E7)=-207.4232738453373; dx=3.17798294553295E-6 evalInputDelta=-26.081140070561617
New Minimum: -233.5044139158989 > -246.0280362730296
WOLF (strong): th(8421698.779707028)=-246.0280362730296; dx=4.204801982205067E-6 evalInputDelta=12.523622357130705
New Minimum: -246.0280362730296 > -260.0207725853025
END: th(2807232.926569009)=-260.0207725853025; dx=-3.3210275985694615E-6 evalInputDelta=26.516358669403587
Fitness changed from -233.5044139158989 to -260.0207725853025
Iteration 5 complete. Error: -260.0207725853025 Total: 9.6013; Orientation: 1.0594; Line Search: 6.7558
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0d67726d-509f-44b7-8ff5-543d03ec036a.jpg)
Adding measurement 15c3156 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.405e+04, gradient 2.508e-03, dot -0.397; [89915de6-5620-4cd4-882d-c3db43ccae45 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -260.0207725853025, -177.18964093997081, -150.52383497659156, -150.52380079330368
LBFGS Accumulation History: 3 points
Removed measurement 15c3156 to history. Total: 3
th(0)=-260.0207725853025;dx=-6.280996970698293E-6
New Minimum: -260.0207725853025 > -278.33637220767747
END: th(6048000.000000001)=-278.33637220767747; dx=-3.8229868908668036E-7 evalInputDelta=18.315599622374975
Fitness changed from -260.0207725853025 to -278.33637220767747
Iteration 6 complete. Error: -278.33637220767747 Total: 6.0672; Orientation: 1.0262; Line Search: 3.2002
Adding measurement 430445ec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.333e+04, gradient 2.907e-03, dot -0.269; [89915de6-5620-4cd4-882d-c3db43ccae45 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -278.33637220767747, -177.18964093997081, -150.52383497659156, -150.52380079330368
LBFGS Accumulation History: 3 points
Removed measurement 430445ec to history. Total: 3
th(0)=-278.33637220767747;dx=-8.42747363202514E-6
Armijo: th(1.3030021005312836E7)=-260.8525660921431; dx=2.919557854619247E-6 evalInputDelta=-17.483806115534378
New Minimum: -278.33637220767747 > -285.42128098140506
WOLF (strong): th(6515010.502656418)=-285.42128098140506; dx=2.915447836893332E-6 evalInputDelta=7.084908773727591
New Minimum: -285.42128098140506 > -291.32122248557715
END: th(2171670.167552139)=-291.32122248557715; dx=-2.582919936673315E-6 evalInputDelta=12.984850277899682
Fitness changed from -278.33637220767747 to -291.32122248557715
Iteration 7 complete. Error: -291.32122248557715 Total: 9.5148; Orientation: 1.0998; Line Search: 6.6343
Adding measurement 2dfa284d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.267e+04, gradient 1.904e-03, dot -0.491; [89915de6-5620-4cd4-882d-c3db43ccae45 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -291.32122248557715, -177.18964093997081, -150.52383497659156, -150.52380079330368
LBFGS Accumulation History: 3 points
Removed measurement 2dfa284d to history. Total: 3
th(0)=-291.32122248557715;dx=-3.6137794775336918E-6
New Minimum: -291.32122248557715 > -303.050098675657
END: th(4678721.544281682)=-303.050098675657; dx=-1.4439528003549745E-6 evalInputDelta=11.728876190079859
Fitness changed from -291.32122248557715 to -303.050098675657
Iteration 8 complete. Error: -303.050098675657 Total: 6.0160; Orientation: 1.1108; Line Search: 3.2862
Adding measurement 5114e642 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.239e+04, gradient 2.023e-03, dot -0.412; [89915de6-5620-4cd4-882d-c3db43ccae45 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -303.050098675657, -177.18964093997081, -150.52383497659156, -150.52380079330368
LBFGS Accumulation History: 3 points
Removed measurement 5114e642 to history. Total: 3
th(0)=-303.050098675657;dx=-4.082659158119127E-6
New Minimum: -303.050098675657 > -306.00879044311733
WOLF (strong): th(1.0080000000000002E7)=-306.00879044311733; dx=1.1310630035403047E-6 evalInputDelta=2.958691767460323
New Minimum: -306.00879044311733 > -311.06350515034336
WOLF (strong): th(5040000.000000001)=-311.06350515034336; dx=9.313743759658518E-8 evalInputDelta=8.013406474686349
END: th(1680000.0000000002)=-308.53604612792566; dx=-2.1275622178361924E-6 evalInputDelta=5.485947452268647
Fitness changed from -303.050098675657 to -311.06350515034336
Iteration 9 complete. Error: -311.06350515034336 Total: 9.1903; Orientation: 1.0548; Line Search: 6.5815
Adding measurement 531d2c5f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.919e+04, gradient 2.338e-03, dot -0.300; [89915de6-5620-4cd4-882d-c3db43ccae45 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -311.06350515034336, -177.18964093997081, -150.52383497659156, -150.52380079330368
LBFGS Accumulation History: 3 points
Removed measurement 531d2c5f to history. Total: 3
th(0)=-311.06350515034336;dx=-5.460072528904931E-6
New Minimum: -311.06350515034336 > -320.07368882748483
WOLF (strong): th(3619450.2792535652)=-320.07368882748483; dx=5.156630080753094E-7 evalInputDelta=9.01018367714147
END: th(1809725.1396267826)=-318.70352684934534; dx=-2.3699064653638142E-6 evalInputDelta=7.640021699001977
Fitness changed from -311.06350515034336 to -320.07368882748483
Iteration 10 complete. Error: -320.07368882748483 Total: 7.7892; Orientation: 1.0378; Line Search: 5.1978
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c58a596c-612c-4fcc-8478-085122d79b7a.jpg)
Final threshold in iteration 11: -320.07368882748483 (> -Infinity) after 87.100s (< 5400.000s)

Returns

    -320.07368882748483