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 34.48 seconds (0.573 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: 446514059575700
Reset training subject: 446514903145900
Adding measurement 288be91b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-5.38064238386976;dx=-1.4914531296006084E-6
New Minimum: -5.38064238386976 > -5.380645925329932
WOLFE (weak): th(2.154434690031884)=-5.380645925329932; dx=-1.4915811664924892E-6 evalInputDelta=3.541460172229449E-6
New Minimum: -5.380645925329932 > -5.380649466787774
WOLFE (weak): th(4.308869380063768)=-5.380649466787774; dx=-1.4773517085887978E-6 evalInputDelta=7.082918013878725E-6
New Minimum: -5.380649466787774 > -5.380664138516859
WOLFE (weak): th(12.926608140191302)=-5.380664138516859; dx=-1.4906623897917207E-6 evalInputDelta=2.1754647098859436E-5
New Minimum: -5.380664138516859 > -5.38072965488785
WOLFE (weak): th(51.70643256076521)=-5.38072965488785; dx=-1.4920876988794194E-6 evalInputDelta=8.727101809036242E-5
New Minimum: -5.38072965488785 > -5.381078977747492
WOLFE (weak): th(258.53216280382605)=-5.381078977747492; dx=-1.488216189677842E-6 evalInputDelta=4.365938777324274E-4
New Minimum: -5.381078977747492 > -5.383263438713149
WOLFE (weak): th(1551.1929768229563)=-5.383263438713149; dx=-1.4917480731407043E-6 evalInputDelta=0.002621054843388926
New Minimum: -5.383263438713149 > -5.398963298422865
WOLFE (weak): th(10858.350837760694)=-5.398963298422865; dx=-1.4894359488841887E-6 evalInputDelta=0.01832091455310536
New Minimum: -5.398963298422865 > -5.525359779446339
WOLFE (weak): th(86866.80670208555)=-5.525359779446339; dx=-1.4688220863979302E-6 evalInputDelta=0.14471739557657948
New Minimum: -5.525359779446339 > -6.393420355881973
END: th(781801.26031877)=-6.393420355881973; dx=-1.0189191985138232E-6 evalInputDelta=1.0127779720122128
Fitness changed from -5.38064238386976 to -6.393420355881973
Iteration 1 complete. Error: -6.393420355881973 Total: 10.3824; Orientation: 0.0225; Line Search: 7.7019
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b4b26147-cb57-4c50-831c-6d3005c3b7f9.jpg)
Adding measurement 45e38356 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-6.393420355881973;dx=-1.5385585975939876E-6
New Minimum: -6.393420355881973 > -7.483986160972485
END: th(1684339.7559414052)=-7.483986160972485; dx=-5.540064315270806E-7 evalInputDelta=1.0905658050905123
Fitness changed from -6.393420355881973 to -7.483986160972485
Iteration 2 complete. Error: -7.483986160972485 Total: 2.3719; Orientation: 0.0133; Line Search: 1.5465
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e964db91-b048-47f3-aa20-bbdbb4020c3f.jpg)
Adding measurement 4219e848 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-7.483986160972485;dx=-1.3431108262447372E-6
New Minimum: -7.483986160972485 > -8.727854623201221
END: th(3628800.0)=-8.727854623201221; dx=-2.764798542762979E-7 evalInputDelta=1.2438684622287361
Fitness changed from -7.483986160972485 to -8.727854623201221
Iteration 3 complete. Error: -8.727854623201221 Total: 2.6430; Orientation: 0.0126; Line Search: 1.7688
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e038b85a-d697-49bc-9918-e76e99e78c76.jpg)
Adding measurement 59e83ff0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.232e+03, gradient 1.049e-03, dot -0.229; [c5faa868-f44c-4581-9c55-3ceb3031561b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.727854623201221, -7.483986160972485, -6.393420355881973, -5.38064238386976
LBFGS Accumulation History: 3 points
Removed measurement 59e83ff0 to history. Total: 3
th(0)=-8.727854623201221;dx=-1.0970838439176257E-6
New Minimum: -8.727854623201221 > -10.520382576188618
END: th(7818012.6031877)=-10.520382576188618; dx=-1.281114971711438E-7 evalInputDelta=1.7925279529873972
Fitness changed from -8.727854623201221 to -10.520382576188618
Iteration 4 complete. Error: -10.520382576188618 Total: 2.5832; Orientation: 0.2579; Line Search: 1.4991
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/5df0a655-f972-48af-a543-173c702c1204.jpg)
Adding measurement 1d5e16a9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.394e+03, gradient 9.448e-04, dot -0.195; [c5faa868-f44c-4581-9c55-3ceb3031561b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -10.520382576188618, -7.483986160972485, -6.393420355881973, -5.38064238386976
LBFGS Accumulation History: 3 points
Removed measurement 1d5e16a9 to history. Total: 3
th(0)=-10.520382576188618;dx=-8.905247723757598E-7
New Minimum: -10.520382576188618 > -12.975139295752829
END: th(1.684339755941405E7)=-12.975139295752829; dx=-5.218862182360638E-8 evalInputDelta=2.4547567195642106
Fitness changed from -10.520382576188618 to -12.975139295752829
Iteration 5 complete. Error: -12.975139295752829 Total: 2.5735; Orientation: 0.2545; Line Search: 1.4797
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1810563a-5572-4230-91c5-25df442f5f75.jpg)
Adding measurement cf64a6d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.551e+03, gradient 8.005e-04, dot -0.134; [c5faa868-f44c-4581-9c55-3ceb3031561b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.975139295752829, -7.483986160972485, -6.393420355881973, -5.38064238386976
LBFGS Accumulation History: 3 points
Removed measurement cf64a6d to history. Total: 3
th(0)=-12.975139295752829;dx=-6.360926130626341E-7
New Minimum: -12.975139295752829 > -16.94574349305078
END: th(3.6288E7)=-16.94574349305078; dx=-2.329898433612364E-8 evalInputDelta=3.970604197297952
Fitness changed from -12.975139295752829 to -16.94574349305078
Iteration 6 complete. Error: -16.94574349305078 Total: 2.6518; Orientation: 0.2395; Line Search: 1.4881
Adding measurement 76be352d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.930e+03, gradient 6.753e-04, dot -0.091; [c5faa868-f44c-4581-9c55-3ceb3031561b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.94574349305078, -7.483986160972485, -6.393420355881973, -5.38064238386976
LBFGS Accumulation History: 3 points
Removed measurement 76be352d to history. Total: 3
th(0)=-16.94574349305078;dx=-4.52778180901451E-7
New Minimum: -16.94574349305078 > -21.60793866092214
END: th(7.8180126031877E7)=-21.60793866092214; dx=-6.130088522940721E-9 evalInputDelta=4.66219516787136
Fitness changed from -16.94574349305078 to -21.60793866092214
Iteration 7 complete. Error: -21.60793866092214 Total: 2.5087; Orientation: 0.2497; Line Search: 1.4913
Adding measurement 1fffd548 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.030e+04, gradient 5.489e-04, dot -0.055; [c5faa868-f44c-4581-9c55-3ceb3031561b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.60793866092214, -7.483986160972485, -6.393420355881973, -5.38064238386976
LBFGS Accumulation History: 3 points
Removed measurement 1fffd548 to history. Total: 3
th(0)=-21.60793866092214;dx=-2.9911127049007085E-7
New Minimum: -21.60793866092214 > -28.339852108712186
END: th(1.6843397559414053E8)=-28.339852108712186; dx=-2.170430612258199E-9 evalInputDelta=6.7319134477900455
Fitness changed from -21.60793866092214 to -28.339852108712186
Iteration 8 complete. Error: -28.339852108712186 Total: 2.6884; Orientation: 0.2621; Line Search: 1.6834
Adding measurement f42576a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.496e+04, gradient 3.945e-04, dot -0.033; [c5faa868-f44c-4581-9c55-3ceb3031561b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.339852108712186, -7.483986160972485, -6.393420355881973, -5.38064238386976
LBFGS Accumulation History: 3 points
Removed measurement f42576a to history. Total: 3
th(0)=-28.339852108712186;dx=-1.5488215020366617E-7
New Minimum: -28.339852108712186 > -34.82099100255315
END: th(3.6288000000000006E8)=-34.82099100255315; dx=-6.326909352582625E-10 evalInputDelta=6.4811388938409635
Fitness changed from -28.339852108712186 to -34.82099100255315
Iteration 9 complete. Error: -34.82099100255315 Total: 2.6818; Orientation: 0.2375; Line Search: 1.5047
Adding measurement 182c3b79 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.775e+04, gradient 2.649e-04, dot -0.024; [c5faa868-f44c-4581-9c55-3ceb3031561b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -34.82099100255315, -7.483986160972485, -6.393420355881973, -5.38064238386976
LBFGS Accumulation History: 3 points
Removed measurement 182c3b79 to history. Total: 3
th(0)=-34.82099100255315;dx=-7.002698193312495E-8
New Minimum: -34.82099100255315 > -37.519260100660496
WOLF (strong): th(7.818012603187702E8)=-37.519260100660496; dx=3.112864717406243E-10 evalInputDelta=2.698269098107346
New Minimum: -37.519260100660496 > -39.91356347395191
END: th(3.909006301593851E8)=-39.91356347395191; dx=-1.0569796544730901E-9 evalInputDelta=5.092572471398761
Fitness changed from -34.82099100255315 to -39.91356347395191
Iteration 10 complete. Error: -39.91356347395191 Total: 3.3321; Orientation: 0.2579; Line Search: 2.3298
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/28da6fae-d494-4088-a816-549dead28a66.jpg)
Final threshold in iteration 11: -39.91356347395191 (> -Infinity) after 34.480s (< 5400.000s)

Returns

    -39.91356347395191