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 90.32 seconds (0.866 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: 281091382194700
Reset training subject: 281093375503100
Adding measurement 4a7f5550 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-41.526857457208266;dx=-2.715452286207977E-6
New Minimum: -41.526857457208266 > -41.52685971381982
WOLFE (weak): th(2.154434690031884)=-41.52685971381982; dx=-2.4748465724343593E-6 evalInputDelta=2.2566115518429797E-6
New Minimum: -41.52685971381982 > -41.52686648365374
WOLFE (weak): th(4.308869380063768)=-41.52686648365374; dx=-2.4748488610827912E-6 evalInputDelta=9.026445475512901E-6
New Minimum: -41.52686648365374 > -41.52688904975885
WOLFE (weak): th(12.926608140191302)=-41.52688904975885; dx=-2.474843777277894E-6 evalInputDelta=3.159255058449162E-5
New Minimum: -41.52688904975885 > -41.526986083871094
WOLFE (weak): th(51.70643256076521)=-41.526986083871094; dx=-2.47481995453844E-6 evalInputDelta=1.2862666282842383E-4
New Minimum: -41.526986083871094 > -41.52749607338478
WOLFE (weak): th(258.53216280382605)=-41.52749607338478; dx=-2.4746847377564913E-6 evalInputDelta=6.386161765163934E-4
New Minimum: -41.52749607338478 > -41.53069577617738
WOLFE (weak): th(1551.1929768229563)=-41.53069577617738; dx=-2.4737422231583893E-6 evalInputDelta=0.003838318969116017
New Minimum: -41.53069577617738 > -41.55369118268905
WOLFE (weak): th(10858.350837760694)=-41.55369118268905; dx=-2.4679491388763092E-6 evalInputDelta=0.026833725480784665
New Minimum: -41.55369118268905 > -41.73894509534343
END: th(86866.80670208555)=-41.73894509534343; dx=-2.401965616266844E-6 evalInputDelta=0.2120876381351664
Fitness changed from -41.526857457208266 to -41.73894509534343
Iteration 1 complete. Error: -41.73894509534343 Total: 22.5549; Orientation: 0.0609; Line Search: 16.9489
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/82155418-499f-47dc-9489-0773609913d7.jpg)
Adding measurement 54d06bc6 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-41.73894509534343;dx=-2.364785635011211E-6
New Minimum: -41.73894509534343 > -42.16696519555409
WOLFE (weak): th(187148.86177126726)=-42.16696519555409; dx=-2.2172639536417604E-6 evalInputDelta=0.4280201002106594
New Minimum: -42.16696519555409 > -42.569565276472254
END: th(374297.7235425345)=-42.569565276472254; dx=-2.084756395832703E-6 evalInputDelta=0.8306201811288219
Fitness changed from -41.73894509534343 to -42.569565276472254
Iteration 2 complete. Error: -42.569565276472254 Total: 7.9003; Orientation: 0.0612; Line Search: 5.7849
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5f2eb3d6-57d4-426c-9d53-98b2a1c43ae0.jpg)
Adding measurement 4339a3ca to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-42.569565276472254;dx=-1.976144019291367E-6
New Minimum: -42.569565276472254 > -44.00837364479996
END: th(806400.0000000001)=-44.00837364479996; dx=-1.600878420915304E-6 evalInputDelta=1.438808368327706
Fitness changed from -42.569565276472254 to -44.00837364479996
Iteration 3 complete. Error: -44.00837364479996 Total: 5.7305; Orientation: 0.0598; Line Search: 3.5909
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/2425d700-d370-42aa-b615-eab247a005bc.jpg)
Adding measurement 307e9f30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.156e+03, gradient 1.245e-03, dot -0.912; [427beac3-d4f8-4408-8e6b-a8cf81fcd67d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.00837364479996, -42.569565276472254, -41.73894509534343, -41.526857457208266
LBFGS Accumulation History: 3 points
Removed measurement 307e9f30 to history. Total: 3
th(0)=-44.00837364479996;dx=-1.5498184079982998E-6
New Minimum: -44.00837364479996 > -46.4353943953029
END: th(1737336.1340417115)=-46.4353943953029; dx=-1.2590368687650552E-6 evalInputDelta=2.4270207505029404
Fitness changed from -44.00837364479996 to -46.4353943953029
Iteration 4 complete. Error: -46.4353943953029 Total: 6.8911; Orientation: 1.0690; Line Search: 3.8272
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/2e0560b8-b3aa-4ef8-84d3-a0c5af0eb4e3.jpg)
Adding measurement 7575f0a4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.527e+03, gradient 1.170e-03, dot -0.848; [427beac3-d4f8-4408-8e6b-a8cf81fcd67d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.4353943953029, -42.569565276472254, -41.73894509534343, -41.526857457208266
LBFGS Accumulation History: 3 points
Removed measurement 7575f0a4 to history. Total: 3
th(0)=-46.4353943953029;dx=-1.368972656818692E-6
New Minimum: -46.4353943953029 > -50.800605299468025
END: th(3742977.235425346)=-50.800605299468025; dx=-1.0180129757043405E-6 evalInputDelta=4.365210904165124
Fitness changed from -46.4353943953029 to -50.800605299468025
Iteration 5 complete. Error: -50.800605299468025 Total: 6.9162; Orientation: 1.0674; Line Search: 3.6941
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7e5d526c-a75c-43bc-9295-a405185de997.jpg)
Adding measurement 7b67aaa2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.285e+04, gradient 1.214e-03, dot -0.783; [427beac3-d4f8-4408-8e6b-a8cf81fcd67d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.800605299468025, -42.569565276472254, -41.73894509534343, -41.526857457208266
LBFGS Accumulation History: 3 points
Removed measurement 7b67aaa2 to history. Total: 3
th(0)=-50.800605299468025;dx=-1.474611517521808E-6
New Minimum: -50.800605299468025 > -56.798891304956214
END: th(8064000.000000003)=-56.798891304956214; dx=-3.8383435562897484E-7 evalInputDelta=5.99828600548819
Fitness changed from -50.800605299468025 to -56.798891304956214
Iteration 6 complete. Error: -56.798891304956214 Total: 6.8456; Orientation: 1.0470; Line Search: 3.6443
Adding measurement 66ac9c8e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.540e+04, gradient 1.692e-03, dot -0.372; [427beac3-d4f8-4408-8e6b-a8cf81fcd67d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.798891304956214, -42.569565276472254, -41.73894509534343, -41.526857457208266
LBFGS Accumulation History: 3 points
Removed measurement 66ac9c8e to history. Total: 3
th(0)=-56.798891304956214;dx=-2.863766950120071E-6
Armijo: th(1.7373361340417117E7)=-53.69653484053111; dx=4.933636426007971E-7 evalInputDelta=-3.1023564644251067
New Minimum: -56.798891304956214 > -59.47229468351414
WOLF (strong): th(8686680.670208558)=-59.47229468351414; dx=8.353264914894185E-7 evalInputDelta=2.6734033785579285
New Minimum: -59.47229468351414 > -62.138785231578524
END: th(2895560.2234028527)=-62.138785231578524; dx=-6.832962873091055E-7 evalInputDelta=5.3398939266223096
Fitness changed from -56.798891304956214 to -62.138785231578524
Iteration 7 complete. Error: -62.138785231578524 Total: 10.0716; Orientation: 1.0822; Line Search: 7.2572
Adding measurement 27cb629b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.932e+04, gradient 1.211e-03, dot -0.693; [427beac3-d4f8-4408-8e6b-a8cf81fcd67d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -62.138785231578524, -42.569565276472254, -41.73894509534343, -41.526857457208266
LBFGS Accumulation History: 3 points
Removed measurement 27cb629b to history. Total: 3
th(0)=-62.138785231578524;dx=-1.465706880027312E-6
New Minimum: -62.138785231578524 > -66.80963043020927
END: th(6238295.392375577)=-66.80963043020927; dx=-2.5904971350572737E-7 evalInputDelta=4.670845198630744
Fitness changed from -62.138785231578524 to -66.80963043020927
Iteration 8 complete. Error: -66.80963043020927 Total: 6.4368; Orientation: 0.9869; Line Search: 3.6491
Adding measurement 620fbf3a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.327e+04, gradient 1.520e-03, dot -0.477; [427beac3-d4f8-4408-8e6b-a8cf81fcd67d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -66.80963043020927, -42.569565276472254, -41.73894509534343, -41.526857457208266
LBFGS Accumulation History: 3 points
Removed measurement 620fbf3a to history. Total: 3
th(0)=-66.80963043020927;dx=-2.3093762489832846E-6
Armijo: th(1.3440000000000006E7)=-66.26896852052168; dx=5.513574810397406E-7 evalInputDelta=-0.5406619096875858
New Minimum: -66.80963043020927 > -70.43302860639291
WOLF (strong): th(6720000.000000003)=-70.43302860639291; dx=5.715134566602017E-7 evalInputDelta=3.623398176183642
New Minimum: -70.43302860639291 > -70.6033082778295
END: th(2240000.000000001)=-70.6033082778295; dx=-9.80084589766891E-7 evalInputDelta=3.7936778476202306
Fitness changed from -66.80963043020927 to -70.6033082778295
Iteration 9 complete. Error: -70.6033082778295 Total: 10.2165; Orientation: 1.0614; Line Search: 7.4184
Adding measurement 1100dccc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.309e+04, gradient 1.042e-03, dot -0.779; [427beac3-d4f8-4408-8e6b-a8cf81fcd67d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.6033082778295, -42.569565276472254, -41.73894509534343, -41.526857457208266
LBFGS Accumulation History: 3 points
Removed measurement 1100dccc to history. Total: 3
th(0)=-70.6033082778295;dx=-1.0858867287155931E-6
New Minimum: -70.6033082778295 > -74.76621901526713
END: th(4825933.705671422)=-74.76621901526713; dx=-6.792228613531991E-7 evalInputDelta=4.1629107374376275
Fitness changed from -70.6033082778295 to -74.76621901526713
Iteration 10 complete. Error: -74.76621901526713 Total: 6.4672; Orientation: 1.0718; Line Search: 3.6701
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9f342121-3f7f-44b7-80fa-6b909e8e762f.jpg)
Final threshold in iteration 11: -74.76621901526713 (> -Infinity) after 90.319s (< 5400.000s)

Returns

    -74.76621901526713