Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

BasicOptimizer.scala:89 executed in 60.94 seconds (2.663 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: 211745989691400
Reset training subject: 211747334525000
Adding measurement 5e5ddfbc to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=113.79311654429759;dx=-1.8097203389852643E-4
New Minimum: 113.79311654429759 > 113.79275069244355
WOLFE (weak): th(2.154434690031884)=113.79275069244355; dx=-1.811025766248447E-4 evalInputDelta=3.658518540419209E-4
New Minimum: 113.79275069244355 > 113.79239684859459
WOLFE (weak): th(4.308869380063768)=113.79239684859459; dx=-1.8021656111564345E-4 evalInputDelta=7.196957029975692E-4
New Minimum: 113.79239684859459 > 113.79094516923332
WOLFE (weak): th(12.926608140191302)=113.79094516923332; dx=-1.799647087929218E-4 evalInputDelta=0.00217137506426468
New Minimum: 113.79094516923332 > 113.78445683525901
WOLFE (weak): th(51.70643256076521)=113.78445683525901; dx=-1.803359497294798E-4 evalInputDelta=0.008659709038582264
New Minimum: 113.78445683525901 > 113.74985525496244
WOLFE (weak): th(258.53216280382605)=113.74985525496244; dx=-1.8045632593972693E-4 evalInputDelta=0.043261289335148945
New Minimum: 113.74985525496244 > 113.53412393012471
WOLFE (weak): th(1551.1929768229563)=113.53412393012471; dx=-1.803049597495588E-4 evalInputDelta=0.25899261417288244
New Minimum: 113.53412393012471 > 111.99837978345283
WOLFE (weak): th(10858.350837760694)=111.99837978345283; dx=-1.7707855120601792E-4 evalInputDelta=1.7947367608447564
New Minimum: 111.99837978345283 > 101.4999757008852
END: th(86866.80670208555)=101.4999757008852; dx=-1.3538357969139752E-4 evalInputDelta=12.293140843412388
Fitness changed from 113.79311654429759 to 101.4999757008852
Iteration 1 complete. Error: 101.4999757008852 Total: 11.1076; Orientation: 0.0352; Line Search: 7.8955
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3378b1ef-91d5-4d20-9ce0-5d850cbc4f53.jpg)
Adding measurement 79d63a4f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=101.4999757008852;dx=-1.6687030248117168E-4
New Minimum: 101.4999757008852 > 86.36773663127481
END: th(187148.86177126726)=86.36773663127481; dx=-6.41683725733036E-5 evalInputDelta=15.132239069610392
Fitness changed from 101.4999757008852 to 86.36773663127481
Iteration 2 complete. Error: 86.36773663127481 Total: 2.4490; Orientation: 0.0128; Line Search: 1.6117
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1d158e75-8333-4a75-bc8f-af7a2a404189.jpg)
Adding measurement 165d1d54 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=86.36773663127481;dx=-1.48248598419699E-4
Armijo: th(403200.00000000006)=89.87352291912292; dx=1.3101424502282515E-5 evalInputDelta=-3.5057862878481103
New Minimum: 86.36773663127481 > 78.0935821517109
END: th(201600.00000000003)=78.0935821517109; dx=-3.178806570552482E-5 evalInputDelta=8.274154479563904
Fitness changed from 86.36773663127481 to 78.0935821517109
Iteration 3 complete. Error: 78.0935821517109 Total: 3.5077; Orientation: 0.0123; Line Search: 2.3423
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ba0fb042-b376-4559-ae84-b6e48d7b32c0.jpg)
Adding measurement 31e7afde to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.347e+03, gradient 1.158e-02, dot -0.357; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 78.0935821517109, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement 31e7afde to history. Total: 3
th(0)=78.0935821517109;dx=-1.3341696769942252E-4
Armijo: th(434334.03351042786)=87.47532676300536; dx=2.3615923949211695E-5 evalInputDelta=-9.381744611294451
New Minimum: 78.0935821517109 > 72.24764106769871
END: th(217167.01675521393)=72.24764106769871; dx=-1.4155677726153984E-5 evalInputDelta=5.845941084012196
Fitness changed from 78.0935821517109 to 72.24764106769871
Iteration 4 complete. Error: 72.24764106769871 Total: 3.8939; Orientation: 0.3603; Line Search: 2.7264
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/23329b10-af38-4730-a234-66b23411b0f6.jpg)
Adding measurement 31082efa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.404e+03, gradient 1.133e-02, dot -0.293; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 72.24764106769871, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement 31082efa to history. Total: 3
th(0)=72.24764106769871;dx=-1.2758874103833702E-4
Armijo: th(467872.15442816826)=89.96575983879998; dx=3.848637463505098E-5 evalInputDelta=-17.718118771101274
New Minimum: 72.24764106769871 > 69.42336592484996
WOLF (strong): th(233936.07721408413)=69.42336592484996; dx=1.6285941842303288E-6 evalInputDelta=2.824275142848748
New Minimum: 69.42336592484996 > 66.1539709650002
END: th(77978.69240469471)=66.1539709650002; dx=-7.194669256062974E-5 evalInputDelta=6.0936701026985105
Fitness changed from 72.24764106769871 to 66.1539709650002
Iteration 5 complete. Error: 66.1539709650002 Total: 4.5037; Orientation: 0.3147; Line Search: 3.3870
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b9657429-fc98-4ec5-9924-462c972356e4.jpg)
Adding measurement e171f93 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.798e+03, gradient 9.557e-03, dot -0.345; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 66.1539709650002, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement e171f93 to history. Total: 3
th(0)=66.1539709650002;dx=-9.055852535759641E-5
New Minimum: 66.1539709650002 > 62.525438835494676
END: th(168000.00000000006)=62.525438835494676; dx=-2.5566622270611587E-5 evalInputDelta=3.6285321295055226
Fitness changed from 66.1539709650002 to 62.525438835494676
Iteration 6 complete. Error: 62.525438835494676 Total: 2.5654; Orientation: 0.2916; Line Search: 1.5545
Adding measurement 41bbb219 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.996e+03, gradient 1.021e-02, dot -0.309; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 62.525438835494676, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement 41bbb219 to history. Total: 3
th(0)=62.525438835494676;dx=-1.0310811474663489E-4
Armijo: th(361945.0279253566)=73.4989669277498; dx=2.055570074170998E-5 evalInputDelta=-10.97352809225513
New Minimum: 62.525438835494676 > 61.729236265120605
END: th(180972.5139626783)=61.729236265120605; dx=-5.7404212955975334E-6 evalInputDelta=0.7962025703740707
Fitness changed from 62.525438835494676 to 61.729236265120605
Iteration 7 complete. Error: 61.729236265120605 Total: 3.8607; Orientation: 0.3177; Line Search: 2.7546
Adding measurement 359ea595 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.285e+03, gradient 1.040e-02, dot -0.272; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 61.729236265120605, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement 359ea595 to history. Total: 3
th(0)=61.729236265120605;dx=-1.0716316902669407E-4
Armijo: th(389893.4620234736)=76.49607658436554; dx=3.3317663899652125E-5 evalInputDelta=-14.766840319244935
New Minimum: 61.729236265120605 > 60.60579005577107
WOLF (strong): th(194946.7310117368)=60.60579005577107; dx=6.247958499019058E-6 evalInputDelta=1.123446209349538
New Minimum: 60.60579005577107 > 57.490016828821325
END: th(64982.24367057893)=57.490016828821325; dx=-6.043018818032478E-5 evalInputDelta=4.23921943629928
Fitness changed from 61.729236265120605 to 57.490016828821325
Iteration 8 complete. Error: 57.490016828821325 Total: 4.2545; Orientation: 0.2990; Line Search: 3.1698
Adding measurement 5e198c40 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.044e+03, gradient 8.607e-03, dot -0.315; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 57.490016828821325, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement 5e198c40 to history. Total: 3
th(0)=57.490016828821325;dx=-7.3482518863359E-5
New Minimum: 57.490016828821325 > 55.45129594186403
END: th(140000.00000000006)=55.45129594186403; dx=-2.162796168874459E-5 evalInputDelta=2.038720886957293
Fitness changed from 57.490016828821325 to 55.45129594186403
Iteration 9 complete. Error: 55.45129594186403 Total: 3.3286; Orientation: 0.3373; Line Search: 2.2090
Adding measurement 563392e5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.276e+03, gradient 9.019e-03, dot -0.295; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 55.45129594186403, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement 563392e5 to history. Total: 3
th(0)=55.45129594186403;dx=-8.074603036051212E-5
Armijo: th(301620.8566044639)=63.56288278445295; dx=1.4950450096766394E-5 evalInputDelta=-8.11158684258892
New Minimum: 55.45129594186403 > 55.05470486641962
END: th(150810.42830223194)=55.05470486641962; dx=-5.237355256366604E-6 evalInputDelta=0.3965910754444124
Fitness changed from 55.45129594186403 to 55.05470486641962
Iteration 10 complete. Error: 55.05470486641962 Total: 3.3466; Orientation: 0.2989; Line Search: 2.2788
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/44f5dbce-364d-475a-9e4a-e3f7f37e4b5b.jpg)
Adding measurement 43201f84 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.773e+03, gradient 9.662e-03, dot -0.267; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 55.05470486641962, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement 43201f84 to history. Total: 3
th(0)=55.05470486641962;dx=-9.190761141197865E-5
Armijo: th(324911.2183528947)=67.8132247980223; dx=2.9394324714701813E-5 evalInputDelta=-12.758519931602684
Armijo: th(162455.60917644735)=55.60610894649959; dx=8.617781390736111E-6 evalInputDelta=-0.5514040800799691
New Minimum: 55.05470486641962 > 52.30320704610166
END: th(54151.86972548245)=52.30320704610166; dx=-4.8106963555979244E-5 evalInputDelta=2.751497820317958
Fitness changed from 55.05470486641962 to 52.30320704610166
Iteration 11 complete. Error: 52.30320704610166 Total: 4.4404; Orientation: 0.3085; Line Search: 3.4006
Adding measurement 2fa4888c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.238e+03, gradient 7.677e-03, dot -0.316; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 52.30320704610166, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement 2fa4888c to history. Total: 3
th(0)=52.30320704610166;dx=-5.825137971159725E-5
New Minimum: 52.30320704610166 > 51.15625589617301
END: th(116666.66666666674)=51.15625589617301; dx=-2.055411488747225E-5 evalInputDelta=1.146951149928654
Fitness changed from 52.30320704610166 to 51.15625589617301
Iteration 12 complete. Error: 51.15625589617301 Total: 2.5536; Orientation: 0.3307; Line Search: 1.5468
Adding measurement 659e003e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.526e+03, gradient 8.177e-03, dot -0.297; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 51.15625589617301, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement 659e003e to history. Total: 3
th(0)=51.15625589617301;dx=-6.557834021780052E-5
Armijo: th(251350.71383705328)=56.44351371381674; dx=1.0032693142829268E-5 evalInputDelta=-5.287257817643734
New Minimum: 51.15625589617301 > 50.92361017612579
END: th(125675.35691852664)=50.92361017612579; dx=-7.881210759242674E-6 evalInputDelta=0.2326457200472163
Fitness changed from 51.15625589617301 to 50.92361017612579
Iteration 13 complete. Error: 50.92361017612579 Total: 3.7896; Orientation: 0.3082; Line Search: 2.8015
Adding measurement 3d0ce151 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.964e+03, gradient 8.599e-03, dot -0.272; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 50.92361017612579, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement 3d0ce151 to history. Total: 3
th(0)=50.92361017612579;dx=-7.313237094750018E-5
Armijo: th(270759.3486274123)=59.16091984086858; dx=1.9777648212602962E-5 evalInputDelta=-8.237309664742789
Armijo: th(135379.67431370614)=50.97456844156379; dx=2.6132163760304635E-6 evalInputDelta=-0.05095826543799831
New Minimum: 50.92361017612579 > 49.199250371962584
END: th(45126.558104568714)=49.199250371962584; dx=-4.089723437383217E-5 evalInputDelta=1.7243598041632069
Fitness changed from 50.92361017612579 to 49.199250371962584
Iteration 14 complete. Error: 49.199250371962584 Total: 4.2960; Orientation: 0.2981; Line Search: 3.2286
Adding measurement 4d50f682 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.222e+03, gradient 7.019e-03, dot -0.316; [3d531e2d-c209-408e-9236-f927e1aa0183 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 49.199250371962584, 86.36773663127481, 101.4999757008852, 113.79311654429759
LBFGS Accumulation History: 3 points
Removed measurement 4d50f682 to history. Total: 3
th(0)=49.199250371962584;dx=-4.865318186525772E-5
New Minimum: 49.199250371962584 > 48.332016286298916
END: th(97222.22222222229)=48.332016286298916; dx=-2.0408430787575196E-5 evalInputDelta=0.867234085663668
Fitness changed from 49.199250371962584 to 48.332016286298916
Iteration 15 complete. Error: 48.332016286298916 Total: 3.0039; Orientation: 0.3087; Line Search: 1.9126
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/e9783f18-1002-4faa-85ee-c5f10ab9bd8f.jpg)
Final threshold in iteration 16: 48.332016286298916 (> -Infinity) after 60.923s (< 5400.000s)

Returns

    48.332016286298916