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 133.05 seconds (1.484 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: 330404195234800
Reset training subject: 330406834124600
Adding measurement 77c99983 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-131.1281737128307;dx=-2.8882032546082016E-5
New Minimum: -131.1281737128307 > -131.12822520019927
END: th(2.154434690031884)=-131.12822520019927; dx=-2.1424730539474502E-5 evalInputDelta=5.14873685801831E-5
Fitness changed from -131.1281737128307 to -131.12822520019927
Iteration 1 complete. Error: -131.12822520019927 Total: 13.0756; Orientation: 0.0604; Line Search: 5.0774
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c3fc70c1-1dbd-411a-a085-b587f369f2a8.jpg)
Adding measurement 20cb2b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-131.12822520019927;dx=-2.1314619593773392E-5
New Minimum: -131.12822520019927 > -131.1283355302067
WOLFE (weak): th(4.641588833612779)=-131.1283355302067; dx=-2.131011174588268E-5 evalInputDelta=1.10330007430548E-4
New Minimum: -131.1283355302067 > -131.12843850479655
WOLFE (weak): th(9.283177667225559)=-131.12843850479655; dx=-2.129718654635718E-5 evalInputDelta=2.1330459728119422E-4
New Minimum: -131.12843850479655 > -131.12888717885144
WOLFE (weak): th(27.849533001676676)=-131.12888717885144; dx=-2.1293588147832826E-5 evalInputDelta=6.619786521753213E-4
New Minimum: -131.12888717885144 > -131.13088780513306
WOLFE (weak): th(111.3981320067067)=-131.13088780513306; dx=-2.1282997600248724E-5 evalInputDelta=0.0026626049337892255
New Minimum: -131.13088780513306 > -131.1415523934515
WOLFE (weak): th(556.9906600335335)=-131.1415523934515; dx=-2.1272420019698362E-5 evalInputDelta=0.013327193252223424
New Minimum: -131.1415523934515 > -131.20816805449053
WOLFE (weak): th(3341.9439602012008)=-131.20816805449053; dx=-2.1258503285972704E-5 evalInputDelta=0.0799428542912608
New Minimum: -131.20816805449053 > -131.6857953034975
WOLFE (weak): th(23393.607721408407)=-131.6857953034975; dx=-2.109979777945964E-5 evalInputDelta=0.5575701032982465
New Minimum: -131.6857953034975 > -135.43821759757827
WOLFE (weak): th(187148.86177126726)=-135.43821759757827; dx=-1.9609548342189886E-5 evalInputDelta=4.3099923973790055
New Minimum: -135.43821759757827 > -155.7794380143931
END: th(1684339.7559414054)=-155.7794380143931; dx=-5.923645351394375E-6 evalInputDelta=24.651212814193826
Fitness changed from -131.12822520019927 to -155.7794380143931
Iteration 2 complete. Error: -155.7794380143931 Total: 29.0632; Orientation: 0.0577; Line Search: 25.9072
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/617a186c-e440-4ba1-8a43-f9c309476bd8.jpg)
Adding measurement 26bf30a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-155.7794380143931;dx=-9.697436946562424E-6
New Minimum: -155.7794380143931 > -173.88916708322108
END: th(3628800.0000000005)=-173.88916708322108; dx=-1.1001877962201238E-6 evalInputDelta=18.10972906882799
Fitness changed from -155.7794380143931 to -173.88916708322108
Iteration 3 complete. Error: -173.88916708322108 Total: 8.2499; Orientation: 0.0585; Line Search: 5.1494
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/594b71dd-7143-438b-bc77-93503d0c7d88.jpg)
Adding measurement 25ce0abe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.815e+03, gradient 3.074e-03, dot -0.318; [502a7bfb-6825-45ca-9a2e-285d415a3430 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -173.88916708322108, -155.7794380143931, -131.12822520019927, -131.1281737128307
LBFGS Accumulation History: 3 points
Removed measurement 25ce0abe to history. Total: 3
th(0)=-173.88916708322108;dx=-9.438457288845591E-6
Armijo: th(7818012.603187701)=-172.62114102100068; dx=3.085613958289763E-6 evalInputDelta=-1.2680260622204003
New Minimum: -173.88916708322108 > -184.7075557013412
WOLF (strong): th(3909006.3015938504)=-184.7075557013412; dx=1.4768022333108132E-6 evalInputDelta=10.81838861812011
END: th(1303002.1005312835)=-183.27482819257864; dx=-3.832629138509833E-6 evalInputDelta=9.385661109357557
Fitness changed from -173.88916708322108 to -184.7075557013412
Iteration 4 complete. Error: -184.7075557013412 Total: 14.2238; Orientation: 1.1087; Line Search: 10.2175
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/61dc3e22-c13a-4c2d-842c-3ffbda695701.jpg)
Adding measurement 5c37078f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.598e+03, gradient 3.189e-03, dot -0.237; [502a7bfb-6825-45ca-9a2e-285d415a3430 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -184.7075557013412, -155.7794380143931, -131.12822520019927, -131.1281737128307
LBFGS Accumulation History: 3 points
Removed measurement 5c37078f to history. Total: 3
th(0)=-184.7075557013412;dx=-1.0154066862157312E-5
New Minimum: -184.7075557013412 > -198.56826218202252
WOLF (strong): th(2807232.926569009)=-198.56826218202252; dx=5.600748635842435E-7 evalInputDelta=13.86070648068133
END: th(1403616.4632845046)=-196.0679586912608; dx=-4.332183547885795E-6 evalInputDelta=11.360402989919606
Fitness changed from -184.7075557013412 to -198.56826218202252
Iteration 5 complete. Error: -198.56826218202252 Total: 11.5404; Orientation: 1.0324; Line Search: 7.5577
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/811728ee-f2d8-4909-b948-6b2e606c431c.jpg)
Adding measurement 66d10c06 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.262e+04, gradient 2.508e-03, dot -0.368; [502a7bfb-6825-45ca-9a2e-285d415a3430 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -198.56826218202252, -155.7794380143931, -131.12822520019927, -131.1281737128307
LBFGS Accumulation History: 3 points
Removed measurement 66d10c06 to history. Total: 3
th(0)=-198.56826218202252;dx=-6.286877220198807E-6
New Minimum: -198.56826218202252 > -207.29863907275356
WOLF (strong): th(3024000.0000000005)=-207.29863907275356; dx=3.875724856864646E-7 evalInputDelta=8.730376890731037
END: th(1512000.0000000002)=-205.881645475665; dx=-2.564364892483497E-6 evalInputDelta=7.313383293642488
Fitness changed from -198.56826218202252 to -207.29863907275356
Iteration 6 complete. Error: -207.29863907275356 Total: 11.8132; Orientation: 0.9795; Line Search: 7.6553
Adding measurement 7caf58f3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.811e+04, gradient 2.410e-03, dot -0.413; [502a7bfb-6825-45ca-9a2e-285d415a3430 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -207.29863907275356, -155.7794380143931, -131.12822520019927, -131.1281737128307
LBFGS Accumulation History: 3 points
Removed measurement 7caf58f3 to history. Total: 3
th(0)=-207.29863907275356;dx=-5.8028313796384555E-6
New Minimum: -207.29863907275356 > -213.85389511020497
WOLF (strong): th(3257505.251328209)=-213.85389511020497; dx=1.3125060281904016E-6 evalInputDelta=6.555256037451414
New Minimum: -213.85389511020497 > -214.00628058938173
END: th(1628752.6256641045)=-214.00628058938173; dx=-1.7485818542801372E-6 evalInputDelta=6.707641516628172
Fitness changed from -207.29863907275356 to -214.00628058938173
Iteration 7 complete. Error: -214.00628058938173 Total: 11.3167; Orientation: 1.0243; Line Search: 7.7613
Adding measurement 741421fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.310e+04, gradient 1.663e-03, dot -0.651; [502a7bfb-6825-45ca-9a2e-285d415a3430 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -214.00628058938173, -155.7794380143931, -131.12822520019927, -131.1281737128307
LBFGS Accumulation History: 3 points
Removed measurement 741421fb to history. Total: 3
th(0)=-214.00628058938173;dx=-2.762323853509474E-6
New Minimum: -214.00628058938173 > -220.94128824482874
END: th(3509041.158211262)=-220.94128824482874; dx=-1.172085740340899E-6 evalInputDelta=6.935007655447009
Fitness changed from -214.00628058938173 to -220.94128824482874
Iteration 8 complete. Error: -220.94128824482874 Total: 8.5056; Orientation: 0.9986; Line Search: 4.9863
Adding measurement 4cb9ac2c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.347e+04, gradient 1.865e-03, dot -0.516; [502a7bfb-6825-45ca-9a2e-285d415a3430 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -220.94128824482874, -155.7794380143931, -131.12822520019927, -131.1281737128307
LBFGS Accumulation History: 3 points
Removed measurement 4cb9ac2c to history. Total: 3
th(0)=-220.94128824482874;dx=-3.4644360983208727E-6
New Minimum: -220.94128824482874 > -220.94831639189965
WOLF (strong): th(7560000.000000003)=-220.94831639189965; dx=1.3105541158214889E-6 evalInputDelta=0.007028147070911928
New Minimum: -220.94831639189965 > -225.41424694879328
WOLF (strong): th(3780000.0000000014)=-225.41424694879328; dx=2.9383562553353155E-7 evalInputDelta=4.472958703964537
END: th(1260000.0000000005)=-224.36600495840045; dx=-1.6632705942859756E-6 evalInputDelta=3.424716713571712
Fitness changed from -220.94128824482874 to -225.41424694879328
Iteration 9 complete. Error: -225.41424694879328 Total: 13.7006; Orientation: 0.9552; Line Search: 10.2344
Adding measurement 38ad1172 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.154e+04, gradient 2.284e-03, dot -0.355; [502a7bfb-6825-45ca-9a2e-285d415a3430 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -225.41424694879328, -155.7794380143931, -131.12822520019927, -131.1281737128307
LBFGS Accumulation History: 3 points
Removed measurement 38ad1172 to history. Total: 3
th(0)=-225.41424694879328;dx=-5.201044351563381E-6
New Minimum: -225.41424694879328 > -231.37621741074676
WOLF (strong): th(2714587.7094401745)=-231.37621741074676; dx=8.204101762662457E-7 evalInputDelta=5.961970461953484
END: th(1357293.8547200873)=-230.80827057391133; dx=-2.030934198013998E-6 evalInputDelta=5.394023625118052
Fitness changed from -225.41424694879328 to -231.37621741074676
Iteration 10 complete. Error: -231.37621741074676 Total: 11.1056; Orientation: 1.0229; Line Search: 7.6356
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/edd1f218-3dad-4fc7-8a87-967f7f9c3238.jpg)
Final threshold in iteration 11: -231.37621741074676 (> -Infinity) after 133.054s (< 5400.000s)

Returns

    -231.37621741074676