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 8.24 seconds (0.000 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: 150642645424900
Reset training subject: 150642775814600
Adding measurement 1841c022 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-10.768290373856177;dx=-0.4054133729719467
New Minimum: -10.768290373856177 > -11.573115903625522
WOLFE (weak): th(2.154434690031884)=-11.573115903625522; dx=-0.40521131552725975 evalInputDelta=0.8048255297693458
New Minimum: -11.573115903625522 > -12.36495656599352
WOLFE (weak): th(4.308869380063768)=-12.36495656599352; dx=-0.4058923640453254 evalInputDelta=1.5966661921373433
New Minimum: -12.36495656599352 > -15.457191665044522
END: th(12.926608140191302)=-15.457191665044522; dx=-0.35594878234076704 evalInputDelta=4.688901291188346
Fitness changed from -10.768290373856177 to -15.457191665044522
Iteration 1 complete. Error: -15.457191665044522 Total: 0.8101; Orientation: 0.0016; Line Search: 0.4621
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3a9b91a9-e8ef-48ff-9815-17142f1b25fe.jpg)
Adding measurement 179aafbb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-15.457191665044522;dx=-0.4027477571133721
New Minimum: -15.457191665044522 > -24.841020388569238
END: th(27.849533001676672)=-24.841020388569238; dx=-0.32484037093724816 evalInputDelta=9.383828723524715
Fitness changed from -15.457191665044522 to -24.841020388569238
Iteration 2 complete. Error: -24.841020388569238 Total: 0.3506; Orientation: 0.0015; Line Search: 0.2261
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e5a8de19-6c3f-4ebe-9648-be35bd97fbde.jpg)
Adding measurement 4b41404b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-24.841020388569238;dx=-0.2923025605916691
New Minimum: -24.841020388569238 > -45.100966375109415
WOLFE (weak): th(60.0)=-45.100966375109415; dx=-0.28565818198404935 evalInputDelta=20.259945986540178
New Minimum: -45.100966375109415 > -65.10498582817986
END: th(120.0)=-65.10498582817986; dx=-0.2115708223089396 evalInputDelta=40.26396543961063
Fitness changed from -24.841020388569238 to -65.10498582817986
Iteration 3 complete. Error: -65.10498582817986 Total: 0.4575; Orientation: 0.0013; Line Search: 0.3394
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/9221570b-fb6c-459a-a12b-a58cbc64555a.jpg)
Adding measurement 556b77e1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.363e+02, gradient 6.558e-01, dot -0.543; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.10498582817986, -24.841020388569238, -15.457191665044522, -10.768290373856177
LBFGS Accumulation History: 3 points
Removed measurement 556b77e1 to history. Total: 3
th(0)=-65.10498582817986;dx=-0.41899915974190916
New Minimum: -65.10498582817986 > -164.9790173684975
END: th(258.53216280382605)=-164.9790173684975; dx=-0.1888814370598244 evalInputDelta=99.87403154031763
Fitness changed from -65.10498582817986 to -164.9790173684975
Iteration 4 complete. Error: -164.9790173684975 Total: 0.3756; Orientation: 0.0267; Line Search: 0.2276
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d650daa4-ac99-49a7-8c57-792197196e4e.jpg)
Adding measurement 2b702005 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.410e+02, gradient 7.628e-01, dot -0.269; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -164.9790173684975, -24.841020388569238, -15.457191665044522, -10.768290373856177
LBFGS Accumulation History: 3 points
Removed measurement 2b702005 to history. Total: 3
th(0)=-164.9790173684975;dx=-0.5606545022703818
New Minimum: -164.9790173684975 > -307.69996039161265
END: th(556.9906600335335)=-307.69996039161265; dx=-0.08641786328845942 evalInputDelta=142.72094302311515
Fitness changed from -164.9790173684975 to -307.69996039161265
Iteration 5 complete. Error: -307.69996039161265 Total: 0.3720; Orientation: 0.0285; Line Search: 0.2257
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/720987f7-34b6-4657-a4ed-c3c34fa03841.jpg)
Adding measurement 313d79e3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.379e+03, gradient 6.114e-01, dot -0.207; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -307.69996039161265, -24.841020388569238, -15.457191665044522, -10.768290373856177
LBFGS Accumulation History: 3 points
Removed measurement 313d79e3 to history. Total: 3
th(0)=-307.69996039161265;dx=-0.3653107552291342
New Minimum: -307.69996039161265 > -526.0687336270803
END: th(1200.0)=-526.0687336270803; dx=-0.04186908948748119 evalInputDelta=218.36877323546764
Fitness changed from -307.69996039161265 to -526.0687336270803
Iteration 6 complete. Error: -526.0687336270803 Total: 0.3691; Orientation: 0.0268; Line Search: 0.2231
Adding measurement 616d0726 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.997e+04, gradient 7.204e-01, dot -0.197; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -526.0687336270803, -24.841020388569238, -15.457191665044522, -10.768290373856177
LBFGS Accumulation History: 3 points
Removed measurement 616d0726 to history. Total: 3
th(0)=-526.0687336270803;dx=-0.5087700655220968
New Minimum: -526.0687336270803 > -777.6200470023905
END: th(2585.3216280382608)=-777.6200470023905; dx=-0.010385856543006994 evalInputDelta=251.5513133753102
Fitness changed from -526.0687336270803 to -777.6200470023905
Iteration 7 complete. Error: -777.6200470023905 Total: 0.3587; Orientation: 0.0274; Line Search: 0.2255
Adding measurement 261dd844 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.212e+04, gradient 6.455e-01, dot 0.190; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-777.6200470023905;dx=-1511.8425522150187
New Minimum: -777.6200470023905 > -825.8505085667745
WOLF (strong): th(5569.9066003353355)=-825.8505085667745; dx=0.04045002233301198 evalInputDelta=48.23046156438397
New Minimum: -825.8505085667745 > -826.2182671667337
WOLF (strong): th(2784.9533001676677)=-826.2182671667337; dx=0.08364985899123446 evalInputDelta=48.59822016434316
WOLF (strong): th(928.3177667225559)=-826.0056370873023; dx=0.2414374348722683 evalInputDelta=48.38559008491177
WOLF (strong): th(232.07944168063898)=-825.1931970756909; dx=0.9549070973405283 evalInputDelta=47.57315007330044
New Minimum: -826.2182671667337 > -829.5165760851316
WOLF (strong): th(46.41588833612779)=-829.5165760851316; dx=4.943200154914689 evalInputDelta=51.896529082741154
WOLF (strong): th(7.735981389354632)=-820.8920833459171; dx=25.311292103887467 evalInputDelta=43.272036343526565
New Minimum: -829.5165760851316 > -895.6363659432326
WOLF (strong): th(1.105140198479233)=-895.6363659432326; dx=58.65804258558956 evalInputDelta=118.0163189408421
New Minimum: -895.6363659432326 > -929.7153126091879
END: th(0.13814252480990413)=-929.7153126091879; dx=-758.7086867400601 evalInputDelta=152.0952656067974
Fitness changed from -777.6200470023905 to -929.7153126091879
Iteration 8 complete. Error: -929.7153126091879 Total: 1.1510; Orientation: 0.0263; Line Search: 1.0162
Adding measurement 584ca2c9 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 6.719e+04, gradient 5.439e-01, dot -0.151; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -929.7153126091879, -777.6200470023905, -24.841020388569238, -15.457191665044522, -10.768290373856177
Rejected: LBFGS Orientation magnitude: 6.992e+04, gradient 5.439e-01, dot -0.151; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -929.7153126091879, -777.6200470023905, -24.841020388569238, -15.457191665044522
LBFGS Accumulation History: 3 points
Removed measurement 584ca2c9 to history. Total: 4
Removed measurement 261dd844 to history. Total: 3
th(0)=-929.7153126091879;dx=-0.29272734057524397
New Minimum: -929.7153126091879 > -929.8386956886662
WOLFE (weak): th(0.2976190476190476)=-929.8386956886662; dx=-0.2771297025227064 evalInputDelta=0.12338307947834437
New Minimum: -929.8386956886662 > -929.961961587677
WOLFE (weak): th(0.5952380952380952)=-929.961961587677; dx=-0.2754561821624326 evalInputDelta=0.2466489784891337
New Minimum: -929.961961587677 > -930.4547947106297
WOLFE (weak): th(1.7857142857142856)=-930.4547947106297; dx=-0.2778099182579846 evalInputDelta=0.7394821014418085
New Minimum: -930.4547947106297 > -932.6710298921051
WOLFE (weak): th(7.142857142857142)=-932.6710298921051; dx=-0.2751709383516854 evalInputDelta=2.9557172829172487
New Minimum: -932.6710298921051 > -944.3650313835218
WOLFE (weak): th(35.71428571428571)=-944.3650313835218; dx=-0.27405343330161536 evalInputDelta=14.649718774333905
New Minimum: -944.3650313835218 > -1015.7644596558791
END: th(214.28571428571425)=-1015.7644596558791; dx=-0.25843417014888964 evalInputDelta=86.04914704669125
Fitness changed from -929.7153126091879 to -1015.7644596558791
Iteration 9 complete. Error: -1015.7644596558791 Total: 0.9541; Orientation: 0.0593; Line Search: 0.7826
Adding measurement 4e1694c6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.165e+03, gradient 5.253e-01, dot -0.166; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1015.7644596558791, -24.841020388569238, -15.457191665044522, -10.768290373856177
LBFGS Accumulation History: 3 points
Removed measurement 4e1694c6 to history. Total: 3
th(0)=-1015.7644596558791;dx=-0.27363708987625046
New Minimum: -1015.7644596558791 > -1184.9847045426368
END: th(461.6645764354036)=-1184.9847045426368; dx=-0.23163730500051682 evalInputDelta=169.22024488675765
Fitness changed from -1015.7644596558791 to -1184.9847045426368
Iteration 10 complete. Error: -1184.9847045426368 Total: 0.3668; Orientation: 0.0273; Line Search: 0.2263
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/94495011-3087-48cc-85f5-ed3435526f3a.jpg)
Adding measurement 792f8479 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.273e+04, gradient 5.073e-01, dot -0.225; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1184.9847045426368, -24.841020388569238, -15.457191665044522, -10.768290373856177
LBFGS Accumulation History: 3 points
Removed measurement 792f8479 to history. Total: 3
th(0)=-1184.9847045426368;dx=-0.25504997645102967
New Minimum: -1184.9847045426368 > -1480.4094028342295
END: th(994.6261786313097)=-1480.4094028342295; dx=-0.16707293818591917 evalInputDelta=295.4246982915927
Fitness changed from -1184.9847045426368 to -1480.4094028342295
Iteration 11 complete. Error: -1480.4094028342295 Total: 0.3821; Orientation: 0.0280; Line Search: 0.2296
Adding measurement 18ea52f4 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.465e+04, gradient 4.653e-01, dot 0.336; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
th(0)=-1480.4094028342295;dx=-3864.763489567196
Armijo: th(2142.8571428571427)=-1213.5613396116407; dx=0.23996185779389942 evalInputDelta=-266.84806322258873
Armijo: th(1071.4285714285713)=-1213.0527606002963; dx=0.47937269158835516 evalInputDelta=-267.35664223393314
Armijo: th(357.1428571428571)=-1212.8563393906138; dx=1.4222731923099516 evalInputDelta=-267.55306344361566
Armijo: th(89.28571428571428)=-1210.3079153669946; dx=5.685746870437841 evalInputDelta=-270.10148746723485
Armijo: th(17.857142857142854)=-1231.0512783795807; dx=28.7135596331961 evalInputDelta=-249.35812445464876
Armijo: th(2.976190476190476)=-1332.6876040543034; dx=161.31757402089522 evalInputDelta=-147.72179877992608
New Minimum: -1480.4094028342295 > -1648.219038841622
WOLF (strong): th(0.42517006802721086)=-1648.219038841622; dx=182.0348678409078 evalInputDelta=167.80963600739256
END: th(0.05314625850340136)=-1619.5671489629567; dx=-1782.271444155681 evalInputDelta=139.15774612872724
Fitness changed from -1480.4094028342295 to -1648.219038841622
Iteration 12 complete. Error: -1648.219038841622 Total: 1.1585; Orientation: 0.0269; Line Search: 1.0203
Adding measurement 9d872b6 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 2.312e+04, gradient 4.176e-01, dot -0.107; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1648.219038841622, -1480.4094028342295, -24.841020388569238, -15.457191665044522, -10.768290373856177
Rejected: LBFGS Orientation magnitude: 2.467e+04, gradient 4.176e-01, dot -0.116; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1648.219038841622, -1480.4094028342295, -24.841020388569238, -15.457191665044522
LBFGS Accumulation History: 3 points
Removed measurement 9d872b6 to history. Total: 4
Removed measurement 18ea52f4 to history. Total: 3
th(0)=-1648.219038841622;dx=-0.17210943841493545
New Minimum: -1648.219038841622 > -1648.2383777839902
END: th(0.11450014296512988)=-1648.2383777839902; dx=-0.10774643572458073 evalInputDelta=0.01933894236822198
Fitness changed from -1648.219038841622 to -1648.2383777839902
Iteration 13 complete. Error: -1648.2383777839902 Total: 0.4025; Orientation: 0.0609; Line Search: 0.2319
Adding measurement 301a62a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.298e+03, gradient 4.184e-01, dot -0.127; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1648.2383777839902, -24.841020388569238, -15.457191665044522, -10.768290373856177
LBFGS Accumulation History: 3 points
Removed measurement 301a62a1 to history. Total: 3
th(0)=-1648.2383777839902;dx=-0.17322502983093802
New Minimum: -1648.2383777839902 > -1648.2803159657037
END: th(0.24668308001768596)=-1648.2803159657037; dx=-0.10749822679655972 evalInputDelta=0.0419381817134763
Fitness changed from -1648.2383777839902 to -1648.2803159657037
Iteration 14 complete. Error: -1648.2803159657037 Total: 0.3608; Orientation: 0.0264; Line Search: 0.2255
Adding measurement 5544ba33 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.970e+03, gradient 4.194e-01, dot -0.124; [821c4fb5-b280-43a7-8ec9-56cf0fa518ad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1648.2803159657037, -24.841020388569238, -15.457191665044522, -10.768290373856177
LBFGS Accumulation History: 3 points
Removed measurement 5544ba33 to history. Total: 3
th(0)=-1648.2803159657037;dx=-0.1722427830723165
New Minimum: -1648.2803159657037 > -1648.3712415593764
END: th(0.5314625850340137)=-1648.3712415593764; dx=-0.10710821803354259 evalInputDelta=0.09092559367263675
Fitness changed from -1648.2803159657037 to -1648.3712415593764
Iteration 15 complete. Error: -1648.3712415593764 Total: 0.3619; Orientation: 0.0279; Line Search: 0.2264
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/bf4132c5-e28c-44f1-97ba-86ed024991db.jpg)
Final threshold in iteration 16: -1648.3712415593764 (> -Infinity) after 8.243s (< 5400.000s)

Returns

    -1648.3712415593764