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 130.00 seconds (1.604 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: 112923430361600
Reset training subject: 112926235235300
Adding measurement 7e628ee5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-29.203839840691565;dx=-1.3498985332558722E-6
New Minimum: -29.203839840691565 > -29.203842736359142
END: th(2.154434690031884)=-29.203842736359142; dx=-1.0123291483062457E-6 evalInputDelta=2.8956675777180862E-6
Fitness changed from -29.203839840691565 to -29.203842736359142
Iteration 1 complete. Error: -29.203842736359142 Total: 12.9954; Orientation: 0.0628; Line Search: 5.0632
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5f50f2b7-5104-4b21-9443-604d8e413596.jpg)
Adding measurement 21a9f671 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-29.203842736359142;dx=-1.0128780168345375E-6
New Minimum: -29.203842736359142 > -29.203847079859973
WOLFE (weak): th(4.641588833612779)=-29.203847079859973; dx=-1.0118233411304618E-6 evalInputDelta=4.343500830117364E-6
New Minimum: -29.203847079859973 > -29.20385142336016
WOLFE (weak): th(9.283177667225559)=-29.20385142336016; dx=-1.01129412171608E-6 evalInputDelta=8.687001017193552E-6
New Minimum: -29.20385142336016 > -29.20387314085139
WOLFE (weak): th(27.849533001676676)=-29.20387314085139; dx=-1.009673202779561E-6 evalInputDelta=3.040449224656072E-5
New Minimum: -29.20387314085139 > -29.203965801965854
WOLFE (weak): th(111.3981320067067)=-29.203965801965854; dx=-1.0086050761302465E-6 evalInputDelta=1.2306560671149214E-4
New Minimum: -29.203965801965854 > -29.204462402616105
WOLFE (weak): th(556.9906600335335)=-29.204462402616105; dx=-1.0093187605280775E-6 evalInputDelta=6.196662569628586E-4
New Minimum: -29.204462402616105 > -29.2075590890493
WOLFE (weak): th(3341.9439602012008)=-29.2075590890493; dx=-1.0087812972181324E-6 evalInputDelta=0.0037163526901586863
New Minimum: -29.2075590890493 > -29.22984294292934
WOLFE (weak): th(23393.607721408407)=-29.22984294292934; dx=-1.0078579762154462E-6 evalInputDelta=0.02600020657019897
New Minimum: -29.22984294292934 > -29.41070483623087
WOLFE (weak): th(187148.86177126726)=-29.41070483623087; dx=-9.953647683774996E-7 evalInputDelta=0.20686209987172788
New Minimum: -29.41070483623087 > -30.94368467405292
END: th(1684339.7559414054)=-30.94368467405292; dx=-8.567608676192882E-7 evalInputDelta=1.7398419376937788
Fitness changed from -29.203842736359142 to -30.94368467405292
Iteration 2 complete. Error: -30.94368467405292 Total: 29.7777; Orientation: 0.0617; Line Search: 26.5196
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1466368c-e59e-46cc-b8a8-45312d694f88.jpg)
Adding measurement 5fb7d941 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-30.94368467405292;dx=-8.858490643035827E-7
New Minimum: -30.94368467405292 > -33.6973592516548
END: th(3628800.0000000005)=-33.6973592516548; dx=-5.636171719012201E-7 evalInputDelta=2.753674577601881
Fitness changed from -30.94368467405292 to -33.6973592516548
Iteration 3 complete. Error: -33.6973592516548 Total: 8.3797; Orientation: 0.0634; Line Search: 5.2314
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/97a5291e-ac98-452d-991c-49e41a7e1bb9.jpg)
Adding measurement 485ada90 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.113e+04, gradient 7.576e-04, dot -0.788; [02a3f362-be95-411b-ae77-c2281a3db457 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.6973592516548, -30.94368467405292, -29.203842736359142, -29.203839840691565
LBFGS Accumulation History: 3 points
Removed measurement 485ada90 to history. Total: 3
th(0)=-33.6973592516548;dx=-5.738907332941891E-7
New Minimum: -33.6973592516548 > -37.36509149397663
END: th(7818012.603187701)=-37.36509149397663; dx=-3.0914750540680567E-7 evalInputDelta=3.6677322423218257
Fitness changed from -33.6973592516548 to -37.36509149397663
Iteration 4 complete. Error: -37.36509149397663 Total: 9.5823; Orientation: 1.1274; Line Search: 5.4402
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b429390c-50ca-4bdf-9c13-354f3073eab0.jpg)
Adding measurement 1535850c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.025e+04, gradient 6.750e-04, dot -0.587; [02a3f362-be95-411b-ae77-c2281a3db457 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.36509149397663, -30.94368467405292, -29.203842736359142, -29.203839840691565
LBFGS Accumulation History: 3 points
Removed measurement 1535850c to history. Total: 3
th(0)=-37.36509149397663;dx=-4.554499427027693E-7
New Minimum: -37.36509149397663 > -41.40272120018711
END: th(1.6843397559414055E7)=-41.40272120018711; dx=-1.1292968312044002E-7 evalInputDelta=4.037629706210481
Fitness changed from -37.36509149397663 to -41.40272120018711
Iteration 5 complete. Error: -41.40272120018711 Total: 9.7616; Orientation: 1.0659; Line Search: 5.4080
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c87c71cb-0d25-49d7-bcce-ea1742b05cdb.jpg)
Adding measurement d49a0aa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.131e+04, gradient 7.298e-04, dot -0.359; [02a3f362-be95-411b-ae77-c2281a3db457 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -41.40272120018711, -30.94368467405292, -29.203842736359142, -29.203839840691565
LBFGS Accumulation History: 3 points
Removed measurement d49a0aa to history. Total: 3
th(0)=-41.40272120018711;dx=-5.313995868472919E-7
New Minimum: -41.40272120018711 > -43.59047742538857
WOLF (strong): th(3.628800000000001E7)=-43.59047742538857; dx=4.869963758791178E-8 evalInputDelta=2.1877562252014613
New Minimum: -43.59047742538857 > -44.61929051333901
WOLF (strong): th(1.8144000000000004E7)=-44.61929051333901; dx=1.916519002034403E-8 evalInputDelta=3.2165693131519006
END: th(6048000.000000001)=-43.904865776537406; dx=-2.2623873976156822E-7 evalInputDelta=2.5021445763502967
Fitness changed from -41.40272120018711 to -44.61929051333901
Iteration 6 complete. Error: -44.61929051333901 Total: 15.0966; Orientation: 1.0699; Line Search: 10.9053
Adding measurement 57c45566 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.330e+04, gradient 7.621e-04, dot -0.279; [02a3f362-be95-411b-ae77-c2281a3db457 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.61929051333901, -30.94368467405292, -29.203842736359142, -29.203839840691565
LBFGS Accumulation History: 3 points
Removed measurement 57c45566 to history. Total: 3
th(0)=-44.61929051333901;dx=-5.798587834519287E-7
New Minimum: -44.61929051333901 > -48.62993736402987
END: th(1.3030021005312836E7)=-48.62993736402987; dx=-9.299448883200658E-9 evalInputDelta=4.010646850690861
Fitness changed from -44.61929051333901 to -48.62993736402987
Iteration 7 complete. Error: -48.62993736402987 Total: 8.8327; Orientation: 0.9888; Line Search: 5.2910
Adding measurement 54a90215 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.146e+04, gradient 6.381e-04, dot -0.396; [02a3f362-be95-411b-ae77-c2281a3db457 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.62993736402987, -30.94368467405292, -29.203842736359142, -29.203839840691565
LBFGS Accumulation History: 3 points
Removed measurement 54a90215 to history. Total: 3
th(0)=-48.62993736402987;dx=-4.0682969207691736E-7
New Minimum: -48.62993736402987 > -49.82355910602026
WOLF (strong): th(2.8072329265690096E7)=-49.82355910602026; dx=9.512907643715197E-8 evalInputDelta=1.1936217419903912
New Minimum: -49.82355910602026 > -51.12399917920705
WOLF (strong): th(1.4036164632845048E7)=-51.12399917920705; dx=1.9243303165997033E-8 evalInputDelta=2.494061815177176
END: th(4678721.544281683)=-50.2828179361889; dx=-2.419624225104313E-7 evalInputDelta=1.6528805721590274
Fitness changed from -48.62993736402987 to -51.12399917920705
Iteration 8 complete. Error: -51.12399917920705 Total: 14.4111; Orientation: 1.0275; Line Search: 10.7574
Adding measurement 48df35b9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.512e+04, gradient 6.462e-04, dot -0.379; [02a3f362-be95-411b-ae77-c2281a3db457 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.12399917920705, -30.94368467405292, -29.203842736359142, -29.203839840691565
LBFGS Accumulation History: 3 points
Removed measurement 48df35b9 to history. Total: 3
th(0)=-51.12399917920705;dx=-4.1754726576614184E-7
New Minimum: -51.12399917920705 > -53.46301695769861
END: th(1.0080000000000004E7)=-53.46301695769861; dx=-2.035852523210945E-8 evalInputDelta=2.3390177784915664
Fitness changed from -51.12399917920705 to -53.46301695769861
Iteration 9 complete. Error: -53.46301695769861 Total: 9.0767; Orientation: 1.0409; Line Search: 5.4250
Adding measurement 21da81c6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.102e+04, gradient 5.344e-04, dot -0.482; [02a3f362-be95-411b-ae77-c2281a3db457 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.46301695769861, -30.94368467405292, -29.203842736359142, -29.203839840691565
LBFGS Accumulation History: 3 points
Removed measurement 21da81c6 to history. Total: 3
th(0)=-53.46301695769861;dx=-2.8482570660893826E-7
New Minimum: -53.46301695769861 > -54.86994079184049
WOLF (strong): th(2.1716701675521396E7)=-54.86994079184049; dx=4.166833632887336E-8 evalInputDelta=1.4069238341418782
New Minimum: -54.86994079184049 > -55.1642724894528
END: th(1.0858350837760698E7)=-55.1642724894528; dx=-3.18429056135332E-8 evalInputDelta=1.7012555317541853
Fitness changed from -53.46301695769861 to -55.1642724894528
Iteration 10 complete. Error: -55.1642724894528 Total: 11.5615; Orientation: 0.9902; Line Search: 7.9350
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/49b12618-1341-4573-a6d4-4c4bad3f6569.jpg)
Final threshold in iteration 11: -55.1642724894528 (> -Infinity) after 130.003s (< 5400.000s)

Returns

    -55.1642724894528