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 302.28 seconds (3.591 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: 572943760214200
Reset training subject: 572949931792600
Adding measurement 5dc4baf9 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-41.78731387819676;dx=-1.9885992977136263E-6
New Minimum: -41.78731387819676 > -41.78731749303772
END: th(2.154434690031884)=-41.78731749303772; dx=-1.7528814309291125E-6 evalInputDelta=3.6148409563452333E-6
Fitness changed from -41.78731387819676 to -41.78731749303772
Iteration 1 complete. Error: -41.78731749303772 Total: 30.9914; Orientation: 0.1464; Line Search: 12.1854
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3def7cfb-661d-4d4e-8cbe-8e479eebfaf3.jpg)
Adding measurement 6e094664 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-41.78731749303772;dx=-1.7510180919898354E-6
New Minimum: -41.78731749303772 > -41.78732653013875
WOLFE (weak): th(4.641588833612779)=-41.78732653013875; dx=-1.7496499884936764E-6 evalInputDelta=9.037101030173744E-6
New Minimum: -41.78732653013875 > -41.787335567237825
WOLFE (weak): th(9.283177667225559)=-41.787335567237825; dx=-1.749235333023312E-6 evalInputDelta=1.8074200106354965E-5
New Minimum: -41.787335567237825 > -41.787369908196496
WOLFE (weak): th(27.849533001676676)=-41.787369908196496; dx=-1.7483074838594644E-6 evalInputDelta=5.241515877685288E-5
New Minimum: -41.787369908196496 > -41.787532575512
WOLFE (weak): th(111.3981320067067)=-41.787532575512; dx=-1.747587991946321E-6 evalInputDelta=2.1508247428414506E-4
New Minimum: -41.787532575512 > -41.788383857468524
WOLFE (weak): th(556.9906600335335)=-41.788383857468524; dx=-1.7478089623712754E-6 evalInputDelta=0.0010663644308053222
New Minimum: -41.788383857468524 > -41.79371165721148
WOLFE (weak): th(3341.9439602012008)=-41.79371165721148; dx=-1.747610540186661E-6 evalInputDelta=0.006394164173762817
New Minimum: -41.79371165721148 > -41.832039868130046
WOLFE (weak): th(23393.607721408407)=-41.832039868130046; dx=-1.7450313498842553E-6 evalInputDelta=0.04472237509232713
New Minimum: -41.832039868130046 > -42.14320852022202
WOLFE (weak): th(187148.86177126726)=-42.14320852022202; dx=-1.7260238415879633E-6 evalInputDelta=0.355891027184299
New Minimum: -42.14320852022202 > -44.80027815050835
END: th(1684339.7559414054)=-44.80027815050835; dx=-1.5104230310831386E-6 evalInputDelta=3.0129606574706287
Fitness changed from -41.78731749303772 to -44.80027815050835
Iteration 2 complete. Error: -44.80027815050835 Total: 69.9187; Orientation: 0.1490; Line Search: 62.7759
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d676b772-e1b2-4add-baa8-d601706eddb9.jpg)
Adding measurement 2c7f5a08 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-44.80027815050835;dx=-1.4512039181499498E-6
New Minimum: -44.80027815050835 > -49.55762263870173
END: th(3628800.0000000005)=-49.55762263870173; dx=-9.86997317898627E-7 evalInputDelta=4.757344488193382
Fitness changed from -44.80027815050835 to -49.55762263870173
Iteration 3 complete. Error: -49.55762263870173 Total: 19.7091; Orientation: 0.1375; Line Search: 12.3857
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/95bd96f4-446c-4079-a7fe-353781efad6d.jpg)
Adding measurement 10922805 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.157e+04, gradient 9.680e-04, dot -0.825; [aad4aac1-c8e4-4da2-8197-81e04daaf8dc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.55762263870173, -44.80027815050835, -41.78731749303772, -41.78731387819676
LBFGS Accumulation History: 3 points
Removed measurement 10922805 to history. Total: 3
th(0)=-49.55762263870173;dx=-9.36085620318403E-7
New Minimum: -49.55762263870173 > -55.63271664349923
END: th(7818012.603187701)=-55.63271664349923; dx=-5.121657618384868E-7 evalInputDelta=6.075094004797499
Fitness changed from -49.55762263870173 to -55.63271664349923
Iteration 4 complete. Error: -55.63271664349923 Total: 22.3521; Orientation: 2.5076; Line Search: 12.6430
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/bdbf4173-80d8-4f40-8424-dad74fb56bc0.jpg)
Adding measurement 1fc44929 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.670e+03, gradient 8.299e-04, dot -0.603; [aad4aac1-c8e4-4da2-8197-81e04daaf8dc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.63271664349923, -44.80027815050835, -41.78731749303772, -41.78731387819676
LBFGS Accumulation History: 3 points
Removed measurement 1fc44929 to history. Total: 3
th(0)=-55.63271664349923;dx=-6.868954362590353E-7
New Minimum: -55.63271664349923 > -61.98089256618558
END: th(1.6843397559414055E7)=-61.98089256618558; dx=-1.5760177854339093E-7 evalInputDelta=6.348175922686352
Fitness changed from -55.63271664349923 to -61.98089256618558
Iteration 5 complete. Error: -61.98089256618558 Total: 21.9870; Orientation: 2.4609; Line Search: 12.4503
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/5510567a-3c5a-4f97-94c2-71311658116d.jpg)
Adding measurement 37fbe7c4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.223e+04, gradient 9.769e-04, dot -0.353; [aad4aac1-c8e4-4da2-8197-81e04daaf8dc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.98089256618558, -44.80027815050835, -41.78731749303772, -41.78731387819676
LBFGS Accumulation History: 3 points
Removed measurement 37fbe7c4 to history. Total: 3
th(0)=-61.98089256618558;dx=-9.541123623302254E-7
Armijo: th(3.628800000000001E7)=-59.7815807383392; dx=2.2998777633909385E-7 evalInputDelta=-2.1993118278463797
New Minimum: -61.98089256618558 > -65.268932736718
WOLF (strong): th(1.8144000000000004E7)=-65.268932736718; dx=2.445570567083995E-7 evalInputDelta=3.288040170532419
New Minimum: -65.268932736718 > -66.28833525816538
END: th(6048000.000000001)=-66.28833525816538; dx=-3.284467600934978E-7 evalInputDelta=4.307442691979794
Fitness changed from -61.98089256618558 to -66.28833525816538
Iteration 6 complete. Error: -66.28833525816538 Total: 35.9136; Orientation: 2.5647; Line Search: 24.8316
Adding measurement 2efce037 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.925e+04, gradient 7.026e-04, dot -0.615; [aad4aac1-c8e4-4da2-8197-81e04daaf8dc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -66.28833525816538, -44.80027815050835, -41.78731749303772, -41.78731387819676
LBFGS Accumulation History: 3 points
Removed measurement 2efce037 to history. Total: 3
th(0)=-66.28833525816538;dx=-4.932350536890314E-7
New Minimum: -66.28833525816538 > -70.45711211033398
END: th(1.3030021005312836E7)=-70.45711211033398; dx=-1.612653594480067E-7 evalInputDelta=4.168776852168605
Fitness changed from -66.28833525816538 to -70.45711211033398
Iteration 7 complete. Error: -70.45711211033398 Total: 20.4999; Orientation: 2.4386; Line Search: 12.1346
Adding measurement 617560e6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.479e+04, gradient 8.133e-04, dot -0.490; [aad4aac1-c8e4-4da2-8197-81e04daaf8dc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.45711211033398, -44.80027815050835, -41.78731749303772, -41.78731387819676
LBFGS Accumulation History: 3 points
Removed measurement 617560e6 to history. Total: 3
th(0)=-70.45711211033398;dx=-6.608186566706271E-7
New Minimum: -70.45711211033398 > -71.1528250093563
WOLF (strong): th(2.8072329265690096E7)=-71.1528250093563; dx=1.5246799995898067E-7 evalInputDelta=0.6957128990223254
New Minimum: -71.1528250093563 > -73.47751930483219
WOLF (strong): th(1.4036164632845048E7)=-73.47751930483219; dx=7.78329496422956E-8 evalInputDelta=3.0204071944982047
END: th(4678721.544281683)=-72.9541461201359; dx=-3.1331336768449953E-7 evalInputDelta=2.497034009801922
Fitness changed from -70.45711211033398 to -73.47751930483219
Iteration 8 complete. Error: -73.47751930483219 Total: 32.9935; Orientation: 2.4471; Line Search: 24.3341
Adding measurement 36e70e54 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.570e+04, gradient 9.348e-04, dot -0.365; [aad4aac1-c8e4-4da2-8197-81e04daaf8dc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.47751930483219, -44.80027815050835, -41.78731749303772, -41.78731387819676
LBFGS Accumulation History: 3 points
Removed measurement 36e70e54 to history. Total: 3
th(0)=-73.47751930483219;dx=-8.731601787048458E-7
New Minimum: -73.47751930483219 > -78.22959258315552
WOLF (strong): th(1.0080000000000004E7)=-78.22959258315552; dx=3.700141304975917E-8 evalInputDelta=4.752073278323337
END: th(5040000.000000002)=-77.212135609863; dx=-4.526907514140455E-7 evalInputDelta=3.734616305030812
Fitness changed from -73.47751930483219 to -78.22959258315552
Iteration 9 complete. Error: -78.22959258315552 Total: 26.2152; Orientation: 2.3801; Line Search: 17.9385
Adding measurement 358d066 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.684e+04, gradient 7.392e-04, dot -0.512; [aad4aac1-c8e4-4da2-8197-81e04daaf8dc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.22959258315552, -44.80027815050835, -41.78731749303772, -41.78731387819676
LBFGS Accumulation History: 3 points
Removed measurement 358d066 to history. Total: 3
th(0)=-78.22959258315552;dx=-5.461002514202664E-7
New Minimum: -78.22959258315552 > -81.29855050150829
END: th(1.0858350837760698E7)=-81.29855050150829; dx=-2.4418570292729746E-8 evalInputDelta=3.0689579183527655
Fitness changed from -78.22959258315552 to -81.29855050150829
Iteration 10 complete. Error: -81.29855050150829 Total: 20.5457; Orientation: 2.4701; Line Search: 12.2427
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0a163dac-6ffc-48bf-a3ce-c9b69ce0daec.jpg)
Final threshold in iteration 11: -81.29855050150829 (> -Infinity) after 302.278s (< 5400.000s)

Returns

    -81.29855050150829