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 230.36 seconds (3.060 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: 8107514446556
Reset training subject: 8113312990260
Adding measurement 4464d858 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-14.460156470537186;dx=-2.9610799342247625E-6
New Minimum: -14.460156470537186 > -14.460162937641144
END: th(2.154434690031884)=-14.460162937641144; dx=-2.4610902214422067E-6 evalInputDelta=6.467103958129883E-6
Fitness changed from -14.460156470537186 to -14.460162937641144
Iteration 1 complete. Error: -14.460162937641144 Total: 26.1963; Orientation: 0.0300; Line Search: 9.9934
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0283e9f9-93a0-460d-9c4b-fe812cf8c8bb.jpg)

    Adding measurement 15569f22 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-14.460162937641144;dx=-2.4466777308966764E-6
    New Minimum: -14.460162937641144 > -14.46017700433731
    WOLFE (weak): th(4.641588833612779)=-14.46017700433731; dx=-2.4453540995370917E-6 evalInputDelta=1.4066696166992188E-5
    New Minimum: -14.46017700433731 > -14.460190802812576
    WOLFE (weak): th(9.283177667225559)=-14.460190802812576; dx=-2.4447582993781243E-6 evalInputDelta=2.7865171432495117E-5
    New Minimum: -14.460190802812576 > -14.46024563908577
    WOLFE (weak): th(27.849533001676676)=-14.46024563908577; dx=-2.442383867293917E-6 evalInputDelta=8.270144462585449E-5
    New Minimum: -14.46024563908577 > -14.460493355989456
    WOLFE (weak): th(111.3981320067067)=-14.460493355989456; dx=-2.4396350606586736E-6 evalInputDelta=3.3041834831237793E-4
    New Minimum: -14.460493355989456 > -14.461812168359756
    WOLFE (weak): th(556.9906600335335)=-14.461812168359756; dx=-2.438438777749832E-6 evalInputDelta=0.001649230718612671
    New Minimum: -14.461812168359756 > -14.470036625862122
    WOLFE (weak): th(3341.9439602012008)=-14.470036625862122; dx=-2.427201603302401E-6 evalInputDelta=0.009873688220977783
    New Minimum: -14.470036625862122 > -14.528273612260818
    WOLFE (weak): th(23393.607721408407)=-14.528273612260818; dx=-2.354233515594846E-6 evalInputDelta=0.06811067461967468
    New Minimum: -14.528273612260818 > -14.919768422842026
    END: th(187148.86177126726)=-14.919768422842026; dx=-1.6017823188931468E-6 evalInputDelta=0.45960548520088196
    Fitness changed from -14.460162937641144 to -14.919768422842026
    Iteration 2 complete. Error: -14.919768422842026 Total: 51.8006; Orientation: 0.0292; Line Search: 46.4041
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/4b992227-d5fc-44b0-a9e5-6eff07736b3d.jpg)

    Adding measurement 6a87c0bc to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-14.919768422842026;dx=-1.5978045592303852E-6
    New Minimum: -14.919768422842026 > -15.483497947454453
    END: th(403200.00000000006)=-15.483497947454453; dx=-8.723287118844667E-7 evalInputDelta=0.5637295246124268
    Fitness changed from -14.919768422842026 to -15.483497947454453
    Iteration 3 complete. Error: -15.483497947454453 Total: 15.6373; Orientation: 0.0295; Line Search: 10.3890
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/d0d7a260-1a71-4ea9-864e-b2a1fe1e9995.jpg)

    Adding measurement 72751717 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.777e+02, gradient 9.950e-04, dot -0.712; [388b06b9-a926-4737-94ca-bee16128c0ea = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -15.483497947454453, -14.919768422842026, -14.460162937641144, -14.460156470537186
    LBFGS Accumulation History: 3 points
    Removed measurement 72751717 to history. Total: 3
    th(0)=-15.483497947454453;dx=-9.87786345927525E-7
    New Minimum: -15.483497947454453 > -16.16457736492157
    END: th(868668.0670208557)=-16.16457736492157; dx=-4.463483225015547E-7 evalInputDelta=0.6810794174671173
    Fitness changed from -15.483497947454453 to -16.16457736492157
    Iteration 4 complete. Error: -16.16457736492157 Total: 15.5839; Orientation: 0.5992; Line Search: 9.7276
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/36b39aa2-d384-4e85-87e0-5d9f6a2cf632.jpg)

    Adding measurement 6954101c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.641e+02, gradient 8.911e-04, dot -0.582; [388b06b9-a926-4737-94ca-bee16128c0ea = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -16.16457736492157, -14.919768422842026, -14.460162937641144, -14.460156470537186
    LBFGS Accumulation History: 3 points
    Removed measurement 6954101c to history. Total: 3
    th(0)=-16.16457736492157;dx=-7.931840621779441E-7
    New Minimum: -16.16457736492157 > -16.762378454208374
    END: th(1871488.617712673)=-16.762378454208374; dx=-6.59506136266227E-8 evalInputDelta=0.5978010892868042
    Fitness changed from -16.16457736492157 to -16.762378454208374
    Iteration 5 complete. Error: -16.762378454208374 Total: 16.6369; Orientation: 0.6148; Line Search: 10.7132
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/2a4e6fa7-e1f7-4e57-88cf-30cff4e7214c.jpg)

    Adding measurement 7df85da5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.705e+02, gradient 1.042e-03, dot -0.244; [388b06b9-a926-4737-94ca-bee16128c0ea = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -16.762378454208374, -14.919768422842026, -14.460162937641144, -14.460156470537186
    LBFGS Accumulation History: 3 points
    Removed measurement 7df85da5 to history. Total: 3
    th(0)=-16.762378454208374;dx=-1.0845823653737978E-6
    Armijo: th(4032000.0000000014)=-16.167513459920883; dx=3.3249396535783396E-7 evalInputDelta=-0.5948649942874908
    New Minimum: -16.762378454208374 > -17.047356009483337
    WOLF (strong): th(2016000.0000000007)=-17.047356009483337; dx=2.6759085570167337E-7 evalInputDelta=0.2849775552749634
    New Minimum: -17.047356009483337 > -17.208422273397446
    END: th(672000.0000000002)=-17.208422273397446; dx=-1.8420333591672184E-7 evalInputDelta=0.44604381918907166
    Fitness changed from -16.762378454208374 to -17.208422273397446
    Iteration 6 complete. Error: -17.208422273397446 Total: 26.8146; Orientation: 0.6061; Line Search: 20.9223
    Adding measurement 5d0ec261 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.119e+03, gradient 6.921e-04, dot -0.454; [388b06b9-a926-4737-94ca-bee16128c0ea = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.208422273397446, -14.919768422842026, -14.460162937641144, -14.460156470537186
    LBFGS Accumulation History: 3 points
    Removed measurement 5d0ec261 to history. Total: 3
    th(0)=-17.208422273397446;dx=-4.785928304050219E-7
    New Minimum: -17.208422273397446 > -17.615753650665283
    END: th(1447780.1117014263)=-17.615753650665283; dx=-4.383356705387529E-8 evalInputDelta=0.4073313772678375
    Fitness changed from -17.208422273397446 to -17.615753650665283
    Iteration 7 complete. Error: -17.615753650665283 Total: 15.4473; Orientation: 0.6180; Line Search: 9.9898
    Adding measurement 2499c7f2 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.326e+03, gradient 7.164e-04, dot -0.412; [388b06b9-a926-4737-94ca-bee16128c0ea = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.615753650665283, -14.919768422842026, -14.460162937641144, -14.460156470537186
    LBFGS Accumulation History: 3 points
    Removed measurement 2499c7f2 to history. Total: 3
    th(0)=-17.615753650665283;dx=-5.123954699952996E-7
    Armijo: th(3119147.6961877886)=-17.551904916763306; dx=2.139558431543211E-7 evalInputDelta=-0.06384873390197754
    New Minimum: -17.615753650665283 > -17.90998488664627
    WOLF (strong): th(1559573.8480938943)=-17.90998488664627; dx=8.677427552441166E-8 evalInputDelta=0.29423123598098755
    END: th(519857.94936463144)=-17.84268891811371; dx=-2.3782668107393723E-7 evalInputDelta=0.2269352674484253
    Fitness changed from -17.615753650665283 to -17.90998488664627
    Iteration 8 complete. Error: -17.90998488664627 Total: 25.4132; Orientation: 0.6194; Line Search: 19.8064
    Adding measurement 52d6f8d3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.392e+03, gradient 7.358e-04, dot -0.347; [388b06b9-a926-4737-94ca-bee16128c0ea = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.90998488664627, -14.919768422842026, -14.460162937641144, -14.460156470537186
    LBFGS Accumulation History: 3 points
    Removed measurement 52d6f8d3 to history. Total: 3
    th(0)=-17.90998488664627;dx=-5.410139375997551E-7
    New Minimum: -17.90998488664627 > -18.243808776140213
    END: th(1120000.0000000005)=-18.243808776140213; dx=-1.8178133168738894E-8 evalInputDelta=0.33382388949394226
    Fitness changed from -17.90998488664627 to -18.243808776140213
    Iteration 9 complete. Error: -18.243808776140213 Total: 16.1407; Orientation: 0.6151; Line Search: 10.6853
    Adding measurement 75a2b708 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.810e+03, gradient 5.125e-04, dot -0.547; [388b06b9-a926-4737-94ca-bee16128c0ea = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -18.243808776140213, -14.919768422842026, -14.460162937641144, -14.460156470537186
    LBFGS Accumulation History: 3 points
    Removed measurement 75a2b708 to history. Total: 3
    th(0)=-18.243808776140213;dx=-2.623501655346353E-7
    New Minimum: -18.243808776140213 > -18.465873688459396
    WOLF (strong): th(2412966.852835711)=-18.465873688459396; dx=5.988440206636434E-8 evalInputDelta=0.22206491231918335
    New Minimum: -18.465873688459396 > -18.476093620061874
    END: th(1206483.4264178555)=-18.476093620061874; dx=-7.256067070512762E-8 evalInputDelta=0.23228484392166138
    Fitness changed from -18.243808776140213 to -18.476093620061874
    Iteration 10 complete. Error: -18.476093620061874 Total: 20.4281; Orientation: 0.6051; Line Search: 14.9344
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/d418c270-2998-4a82-9b32-481a2f946d76.jpg)

    Final threshold in iteration 11: -18.476093620061874 (> -Infinity) after 230.363s (< 5400.000s)

Returns

    -18.476093620061874