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 113.43 seconds (1.682 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: 46370613655700
Reset training subject: 46373006793200
Adding measurement 5b68483a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-28.70113500938652;dx=-1.9465210211973077E-6
New Minimum: -28.70113500938652 > -28.701138056371562
WOLFE (weak): th(2.154434690031884)=-28.701138056371562; dx=-1.7785725837848385E-6 evalInputDelta=3.0469850429426515E-6
New Minimum: -28.701138056371562 > -28.701141103356278
WOLFE (weak): th(4.308869380063768)=-28.701141103356278; dx=-1.7769206009933563E-6 evalInputDelta=6.0939697590356445E-6
New Minimum: -28.701141103356278 > -28.701159385257792
WOLFE (weak): th(12.926608140191302)=-28.701159385257792; dx=-1.7763952230028212E-6 evalInputDelta=2.437587127346319E-5
New Minimum: -28.701159385257792 > -28.701234036234773
WOLFE (weak): th(51.70643256076521)=-28.701234036234773; dx=-1.777111446799019E-6 evalInputDelta=9.902684825391361E-5
New Minimum: -28.701234036234773 > -28.70163775754173
WOLFE (weak): th(258.53216280382605)=-28.70163775754173; dx=-1.7785697144613922E-6 evalInputDelta=5.027481552097868E-4
New Minimum: -28.70163775754173 > -28.704157459563962
WOLFE (weak): th(1551.1929768229563)=-28.704157459563962; dx=-1.7744290846678854E-6 evalInputDelta=0.003022450177443403
New Minimum: -28.704157459563962 > -28.722287003889992
WOLFE (weak): th(10858.350837760694)=-28.722287003889992; dx=-1.777357084992168E-6 evalInputDelta=0.02115199450347305
New Minimum: -28.722287003889992 > -28.87003518065438
WOLFE (weak): th(86866.80670208555)=-28.87003518065438; dx=-1.7699422036375986E-6 evalInputDelta=0.16890017126786105
New Minimum: -28.87003518065438 > -30.17414968990497
END: th(781801.26031877)=-30.17414968990497; dx=-1.6558180653041959E-6 evalInputDelta=1.4730146805184496
Fitness changed from -28.70113500938652 to -30.17414968990497
Iteration 1 complete. Error: -30.17414968990497 Total: 29.7986; Orientation: 0.0619; Line Search: 22.8939
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6bddd4a8-bc1b-40c4-9033-681d6dc340ce.jpg)
Adding measurement 7c49af37 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-30.17414968990497;dx=-1.6210138216122224E-6
New Minimum: -30.17414968990497 > -32.9669427231457
END: th(1684339.7559414052)=-32.9669427231457; dx=-1.4022894489021603E-6 evalInputDelta=2.7927930332407307
Fitness changed from -30.17414968990497 to -32.9669427231457
Iteration 2 complete. Error: -32.9669427231457 Total: 7.3118; Orientation: 0.0603; Line Search: 4.4889
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ce979905-6ae0-474f-b225-a4b77a1feb40.jpg)
Adding measurement 3ef65c7c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-32.9669427231457;dx=-1.3592058284389414E-6
New Minimum: -32.9669427231457 > -37.66489139409801
END: th(3628800.0)=-37.66489139409801; dx=-1.013296969488287E-6 evalInputDelta=4.697948670952307
Fitness changed from -32.9669427231457 to -37.66489139409801
Iteration 3 complete. Error: -37.66489139409801 Total: 7.9151; Orientation: 0.0622; Line Search: 4.9749
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1f1139d8-a7fe-4d61-be22-8cb2abf0a64b.jpg)
Adding measurement 356124d5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.892e+04, gradient 1.012e-03, dot -0.857; [f4807acb-014f-48c1-948d-dbf1edadeb09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.66489139409801, -32.9669427231457, -30.17414968990497, -28.70113500938652
LBFGS Accumulation History: 3 points
Removed measurement 356124d5 to history. Total: 3
th(0)=-37.66489139409801;dx=-1.0220751789455813E-6
New Minimum: -37.66489139409801 > -44.67651553901301
END: th(7818012.6031877)=-44.67651553901301; dx=-6.467679983864434E-7 evalInputDelta=7.011624144915004
Fitness changed from -37.66489139409801 to -44.67651553901301
Iteration 4 complete. Error: -44.67651553901301 Total: 8.3280; Orientation: 1.0714; Line Search: 4.6136
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/078038e8-97ae-4916-928e-4cf037c48c3f.jpg)
Adding measurement f1e3e00 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.968e+04, gradient 8.783e-04, dot -0.695; [f4807acb-014f-48c1-948d-dbf1edadeb09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.67651553901301, -32.9669427231457, -30.17414968990497, -28.70113500938652
LBFGS Accumulation History: 3 points
Removed measurement f1e3e00 to history. Total: 3
th(0)=-44.67651553901301;dx=-7.708865063812104E-7
New Minimum: -44.67651553901301 > -54.07620339190452
END: th(1.684339755941405E7)=-54.07620339190452; dx=-3.4351621997495016E-7 evalInputDelta=9.39968785289151
Fitness changed from -44.67651553901301 to -54.07620339190452
Iteration 5 complete. Error: -54.07620339190452 Total: 8.4437; Orientation: 1.0379; Line Search: 4.6341
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d701ede6-db8b-4919-8dbf-94b8981d097b.jpg)
Adding measurement 2300b486 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.575e+04, gradient 8.550e-04, dot -0.515; [f4807acb-014f-48c1-948d-dbf1edadeb09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.07620339190452, -32.9669427231457, -30.17414968990497, -28.70113500938652
LBFGS Accumulation History: 3 points
Removed measurement 2300b486 to history. Total: 3
th(0)=-54.07620339190452;dx=-7.305328240203497E-7
New Minimum: -54.07620339190452 > -61.692675096872776
END: th(3.6288E7)=-61.692675096872776; dx=-1.5025105580413195E-8 evalInputDelta=7.616471704968255
Fitness changed from -54.07620339190452 to -61.692675096872776
Iteration 6 complete. Error: -61.692675096872776 Total: 8.4000; Orientation: 1.0526; Line Search: 4.6084
Adding measurement 22dbdfff to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.136e+04, gradient 1.041e-03, dot -0.257; [f4807acb-014f-48c1-948d-dbf1edadeb09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.692675096872776, -32.9669427231457, -30.17414968990497, -28.70113500938652
LBFGS Accumulation History: 3 points
Removed measurement 22dbdfff to history. Total: 3
th(0)=-61.692675096872776;dx=-1.0815314152677809E-6
Armijo: th(7.8180126031877E7)=-56.686001076292726; dx=1.860500440619023E-7 evalInputDelta=-5.00667402058005
New Minimum: -61.692675096872776 > -67.63567930102778
WOLF (strong): th(3.90900630159385E7)=-67.63567930102778; dx=2.6023414133543646E-7 evalInputDelta=5.943004204155002
New Minimum: -67.63567930102778 > -71.1618150034509
END: th(1.3030021005312832E7)=-71.1618150034509; dx=-2.729542856705501E-7 evalInputDelta=9.469139906578121
Fitness changed from -61.692675096872776 to -71.1618150034509
Iteration 7 complete. Error: -71.1618150034509 Total: 12.5315; Orientation: 1.3522; Line Search: 9.0535
Adding measurement 319a5fb7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.795e+04, gradient 6.733e-04, dot -0.444; [f4807acb-014f-48c1-948d-dbf1edadeb09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -71.1618150034509, -32.9669427231457, -30.17414968990497, -28.70113500938652
LBFGS Accumulation History: 3 points
Removed measurement 319a5fb7 to history. Total: 3
th(0)=-71.1618150034509;dx=-4.5273948134513955E-7
New Minimum: -71.1618150034509 > -78.44189343945314
END: th(2.807232926569009E7)=-78.44189343945314; dx=-8.448167448310774E-8 evalInputDelta=7.280078436002242
Fitness changed from -71.1618150034509 to -78.44189343945314
Iteration 8 complete. Error: -78.44189343945314 Total: 7.9749; Orientation: 1.0509; Line Search: 4.7368
Adding measurement 2a9f0388 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.981e+04, gradient 7.363e-04, dot -0.394; [f4807acb-014f-48c1-948d-dbf1edadeb09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.44189343945314, -32.9669427231457, -30.17414968990497, -28.70113500938652
LBFGS Accumulation History: 3 points
Removed measurement 2a9f0388 to history. Total: 3
th(0)=-78.44189343945314;dx=-5.405088851633273E-7
Armijo: th(6.048000000000001E7)=-77.93143152404188; dx=1.371322776418343E-7 evalInputDelta=-0.5104619154112555
New Minimum: -78.44189343945314 > -82.87013773787041
WOLF (strong): th(3.0240000000000004E7)=-82.87013773787041; dx=8.808480843460256E-8 evalInputDelta=4.428244298417269
END: th(1.0080000000000002E7)=-82.55552879078218; dx=-2.3141797763864435E-7 evalInputDelta=4.113635351329037
Fitness changed from -78.44189343945314 to -82.87013773787041
Iteration 9 complete. Error: -82.87013773787041 Total: 12.1377; Orientation: 1.0453; Line Search: 8.8875
Adding measurement 82c30e7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.540e+04, gradient 8.119e-04, dot -0.301; [f4807acb-014f-48c1-948d-dbf1edadeb09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.87013773787041, -32.9669427231457, -30.17414968990497, -28.70113500938652
LBFGS Accumulation History: 3 points
Removed measurement 82c30e7 to history. Total: 3
th(0)=-82.87013773787041;dx=-6.579779079842087E-7
New Minimum: -82.87013773787041 > -89.92396013086812
WOLF (strong): th(2.1716701675521392E7)=-89.92396013086812; dx=3.2328490374831006E-8 evalInputDelta=7.053822392997716
END: th(1.0858350837760696E7)=-88.5840706166754; dx=-3.046851675021095E-7 evalInputDelta=5.713932878804997
Fitness changed from -82.87013773787041 to -89.92396013086812
Iteration 10 complete. Error: -89.92396013086812 Total: 10.1446; Orientation: 0.9918; Line Search: 6.7920
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b1db973c-a2af-46ec-b89c-954331268d1c.jpg)
Final threshold in iteration 11: -89.92396013086812 (> -Infinity) after 113.429s (< 5400.000s)

Returns

    -89.92396013086812