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 7.17 seconds (0.168 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: 447885536036400
Reset training subject: 447885710040100
Adding measurement 59e31876 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.7656496998912142;dx=-9.74315778189676E-7
New Minimum: -0.7656496998912142 > -0.7656560365272636
WOLFE (weak): th(2.154434690031884)=-0.7656560365272636; dx=-9.776759789723234E-7 evalInputDelta=6.336636049319999E-6
New Minimum: -0.7656560365272636 > -0.7656621309494036
WOLFE (weak): th(4.308869380063768)=-0.7656621309494036; dx=-9.691618561807144E-7 evalInputDelta=1.2431058189377175E-5
New Minimum: -0.7656621309494036 > -0.7656871135371329
WOLFE (weak): th(12.926608140191302)=-0.7656871135371329; dx=-9.72685030982945E-7 evalInputDelta=3.741364591869356E-5
New Minimum: -0.7656871135371329 > -0.7657996663317618
WOLFE (weak): th(51.70643256076521)=-0.7657996663317618; dx=-9.661289654350064E-7 evalInputDelta=1.4996644054754427E-4
New Minimum: -0.7657996663317618 > -0.7663984725370776
WOLFE (weak): th(258.53216280382605)=-0.7663984725370776; dx=-9.735297975223824E-7 evalInputDelta=7.487726458633714E-4
New Minimum: -0.7663984725370776 > -0.7701422497019259
WOLFE (weak): th(1551.1929768229563)=-0.7701422497019259; dx=-9.745683562727731E-7 evalInputDelta=0.004492549810711677
New Minimum: -0.7701422497019259 > -0.7972452207044465
WOLFE (weak): th(10858.350837760694)=-0.7972452207044465; dx=-9.767148238190684E-7 evalInputDelta=0.03159552081323225
New Minimum: -0.7972452207044465 > -1.0152847110105787
WOLFE (weak): th(86866.80670208555)=-1.0152847110105787; dx=-9.311035500957044E-7 evalInputDelta=0.24963501111936448
New Minimum: -1.0152847110105787 > -1.976702138468415
END: th(781801.26031877)=-1.976702138468415; dx=-2.399975299840904E-7 evalInputDelta=1.2110524385772008
Fitness changed from -0.7656496998912142 to -1.976702138468415
Iteration 1 complete. Error: -1.976702138468415 Total: 1.8176; Orientation: 0.0023; Line Search: 1.3743
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/99b7441e-fdd6-4347-b16c-08214c42de4e.jpg)
Adding measurement 16fbed47 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1.976702138468415;dx=-1.0691643884620809E-6
New Minimum: -1.976702138468415 > -3.0807388050945925
WOLF (strong): th(1684339.7559414052)=-3.0807388050945925; dx=6.233989346541552E-8 evalInputDelta=1.1040366666261776
New Minimum: -3.0807388050945925 > -3.1027083578602483
END: th(842169.8779707026)=-3.1027083578602483; dx=-1.0041129331433594E-7 evalInputDelta=1.1260062193918334
Fitness changed from -1.976702138468415 to -3.1027083578602483
Iteration 2 complete. Error: -3.1027083578602483 Total: 0.8066; Orientation: 0.0024; Line Search: 0.6669
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/873a6daa-2594-4e96-bb93-c743b1f0d325.jpg)
Adding measurement 1b91cbb to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-3.1027083578602483;dx=-1.1059904366376535E-6
New Minimum: -3.1027083578602483 > -3.7372365372283967
WOLF (strong): th(1814400.0)=-3.7372365372283967; dx=1.0732745138613032E-7 evalInputDelta=0.6345281793681483
New Minimum: -3.7372365372283967 > -3.9891832587811793
WOLF (strong): th(907200.0)=-3.9891832587811793; dx=8.318557368635163E-8 evalInputDelta=0.886474900920931
END: th(302400.0)=-3.7514799533348095; dx=-5.917635738237384E-7 evalInputDelta=0.6487715954745612
Fitness changed from -3.1027083578602483 to -3.9891832587811793
Iteration 3 complete. Error: -3.9891832587811793 Total: 0.6855; Orientation: 0.0023; Line Search: 0.5358
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/38dd6ec1-b4d7-4198-afb2-a4dabdf193e2.jpg)
Adding measurement 4da443aa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.001e+03, gradient 1.091e-03, dot -0.468; [9cef18b5-a15f-4c5e-8a5a-5e01e827f30d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.9891832587811793, -3.1027083578602483, -1.976702138468415, -0.7656496998912142
LBFGS Accumulation History: 3 points
Removed measurement 4da443aa to history. Total: 3
th(0)=-3.9891832587811793;dx=-1.1729180264263826E-6
New Minimum: -3.9891832587811793 > -4.939721671036809
END: th(651501.0502656417)=-4.939721671036809; dx=-4.722889740776566E-8 evalInputDelta=0.9505384122556295
Fitness changed from -3.9891832587811793 to -4.939721671036809
Iteration 4 complete. Error: -4.939721671036809 Total: 0.4697; Orientation: 0.0475; Line Search: 0.2788
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/8d789d8b-a1b3-403c-ba03-5cfc914e48bf.jpg)
Adding measurement 73092752 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.626e+03, gradient 9.544e-04, dot -0.547; [9cef18b5-a15f-4c5e-8a5a-5e01e827f30d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.939721671036809, -3.1027083578602483, -1.976702138468415, -0.7656496998912142
LBFGS Accumulation History: 3 points
Removed measurement 73092752 to history. Total: 3
th(0)=-4.939721671036809;dx=-8.98727342871826E-7
New Minimum: -4.939721671036809 > -5.407828280919946
WOLF (strong): th(1403616.4632845044)=-5.407828280919946; dx=1.257296823954298E-7 evalInputDelta=0.46810660988313746
New Minimum: -5.407828280919946 > -5.598525700660805
WOLF (strong): th(701808.2316422522)=-5.598525700660805; dx=1.8857534771075505E-8 evalInputDelta=0.6588040296239965
END: th(233936.07721408407)=-5.369122450313284; dx=-5.637616256214893E-7 evalInputDelta=0.4294007792764756
Fitness changed from -4.939721671036809 to -5.598525700660805
Iteration 5 complete. Error: -5.598525700660805 Total: 0.7205; Orientation: 0.0414; Line Search: 0.5356
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/bbd947f6-9134-4098-9db4-a6be7a5f412c.jpg)
Adding measurement 46238227 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.984e+03, gradient 1.017e-03, dot -0.487; [9cef18b5-a15f-4c5e-8a5a-5e01e827f30d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.598525700660805, -3.1027083578602483, -1.976702138468415, -0.7656496998912142
LBFGS Accumulation History: 3 points
Removed measurement 46238227 to history. Total: 3
th(0)=-5.598525700660805;dx=-1.020761101988613E-6
New Minimum: -5.598525700660805 > -6.265122779168745
END: th(504000.00000000006)=-6.265122779168745; dx=-2.5118929778623538E-8 evalInputDelta=0.66659707850794
Fitness changed from -5.598525700660805 to -6.265122779168745
Iteration 6 complete. Error: -6.265122779168745 Total: 0.4667; Orientation: 0.0431; Line Search: 0.2684
Adding measurement 42cd122d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.329e+04, gradient 8.990e-04, dot -0.581; [9cef18b5-a15f-4c5e-8a5a-5e01e827f30d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.265122779168745, -3.1027083578602483, -1.976702138468415, -0.7656496998912142
LBFGS Accumulation History: 3 points
Removed measurement 42cd122d to history. Total: 3
th(0)=-6.265122779168745;dx=-7.992961007369706E-7
New Minimum: -6.265122779168745 > -6.668807315507487
WOLF (strong): th(1085835.0837760696)=-6.668807315507487; dx=9.042976976748111E-8 evalInputDelta=0.4036845363387416
New Minimum: -6.668807315507487 > -6.76274845590326
END: th(542917.5418880348)=-6.76274845590326; dx=-2.8359029715205744E-8 evalInputDelta=0.49762567673451485
Fitness changed from -6.265122779168745 to -6.76274845590326
Iteration 7 complete. Error: -6.76274845590326 Total: 0.5871; Orientation: 0.0420; Line Search: 0.4022
Adding measurement ceb46 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.308e+04, gradient 9.289e-04, dot -0.541; [9cef18b5-a15f-4c5e-8a5a-5e01e827f30d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.76274845590326, -3.1027083578602483, -1.976702138468415, -0.7656496998912142
LBFGS Accumulation History: 3 points
Removed measurement ceb46 to history. Total: 3
th(0)=-6.76274845590326;dx=-8.589060329499735E-7
New Minimum: -6.76274845590326 > -7.057424667618151
WOLF (strong): th(1169680.3860704205)=-7.057424667618151; dx=1.2975263351566813E-7 evalInputDelta=0.2946762117148909
New Minimum: -7.057424667618151 > -7.25743874581891
WOLF (strong): th(584840.1930352102)=-7.25743874581891; dx=7.70853375862277E-8 evalInputDelta=0.49469028991565
END: th(194946.73101173676)=-7.097127315761085; dx=-5.380872389003247E-7 evalInputDelta=0.334378859857825
Fitness changed from -6.76274845590326 to -7.25743874581891
Iteration 8 complete. Error: -7.25743874581891 Total: 0.7065; Orientation: 0.0411; Line Search: 0.5298
Adding measurement 7ba305b5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.867e+04, gradient 9.815e-04, dot -0.523; [9cef18b5-a15f-4c5e-8a5a-5e01e827f30d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.25743874581891, -3.1027083578602483, -1.976702138468415, -0.7656496998912142
LBFGS Accumulation History: 3 points
Removed measurement 7ba305b5 to history. Total: 3
th(0)=-7.25743874581891;dx=-9.426476693228683E-7
New Minimum: -7.25743874581891 > -7.819864801161749
END: th(420000.0000000001)=-7.819864801161749; dx=-8.23387638236747E-8 evalInputDelta=0.5624260553428391
Fitness changed from -7.25743874581891 to -7.819864801161749
Iteration 9 complete. Error: -7.819864801161749 Total: 0.4487; Orientation: 0.0410; Line Search: 0.2807
Adding measurement 6140bf26 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.891e+04, gradient 7.800e-04, dot -0.630; [9cef18b5-a15f-4c5e-8a5a-5e01e827f30d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.819864801161749, -3.1027083578602483, -1.976702138468415, -0.7656496998912142
LBFGS Accumulation History: 3 points
Removed measurement 6140bf26 to history. Total: 3
th(0)=-7.819864801161749;dx=-5.963700179715793E-7
New Minimum: -7.819864801161749 > -8.343691020127553
END: th(904862.5698133914)=-8.343691020127553; dx=-1.3044992040957383E-8 evalInputDelta=0.5238262189658034
Fitness changed from -7.819864801161749 to -8.343691020127553
Iteration 10 complete. Error: -8.343691020127553 Total: 0.4432; Orientation: 0.0414; Line Search: 0.2774
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/aad41ca5-2de2-410c-ad90-1c139367a04d.jpg)
Final threshold in iteration 11: -8.343691020127553 (> -Infinity) after 7.165s (< 5400.000s)

Returns

    -8.343691020127553