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 1527.60 seconds (7.390 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: 3585817061929
Reset training subject: 3615508504125
Adding measurement 32128a2b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-115.48873477552002;dx=-1.9986743976317432E-6
New Minimum: -115.48873477552002 > -115.48873598490455
WOLFE (weak): th(2.154434690031884)=-115.48873598490455; dx=-1.9589124957466063E-6 evalInputDelta=1.2093845356275779E-6
New Minimum: -115.48873598490455 > -115.48874131546737
WOLFE (weak): th(4.308869380063768)=-115.48874131546737; dx=-1.959698279934447E-6 evalInputDelta=6.539947349892827E-6
New Minimum: -115.48874131546737 > -115.48875944010786
WOLFE (weak): th(12.926608140191302)=-115.48875944010786; dx=-1.957580329408444E-6 evalInputDelta=2.466458784056158E-5
New Minimum: -115.48875944010786 > -115.48883624286853
WOLFE (weak): th(51.70643256076521)=-115.48883624286853; dx=-1.958924503568001E-6 evalInputDelta=1.0146734851446126E-4
New Minimum: -115.48883624286853 > -115.4892411806515
WOLFE (weak): th(258.53216280382605)=-115.4892411806515; dx=-1.9603416574806513E-6 evalInputDelta=5.064051314889184E-4
New Minimum: -115.4892411806515 > -115.49176261002759
WOLFE (weak): th(1551.1929768229563)=-115.49176261002759; dx=-1.959257638158133E-6 evalInputDelta=0.003027834507577154
New Minimum: -115.49176261002759 > -115.50993119386673
WOLFE (weak): th(10858.350837760694)=-115.50993119386673; dx=-1.9542453656817374E-6 evalInputDelta=0.021196418346718815
New Minimum: -115.50993119386673 > -115.65794690077054
WOLFE (weak): th(86866.80670208555)=-115.65794690077054; dx=-1.9433233512542283E-6 evalInputDelta=0.16921212525052454
New Minimum: -115.65794690077054 > -116.9739494003793
WOLFE (weak): th(781801.26031877)=-116.9739494003793; dx=-1.8272103024796923E-6 evalInputDelta=1.4852146248592817
New Minimum: -116.9739494003793 > -126.2316595205841
END: th(7818012.6031877)=-126.2316595205841; dx=-9.61576879755519E-7 evalInputDelta=10.742924745064087
Fitness changed from -115.48873477552002 to -126.2316595205841
Iteration 1 complete. Error: -126.2316595205841 Total: 428.7215; Orientation: 0.3175; Line Search: 338.8637
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f27ade88-17c3-4872-a25d-2711e210c680.jpg)

    Adding measurement 19f4cab0 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-126.2316595205841;dx=-1.4722951739769551E-6
    New Minimum: -126.2316595205841 > -136.9911440596364
    END: th(1.684339755941405E7)=-136.9911440596364; dx=-2.8269655113340064E-7 evalInputDelta=10.759484539052309
    Fitness changed from -126.2316595205841 to -136.9911440596364
    Iteration 2 complete. Error: -136.9911440596364 Total: 92.1728; Orientation: 0.3251; Line Search: 61.6350
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/f5da6a79-32c8-48b2-b099-e68638a7805a.jpg)

    Adding measurement f98b13e to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-136.9911440596364;dx=-8.061075047551037E-7
    New Minimum: -136.9911440596364 > -138.67386069994643
    END: th(3.6288E7)=-138.67386069994643; dx=-2.543853536427681E-8 evalInputDelta=1.6827166403100193
    Fitness changed from -136.9911440596364 to -138.67386069994643
    Iteration 3 complete. Error: -138.67386069994643 Total: 92.4336; Orientation: 0.3241; Line Search: 62.3481
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/0696c672-936a-47c7-af83-27bdf20117bf.jpg)

    Adding measurement 27acd96f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.157e+04, gradient 8.454e-04, dot -0.359; [ea6d02b6-efbb-424e-af09-ed023c98de43 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -138.67386069994643, -136.9911440596364, -126.2316595205841, -115.48873477552002
    LBFGS Accumulation History: 3 points
    Removed measurement 27acd96f to history. Total: 3
    th(0)=-138.67386069994643;dx=-7.145807009036105E-7
    Armijo: th(7.8180126031877E7)=-116.47913087196842; dx=1.4734579094706845E-7 evalInputDelta=-22.19472982797801
    New Minimum: -138.67386069994643 > -139.35179372723513
    END: th(3.90900630159385E7)=-139.35179372723513; dx=-4.045736904653425E-8 evalInputDelta=0.6779330272887023
    Fitness changed from -138.67386069994643 to -139.35179372723513
    Iteration 4 complete. Error: -139.35179372723513 Total: 132.0317; Orientation: 7.3143; Line Search: 93.7928
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/a8acb132-92b3-4dc3-a7db-f301b72ae480.jpg)

    Adding measurement 10f4a14c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.236e+04, gradient 7.757e-04, dot -0.394; [ea6d02b6-efbb-424e-af09-ed023c98de43 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -139.35179372723513, -136.9911440596364, -126.2316595205841, -115.48873477552002
    LBFGS Accumulation History: 3 points
    Removed measurement 10f4a14c to history. Total: 3
    th(0)=-139.35179372723513;dx=-6.011451347885367E-7
    Armijo: th(8.421698779707026E7)=-114.3011382680316; dx=5.701606623968193E-8 evalInputDelta=-25.05065545920354
    New Minimum: -139.35179372723513 > -139.40130246348338
    END: th(4.210849389853513E7)=-139.40130246348338; dx=-6.684888830452077E-8 evalInputDelta=0.04950873624824226
    Fitness changed from -139.35179372723513 to -139.40130246348338
    Iteration 5 complete. Error: -139.40130246348338 Total: 130.9178; Orientation: 7.0777; Line Search: 93.5689
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/56610dd4-e3e7-429b-b67d-826a28c5a69b.jpg)

    Adding measurement 73f8b6e1 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.249e+04, gradient 7.561e-04, dot -0.275; [ea6d02b6-efbb-424e-af09-ed023c98de43 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -139.40130246348338, -136.9911440596364, -126.2316595205841, -115.48873477552002
    LBFGS Accumulation History: 3 points
    Removed measurement 73f8b6e1 to history. Total: 3
    th(0)=-139.40130246348338;dx=-5.716215890072534E-7
    Armijo: th(9.072000000000001E7)=-105.75552197404147; dx=9.6203222307329E-8 evalInputDelta=-33.645780489441904
    Armijo: th(4.536000000000001E7)=-138.46831281157952; dx=-8.042136059150906E-8 evalInputDelta=-0.9329896519038527
    New Minimum: -139.40130246348338 > -143.09337627837942
    END: th(1.5120000000000002E7)=-143.09337627837942; dx=-2.4549445412409104E-7 evalInputDelta=3.692073814896048
    Fitness changed from -139.40130246348338 to -143.09337627837942
    Iteration 6 complete. Error: -143.09337627837942 Total: 162.4493; Orientation: 7.2860; Line Search: 124.4460
    Adding measurement 39475fce to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.356e+04, gradient 5.361e-04, dot -0.319; [ea6d02b6-efbb-424e-af09-ed023c98de43 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -143.09337627837942, -136.9911440596364, -126.2316595205841, -115.48873477552002
    LBFGS Accumulation History: 3 points
    Removed measurement 39475fce to history. Total: 3
    th(0)=-143.09337627837942;dx=-2.873421367639897E-7
    New Minimum: -143.09337627837942 > -143.99897990349376
    END: th(3.2575052513282087E7)=-143.99897990349376; dx=-1.1225768908250135E-7 evalInputDelta=0.9056036251143382
    Fitness changed from -143.09337627837942 to -143.99897990349376
    Iteration 7 complete. Error: -143.99897990349376 Total: 99.3968; Orientation: 7.1295; Line Search: 62.6577
    Adding measurement 7b36ad41 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.608e+04, gradient 5.710e-04, dot -0.258; [ea6d02b6-efbb-424e-af09-ed023c98de43 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -143.99897990349376, -136.9911440596364, -126.2316595205841, -115.48873477552002
    LBFGS Accumulation History: 3 points
    Removed measurement 7b36ad41 to history. Total: 3
    th(0)=-143.99897990349376;dx=-3.259198751556023E-7
    Armijo: th(7.018082316422524E7)=-136.48897609264992; dx=-3.260419774253594E-8 evalInputDelta=-7.510003810843841
    New Minimum: -143.99897990349376 > -144.57418364576966
    END: th(3.509041158211262E7)=-144.57418364576966; dx=-9.591021808987339E-8 evalInputDelta=0.5752037422759031
    Fitness changed from -143.99897990349376 to -144.57418364576966
    Iteration 8 complete. Error: -144.57418364576966 Total: 127.8713; Orientation: 7.1373; Line Search: 90.7054
    Adding measurement 6c19c8ad to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.338e+03, gradient 5.305e-04, dot -0.402; [ea6d02b6-efbb-424e-af09-ed023c98de43 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -144.57418364576966, -136.9911440596364, -126.2316595205841, -115.48873477552002
    LBFGS Accumulation History: 3 points
    Removed measurement 6c19c8ad to history. Total: 3
    th(0)=-144.57418364576966;dx=-2.803537447877682E-7
    Armijo: th(7.560000000000003E7)=-131.9718793335961; dx=-2.8029250366726262E-8 evalInputDelta=-12.602304312173572
    Armijo: th(3.7800000000000015E7)=-143.2972409514748; dx=-5.298529428393411E-8 evalInputDelta=-1.2769426942948598
    New Minimum: -144.57418364576966 > -145.59826673115677
    END: th(1.2600000000000006E7)=-145.59826673115677; dx=-1.5946683930863552E-7 evalInputDelta=1.0240830853871046
    Fitness changed from -144.57418364576966 to -145.59826673115677
    Iteration 9 complete. Error: -145.59826673115677 Total: 162.0872; Orientation: 7.1969; Line Search: 124.9784
    Adding measurement 74cfea65 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.169e+04, gradient 4.409e-04, dot -0.248; [ea6d02b6-efbb-424e-af09-ed023c98de43 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -145.59826673115677, -136.9911440596364, -126.2316595205841, -115.48873477552002
    LBFGS Accumulation History: 3 points
    Removed measurement 74cfea65 to history. Total: 3
    th(0)=-145.59826673115677;dx=-1.943469706942854E-7
    New Minimum: -145.59826673115677 > -146.15979419213167
    END: th(2.7145877094401747E7)=-146.15979419213167; dx=-1.0565160689050665E-7 evalInputDelta=0.5615274609749008
    Fitness changed from -145.59826673115677 to -146.15979419213167
    Iteration 10 complete. Error: -146.15979419213167 Total: 99.1064; Orientation: 7.2546; Line Search: 62.7886
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/efbeacdb-f8dc-4ecd-8d2a-a6a707e4a895.jpg)

    Final threshold in iteration 11: -146.15979419213167 (> -Infinity) after 1527.601s (< 5400.000s)

Returns

    -146.15979419213167