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 86.81 seconds (0.922 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: 309453002499500
Reset training subject: 309454748314000
Adding measurement 6198b896 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-151.59683189340936;dx=-2.7768771782286635E-5
New Minimum: -151.59683189340936 > -151.59686583474152
END: th(2.154434690031884)=-151.59686583474152; dx=-1.7219912917305627E-5 evalInputDelta=3.3941332162612525E-5
Fitness changed from -151.59683189340936 to -151.59686583474152
Iteration 1 complete. Error: -151.59686583474152 Total: 8.4646; Orientation: 0.0637; Line Search: 3.5699
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/1057ec40-66f2-4fbf-80da-75e4821bdd01.jpg)
Adding measurement 52b94cce to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-151.59686583474152;dx=-1.7124238137477993E-5
New Minimum: -151.59686583474152 > -151.59695408216953
WOLFE (weak): th(4.641588833612779)=-151.59695408216953; dx=-1.7110798200860213E-5 evalInputDelta=8.824742801039065E-5
New Minimum: -151.59695408216953 > -151.59704232954616
WOLFE (weak): th(9.283177667225559)=-151.59704232954616; dx=-1.7089707504548794E-5 evalInputDelta=1.7649480463433065E-4
New Minimum: -151.59704232954616 > -151.5974021067808
WOLFE (weak): th(27.849533001676676)=-151.5974021067808; dx=-1.7087766587140975E-5 evalInputDelta=5.362720392838582E-4
New Minimum: -151.5974021067808 > -151.59897018249333
WOLFE (weak): th(111.3981320067067)=-151.59897018249333; dx=-1.70666393892596E-5 evalInputDelta=0.0021043477518105647
New Minimum: -151.59897018249333 > -151.60738049361726
WOLFE (weak): th(556.9906600335335)=-151.60738049361726; dx=-1.7059714443955365E-5 evalInputDelta=0.010514658875734995
New Minimum: -151.60738049361726 > -151.6599021405393
WOLFE (weak): th(3341.9439602012008)=-151.6599021405393; dx=-1.7054427444196527E-5 evalInputDelta=0.06303630579776609
New Minimum: -151.6599021405393 > -152.03736807330617
WOLFE (weak): th(23393.607721408407)=-152.03736807330617; dx=-1.701063635690583E-5 evalInputDelta=0.44050223856464754
New Minimum: -152.03736807330617 > -155.0606039958923
WOLFE (weak): th(187148.86177126726)=-155.0606039958923; dx=-1.6401517672719945E-5 evalInputDelta=3.4637381611507863
New Minimum: -155.0606039958923 > -176.77067127961092
END: th(1684339.7559414054)=-176.77067127961092; dx=-9.652800497020943E-6 evalInputDelta=25.1738054448694
Fitness changed from -151.59686583474152 to -176.77067127961092
Iteration 2 complete. Error: -176.77067127961092 Total: 18.1565; Orientation: 0.0612; Line Search: 16.2435
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a5b43a32-b658-4e97-8020-25ba5759a18c.jpg)
Adding measurement 60186568 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-176.77067127961092;dx=-1.17446242153476E-5
New Minimum: -176.77067127961092 > -205.46117419130601
END: th(3628800.0000000005)=-205.46117419130601; dx=-4.082574508844217E-6 evalInputDelta=28.69050291169509
Fitness changed from -176.77067127961092 to -205.46117419130601
Iteration 3 complete. Error: -205.46117419130601 Total: 5.3643; Orientation: 0.0618; Line Search: 3.2350
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b99bc339-abdf-4e05-a0bd-ebf3a95a3da4.jpg)
Adding measurement 536af805 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.271e+04, gradient 3.011e-03, dot -0.416; [dba007bb-4854-41dc-aa88-fd3012daafb1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -205.46117419130601, -176.77067127961092, -151.59686583474152, -151.59683189340936
LBFGS Accumulation History: 3 points
Removed measurement 536af805 to history. Total: 3
th(0)=-205.46117419130601;dx=-9.063936695846016E-6
New Minimum: -205.46117419130601 > -228.9753928401596
END: th(7818012.603187701)=-228.9753928401596; dx=-1.1335836230823126E-7 evalInputDelta=23.514218648853586
Fitness changed from -205.46117419130601 to -228.9753928401596
Iteration 4 complete. Error: -228.9753928401596 Total: 6.4905; Orientation: 1.0656; Line Search: 3.5202
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/16d792e6-2020-412e-ad43-ccf126a1e8b1.jpg)
Adding measurement 441665b2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.850e+03, gradient 3.634e-03, dot -0.164; [dba007bb-4854-41dc-aa88-fd3012daafb1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -228.9753928401596, -176.77067127961092, -151.59686583474152, -151.59683189340936
LBFGS Accumulation History: 3 points
Removed measurement 441665b2 to history. Total: 3
th(0)=-228.9753928401596;dx=-1.3174348490166269E-5
Armijo: th(1.6843397559414055E7)=-202.41407550009612; dx=2.9769504941813017E-6 evalInputDelta=-26.561317340063482
New Minimum: -228.9753928401596 > -239.0637873427562
WOLF (strong): th(8421698.779707028)=-239.0637873427562; dx=4.065157030810959E-6 evalInputDelta=10.0883945025966
New Minimum: -239.0637873427562 > -253.65685180876858
END: th(2807232.926569009)=-253.65685180876858; dx=-2.8890663199031056E-6 evalInputDelta=24.68145896860898
Fitness changed from -228.9753928401596 to -253.65685180876858
Iteration 5 complete. Error: -253.65685180876858 Total: 9.5702; Orientation: 1.0508; Line Search: 6.7388
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1457fd3e-ad5c-4a99-adcb-346c1accea62.jpg)
Adding measurement 6e27857f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.426e+04, gradient 2.463e-03, dot -0.402; [dba007bb-4854-41dc-aa88-fd3012daafb1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -253.65685180876858, -176.77067127961092, -151.59686583474152, -151.59683189340936
LBFGS Accumulation History: 3 points
Removed measurement 6e27857f to history. Total: 3
th(0)=-253.65685180876858;dx=-6.045360177063337E-6
New Minimum: -253.65685180876858 > -270.5498922482307
END: th(6048000.000000001)=-270.5498922482307; dx=-2.3010621488965047E-7 evalInputDelta=16.89304043946214
Fitness changed from -253.65685180876858 to -270.5498922482307
Iteration 6 complete. Error: -270.5498922482307 Total: 6.2405; Orientation: 1.0320; Line Search: 3.2731
Adding measurement 34747c2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.353e+04, gradient 2.896e-03, dot -0.268; [dba007bb-4854-41dc-aa88-fd3012daafb1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -270.5498922482307, -176.77067127961092, -151.59686583474152, -151.59683189340936
LBFGS Accumulation History: 3 points
Removed measurement 34747c2 to history. Total: 3
th(0)=-270.5498922482307;dx=-8.383720778325724E-6
Armijo: th(1.3030021005312836E7)=-252.94532317000073; dx=2.8837849210742438E-6 evalInputDelta=-17.604569078229986
New Minimum: -270.5498922482307 > -277.290881378551
WOLF (strong): th(6515010.502656418)=-277.290881378551; dx=2.9382733370377917E-6 evalInputDelta=6.7409891303202585
New Minimum: -277.290881378551 > -283.5287509729602
END: th(2171670.167552139)=-283.5287509729602; dx=-2.5762404604627547E-6 evalInputDelta=12.978858724729491
Fitness changed from -270.5498922482307 to -283.5287509729602
Iteration 7 complete. Error: -283.5287509729602 Total: 9.3494; Orientation: 1.1564; Line Search: 6.6267
Adding measurement 772d6e49 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.331e+04, gradient 1.883e-03, dot -0.494; [dba007bb-4854-41dc-aa88-fd3012daafb1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -283.5287509729602, -176.77067127961092, -151.59686583474152, -151.59683189340936
LBFGS Accumulation History: 3 points
Removed measurement 772d6e49 to history. Total: 3
th(0)=-283.5287509729602;dx=-3.5348830890344063E-6
New Minimum: -283.5287509729602 > -295.00296820581445
END: th(4678721.544281682)=-295.00296820581445; dx=-1.3737842929958245E-6 evalInputDelta=11.474217232854244
Fitness changed from -283.5287509729602 to -295.00296820581445
Iteration 8 complete. Error: -295.00296820581445 Total: 6.0583; Orientation: 1.0602; Line Search: 3.4701
Adding measurement 45431793 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.373e+04, gradient 2.016e-03, dot -0.416; [dba007bb-4854-41dc-aa88-fd3012daafb1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -295.00296820581445, -176.77067127961092, -151.59686583474152, -151.59683189340936
LBFGS Accumulation History: 3 points
Removed measurement 45431793 to history. Total: 3
th(0)=-295.00296820581445;dx=-4.053075987458034E-6
New Minimum: -295.00296820581445 > -297.90316245367177
WOLF (strong): th(1.0080000000000002E7)=-297.90316245367177; dx=1.0944817483911574E-6 evalInputDelta=2.900194247857314
New Minimum: -297.90316245367177 > -302.8723677796219
WOLF (strong): th(5040000.000000001)=-302.8723677796219; dx=1.1542621950545745E-7 evalInputDelta=7.8693995738074705
END: th(1680000.0000000002)=-300.4604574089427; dx=-2.110371216745162E-6 evalInputDelta=5.457489203128262
Fitness changed from -295.00296820581445 to -302.8723677796219
Iteration 9 complete. Error: -302.8723677796219 Total: 9.3637; Orientation: 1.0252; Line Search: 6.7337
Adding measurement 1f29f135 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.979e+04, gradient 2.328e-03, dot -0.300; [dba007bb-4854-41dc-aa88-fd3012daafb1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -302.8723677796219, -176.77067127961092, -151.59686583474152, -151.59683189340936
LBFGS Accumulation History: 3 points
Removed measurement 1f29f135 to history. Total: 3
th(0)=-302.8723677796219;dx=-5.40873879002892E-6
New Minimum: -302.8723677796219 > -311.9439640388508
WOLF (strong): th(3619450.2792535652)=-311.9439640388508; dx=4.94184893034232E-7 evalInputDelta=9.071596259228897
END: th(1809725.1396267826)=-310.5328173453296; dx=-2.3620326983374383E-6 evalInputDelta=7.660449565707665
Fitness changed from -302.8723677796219 to -311.9439640388508
Iteration 10 complete. Error: -311.9439640388508 Total: 7.4783; Orientation: 1.0269; Line Search: 4.8854
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1e16d469-f921-4f1f-8fbd-3990ac503485.jpg)
Final threshold in iteration 11: -311.9439640388508 (> -Infinity) after 86.813s (< 5400.000s)

Returns

    -311.9439640388508