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 7.80 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: 152866191572800
Reset training subject: 152866320421100
Adding measurement 2dc93cb6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.793733420098794;dx=-0.008431088703160127
New Minimum: -2.793733420098794 > -2.8152851301826063
WOLFE (weak): th(2.154434690031884)=-2.8152851301826063; dx=-0.008225369974531853 evalInputDelta=0.021551710083812292
New Minimum: -2.8152851301826063 > -2.8369757483074074
WOLFE (weak): th(4.308869380063768)=-2.8369757483074074; dx=-0.008231666229612434 evalInputDelta=0.0432423282086134
New Minimum: -2.8369757483074074 > -2.9247653964910962
WOLFE (weak): th(12.926608140191302)=-2.9247653964910962; dx=-0.008512520735361203 evalInputDelta=0.13103197639230224
New Minimum: -2.9247653964910962 > -3.3191894067944165
WOLFE (weak): th(51.70643256076521)=-3.3191894067944165; dx=-0.008229870907895133 evalInputDelta=0.5254559866956225
New Minimum: -3.3191894067944165 > -5.4859149216394
WOLFE (weak): th(258.53216280382605)=-5.4859149216394; dx=-0.007796707922683169 evalInputDelta=2.6921815015406056
New Minimum: -5.4859149216394 > -20.98827361634423
END: th(1551.1929768229563)=-20.98827361634423; dx=-0.005732686619893599 evalInputDelta=18.194540196245438
Fitness changed from -2.793733420098794 to -20.98827361634423
Iteration 1 complete. Error: -20.98827361634423 Total: 1.1397; Orientation: 0.0014; Line Search: 0.7899
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/464f178d-962f-48ff-b766-6695fbdc6af1.jpg)
Adding measurement 5f643e8b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-20.98827361634423;dx=-0.06636714548917698
New Minimum: -20.98827361634423 > -83.22069796818877
END: th(3341.943960201201)=-83.22069796818877; dx=-0.011575359449439021 evalInputDelta=62.23242435184454
Fitness changed from -20.98827361634423 to -83.22069796818877
Iteration 2 complete. Error: -83.22069796818877 Total: 0.3437; Orientation: 0.0015; Line Search: 0.2238
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/203d4bdf-8340-4dbe-aad5-e431dd6818e8.jpg)
Adding measurement 6a8c7713 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-83.22069796818877;dx=-0.549073820812954
New Minimum: -83.22069796818877 > -221.48630565737017
END: th(7200.000000000001)=-221.48630565737017; dx=-0.0022102966487318925 evalInputDelta=138.2656076891814
Fitness changed from -83.22069796818877 to -221.48630565737017
Iteration 3 complete. Error: -221.48630565737017 Total: 0.3471; Orientation: 0.0014; Line Search: 0.2270
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b36ec36d-bb7c-4e66-b438-7e99e483e5f2.jpg)
Adding measurement 79736228 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.513e+04, gradient 2.636e-01, dot -0.016; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -221.48630565737017, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement 79736228 to history. Total: 3
th(0)=-221.48630565737017;dx=-0.06427136698191402
New Minimum: -221.48630565737017 > -646.790127282413
END: th(15511.929768229566)=-646.790127282413; dx=-0.005045559271516146 evalInputDelta=425.3038216250428
Fitness changed from -221.48630565737017 to -646.790127282413
Iteration 4 complete. Error: -646.790127282413 Total: 0.3712; Orientation: 0.0263; Line Search: 0.2271
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/33aad0f1-0e75-4fc3-9cd7-e24775f51f9f.jpg)
Adding measurement 3fa17dd0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.350e+05, gradient 2.654e-01, dot -0.126; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -646.790127282413, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement 3fa17dd0 to history. Total: 3
th(0)=-646.790127282413;dx=-0.06783857287666996
New Minimum: -646.790127282413 > -1225.050560181089
WOLF (strong): th(33419.43960201202)=-1225.050560181089; dx=0.007669008977696661 evalInputDelta=578.260432898676
New Minimum: -1225.050560181089 > -1609.954269536871
END: th(16709.71980100601)=-1609.954269536871; dx=-0.005719761394197449 evalInputDelta=963.1641422544579
Fitness changed from -646.790127282413 to -1609.954269536871
Iteration 5 complete. Error: -1609.954269536871 Total: 0.4892; Orientation: 0.0277; Line Search: 0.3415
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e09378de-6a66-40a2-b2ae-c861f26d1c05.jpg)
Adding measurement bcbff4c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.171e+05, gradient 3.728e-01, dot -0.074; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1609.954269536871, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement bcbff4c to history. Total: 3
th(0)=-1609.954269536871;dx=-0.13565356477912488
Armijo: th(36000.000000000015)=-987.6633725617246; dx=0.014474691250212912 evalInputDelta=-622.2908969751463
New Minimum: -1609.954269536871 > -1958.6489603805987
WOLF (strong): th(18000.000000000007)=-1958.6489603805987; dx=0.013104005978012784 evalInputDelta=348.6946908437278
New Minimum: -1958.6489603805987 > -2316.282582069813
END: th(6000.000000000003)=-2316.282582069813; dx=-0.028685859499203263 evalInputDelta=706.3283125329422
Fitness changed from -1609.954269536871 to -2316.282582069813
Iteration 6 complete. Error: -2316.282582069813 Total: 0.6446; Orientation: 0.0308; Line Search: 0.4683
Adding measurement 2ec7a097 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.532e+04, gradient 3.328e-01, dot -0.052; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2316.282582069813, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement 2ec7a097 to history. Total: 3
th(0)=-2316.282582069813;dx=-0.10777118535825084
New Minimum: -2316.282582069813 > -2516.1066153881475
WOLF (strong): th(12926.608140191309)=-2516.1066153881475; dx=0.0050631030853832155 evalInputDelta=199.8240333183344
New Minimum: -2516.1066153881475 > -2684.4180933677226
END: th(6463.304070095654)=-2684.4180933677226; dx=-0.0215187634226298 evalInputDelta=368.1355112979095
Fitness changed from -2316.282582069813 to -2684.4180933677226
Iteration 7 complete. Error: -2684.4180933677226 Total: 0.4919; Orientation: 0.0281; Line Search: 0.3502
Adding measurement 50774aea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.758e+04, gradient 3.500e-01, dot -0.031; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2684.4180933677226, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement 50774aea to history. Total: 3
th(0)=-2684.4180933677226;dx=-0.11838826492768503
Armijo: th(13924.766500838345)=-2586.8663475332464; dx=0.012073796309294196 evalInputDelta=-97.55174583447615
New Minimum: -2684.4180933677226 > -2804.7582783548387
WOLF (strong): th(6962.383250419172)=-2804.7582783548387; dx=4.302290510961942E-4 evalInputDelta=120.34018498711612
New Minimum: -2804.7582783548387 > -2850.3655028785342
END: th(2320.794416806391)=-2850.3655028785342; dx=-0.041834060652700025 evalInputDelta=165.94740951081167
Fitness changed from -2684.4180933677226 to -2850.3655028785342
Iteration 8 complete. Error: -2850.3655028785342 Total: 0.5850; Orientation: 0.0271; Line Search: 0.4482
Adding measurement 2287b9f6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.414e+04, gradient 3.146e-01, dot -0.038; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2850.3655028785342, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement 2287b9f6 to history. Total: 3
th(0)=-2850.3655028785342;dx=-0.09563087056166397
New Minimum: -2850.3655028785342 > -3065.471578729772
END: th(5000.000000000004)=-3065.471578729772; dx=-0.01638067166271916 evalInputDelta=215.10607585123762
Fitness changed from -2850.3655028785342 to -3065.471578729772
Iteration 9 complete. Error: -3065.471578729772 Total: 0.3669; Orientation: 0.0269; Line Search: 0.2282
Adding measurement 3d2e1885 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.094e+04, gradient 4.557e-01, dot -0.032; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3065.471578729772, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement 3d2e1885 to history. Total: 3
th(0)=-3065.471578729772;dx=-0.20370214073206722
Armijo: th(10772.173450159427)=-2317.136810807683; dx=0.011685620727909959 evalInputDelta=-748.3347679220888
Armijo: th(5386.086725079714)=-2650.362145066217; dx=0.027994222196237543 evalInputDelta=-415.1094336635547
New Minimum: -3065.471578729772 > -3152.4690323617774
WOLF (strong): th(1795.3622416932378)=-3152.4690323617774; dx=0.0034415091544203486 evalInputDelta=86.99745363200554
END: th(448.84056042330946)=-3140.2802422713803; dx=-0.11677350956296795 evalInputDelta=74.80866354160844
Fitness changed from -3065.471578729772 to -3152.4690323617774
Iteration 10 complete. Error: -3152.4690323617774 Total: 0.7188; Orientation: 0.0281; Line Search: 0.5734
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/cc1f282b-098b-4274-a04a-a9e192a6cacf.jpg)
Adding measurement 5fc1a380 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.247e+04, gradient 3.526e-01, dot -0.053; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3152.4690323617774, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement 5fc1a380 to history. Total: 3
th(0)=-3152.4690323617774;dx=-0.12086859724417767
New Minimum: -3152.4690323617774 > -3268.657063688389
END: th(966.9976736693297)=-3268.657063688389; dx=-0.05232649631805472 evalInputDelta=116.18803132661151
Fitness changed from -3152.4690323617774 to -3268.657063688389
Iteration 11 complete. Error: -3268.657063688389 Total: 0.3869; Orientation: 0.0278; Line Search: 0.2332
Adding measurement 2277be20 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.256e+04, gradient 2.974e-01, dot -0.061; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3268.657063688389, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement 2277be20 to history. Total: 3
th(0)=-3268.657063688389;dx=-0.08498890632508467
New Minimum: -3268.657063688389 > -3364.4159968707795
END: th(2083.3333333333353)=-3364.4159968707795; dx=-0.04352018786222339 evalInputDelta=95.75893318239059
Fitness changed from -3268.657063688389 to -3364.4159968707795
Iteration 12 complete. Error: -3364.4159968707795 Total: 0.3694; Orientation: 0.0265; Line Search: 0.2324
Adding measurement cf78747 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.751e+04, gradient 2.907e-01, dot -0.057; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3364.4159968707795, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement cf78747 to history. Total: 3
th(0)=-3364.4159968707795;dx=-0.08097547938140032
New Minimum: -3364.4159968707795 > -3520.498828291241
END: th(4488.405604233096)=-3520.498828291241; dx=-0.03280566909633885 evalInputDelta=156.0828314204614
Fitness changed from -3364.4159968707795 to -3520.498828291241
Iteration 13 complete. Error: -3520.498828291241 Total: 0.3977; Orientation: 0.0310; Line Search: 0.2534
Adding measurement 2ec73a0e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.185e+05, gradient 3.097e-01, dot -0.071; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3520.498828291241, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement 2ec73a0e to history. Total: 3
th(0)=-3520.498828291241;dx=-0.09255564844692776
New Minimum: -3520.498828291241 > -3532.0864938446794
END: th(9669.9767366933)=-3532.0864938446794; dx=-0.001431668988968794 evalInputDelta=11.587665553438455
Fitness changed from -3520.498828291241 to -3532.0864938446794
Iteration 14 complete. Error: -3532.0864938446794 Total: 0.3899; Orientation: 0.0285; Line Search: 0.2480
Adding measurement 337ad373 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.281e+05, gradient 4.820e-01, dot -0.046; [e34bffff-4009-46f0-8a89-9fe45e3c8d33 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3532.0864938446794, -83.22069796818877, -20.98827361634423, -2.793733420098794
LBFGS Accumulation History: 3 points
Removed measurement 337ad373 to history. Total: 3
th(0)=-3532.0864938446794;dx=-0.22789729549408738
Armijo: th(20833.333333333354)=-2019.1494496445775; dx=0.024357442672553693 evalInputDelta=-1512.9370442001018
Armijo: th(10416.666666666677)=-2691.8704463625286; dx=0.028833383078937916 evalInputDelta=-840.2160474821508
New Minimum: -3532.0864938446794 > -3669.214766131849
WOLF (strong): th(3472.222222222226)=-3669.214766131849; dx=0.051128104141433234 evalInputDelta=137.1282722871697
New Minimum: -3669.214766131849 > -3716.9869518199816
END: th(868.0555555555565)=-3716.9869518199816; dx=-0.10813009041965413 evalInputDelta=184.9004579753023
Fitness changed from -3532.0864938446794 to -3716.9869518199816
Iteration 15 complete. Error: -3716.9869518199816 Total: 0.7472; Orientation: 0.0286; Line Search: 0.6053
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/0f997b15-ddc5-48a4-89dc-19045cb23560.jpg)
Final threshold in iteration 16: -3716.9869518199816 (> -Infinity) after 7.800s (< 5400.000s)

Returns

    -3716.9869518199816