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 85.50 seconds (1.482 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: 138126884410600
Reset training subject: 138127822896700
Adding measurement 4944b4f4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.0927971016610867;dx=-2.466372568919703E-4
New Minimum: -2.0927971016610867 > -2.093341201233706
WOLFE (weak): th(2.154434690031884)=-2.093341201233706; dx=-2.466639053263505E-4 evalInputDelta=5.440995726191389E-4
New Minimum: -2.093341201233706 > -2.0938857773190303
WOLFE (weak): th(4.308869380063768)=-2.0938857773190303; dx=-2.4833006801902466E-4 evalInputDelta=0.001088675657943572
New Minimum: -2.0938857773190303 > -2.0960636269786512
WOLFE (weak): th(12.926608140191302)=-2.0960636269786512; dx=-2.486969038151665E-4 evalInputDelta=0.0032665253175645503
New Minimum: -2.0960636269786512 > -2.1059114420850196
WOLFE (weak): th(51.70643256076521)=-2.1059114420850196; dx=-2.49325639546758E-4 evalInputDelta=0.013114340423932891
New Minimum: -2.1059114420850196 > -2.159299748902027
WOLFE (weak): th(258.53216280382605)=-2.159299748902027; dx=-2.5713078609444865E-4 evalInputDelta=0.06650264724094024
New Minimum: -2.159299748902027 > -2.5225103928093002
WOLFE (weak): th(1551.1929768229563)=-2.5225103928093002; dx=-2.935046476425234E-4 evalInputDelta=0.42971329114821355
New Minimum: -2.5225103928093002 > -5.777085177779841
WOLFE (weak): th(10858.350837760694)=-5.777085177779841; dx=-3.3987684656088457E-4 evalInputDelta=3.6842880761187544
New Minimum: -5.777085177779841 > -14.003975805105922
END: th(86866.80670208555)=-14.003975805105922; dx=-6.349714954263524E-5 evalInputDelta=11.911178703444836
Fitness changed from -2.0927971016610867 to -14.003975805105922
Iteration 1 complete. Error: -14.003975805105922 Total: 11.5293; Orientation: 0.0147; Line Search: 8.6608
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5efaecda-6aaa-4c47-941a-99e0980275a4.jpg)
Adding measurement 4bf487d2 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-14.003975805105922;dx=-0.0012422074760827491
New Minimum: -14.003975805105922 > -25.49738410840285
END: th(187148.86177126726)=-25.49738410840285; dx=-1.9900911390899645E-5 evalInputDelta=11.49340830329693
Fitness changed from -14.003975805105922 to -25.49738410840285
Iteration 2 complete. Error: -25.49738410840285 Total: 2.8217; Orientation: 0.0148; Line Search: 1.8251
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2c1fe5fa-f125-4986-86fb-e7ef36bb0ffd.jpg)
Adding measurement 1178369d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-25.49738410840285;dx=-7.360441059257002E-4
New Minimum: -25.49738410840285 > -57.64516094748886
WOLF (strong): th(403200.00000000006)=-57.64516094748886; dx=4.777267851198305E-6 evalInputDelta=32.147776839086006
New Minimum: -57.64516094748886 > -64.77814109445715
END: th(201600.00000000003)=-64.77814109445715; dx=-3.0497902128081807E-5 evalInputDelta=39.2807569860543
Fitness changed from -25.49738410840285 to -64.77814109445715
Iteration 3 complete. Error: -64.77814109445715 Total: 3.9836; Orientation: 0.0151; Line Search: 2.9656
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/503d5de0-d064-4575-806b-d6e0e7358ba3.jpg)
Adding measurement 575858e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.614e+04, gradient 2.781e-02, dot -0.196; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.77814109445715, -25.49738410840285, -14.003975805105922, -2.0927971016610867
LBFGS Accumulation History: 3 points
Removed measurement 575858e2 to history. Total: 3
th(0)=-64.77814109445715;dx=-7.689873494151705E-4
New Minimum: -64.77814109445715 > -91.28831287576376
WOLF (strong): th(434334.03351042786)=-91.28831287576376; dx=4.4704343706376414E-5 evalInputDelta=26.51017178130661
New Minimum: -91.28831287576376 > -120.45803096116474
WOLF (strong): th(217167.01675521393)=-120.45803096116474; dx=2.456177260917779E-5 evalInputDelta=55.67988986670758
END: th(72389.00558507131)=-114.23184560848632; dx=-3.4483204273877904E-4 evalInputDelta=49.45370451402917
Fitness changed from -64.77814109445715 to -120.45803096116474
Iteration 4 complete. Error: -120.45803096116474 Total: 4.7708; Orientation: 0.2753; Line Search: 3.5574
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/cd0b9bde-87dd-4f25-a330-71e95bf50445.jpg)
Adding measurement 3e5fa966 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.964e+04, gradient 3.407e-02, dot -0.177; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -120.45803096116474, -25.49738410840285, -14.003975805105922, -2.0927971016610867
LBFGS Accumulation History: 3 points
Removed measurement 3e5fa966 to history. Total: 3
th(0)=-120.45803096116474;dx=-0.001156120819204642
New Minimum: -120.45803096116474 > -185.8040037604373
WOLF (strong): th(155957.38480938942)=-185.8040037604373; dx=3.8752129375165675E-5 evalInputDelta=65.34597279927256
END: th(77978.69240469471)=-185.0837992083312; dx=-3.054760324571008E-4 evalInputDelta=64.62576824716645
Fitness changed from -120.45803096116474 to -185.8040037604373
Iteration 5 complete. Error: -185.8040037604373 Total: 4.0724; Orientation: 0.2751; Line Search: 2.8584
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/42cb312d-b827-4e14-a34f-89435f9d83ec.jpg)
Adding measurement 71bcd49c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.501e+04, gradient 3.526e-02, dot -0.225; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -185.8040037604373, -25.49738410840285, -14.003975805105922, -2.0927971016610867
LBFGS Accumulation History: 3 points
Removed measurement 71bcd49c to history. Total: 3
th(0)=-185.8040037604373;dx=-0.0012360797876181694
New Minimum: -185.8040037604373 > -229.8537459348795
WOLF (strong): th(168000.00000000006)=-229.8537459348795; dx=1.3861100241230686E-4 evalInputDelta=44.0497421744422
New Minimum: -229.8537459348795 > -246.67980560294404
END: th(84000.00000000003)=-246.67980560294404; dx=-2.3776596321152288E-4 evalInputDelta=60.875801842506746
Fitness changed from -185.8040037604373 to -246.67980560294404
Iteration 6 complete. Error: -246.67980560294404 Total: 3.9267; Orientation: 0.2774; Line Search: 2.6654
Adding measurement 3ed6a5f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.631e+04, gradient 3.122e-02, dot -0.282; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -246.67980560294404, -25.49738410840285, -14.003975805105922, -2.0927971016610867
LBFGS Accumulation History: 3 points
Removed measurement 3ed6a5f7 to history. Total: 3
th(0)=-246.67980560294404;dx=-9.70081025165284E-4
New Minimum: -246.67980560294404 > -274.7606102884049
WOLF (strong): th(180972.5139626783)=-274.7606102884049; dx=7.676701507776756E-5 evalInputDelta=28.080804685460862
New Minimum: -274.7606102884049 > -289.56895245252014
END: th(90486.25698133915)=-289.56895245252014; dx=-1.868388411344804E-4 evalInputDelta=42.88914684957609
Fitness changed from -246.67980560294404 to -289.56895245252014
Iteration 7 complete. Error: -289.56895245252014 Total: 3.9502; Orientation: 0.2749; Line Search: 2.8555
Adding measurement afab7bc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.229e+05, gradient 3.237e-02, dot -0.316; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -289.56895245252014, -25.49738410840285, -14.003975805105922, -2.0927971016610867
LBFGS Accumulation History: 3 points
Removed measurement afab7bc to history. Total: 3
th(0)=-289.56895245252014;dx=-0.0010408196637718037
New Minimum: -289.56895245252014 > -290.28581051246084
WOLF (strong): th(194946.7310117368)=-290.28581051246084; dx=1.4456487732148504E-4 evalInputDelta=0.7168580599407051
New Minimum: -290.28581051246084 > -322.4497678974471
END: th(97473.3655058684)=-322.4497678974471; dx=-2.1805141503652988E-5 evalInputDelta=32.88081544492695
Fitness changed from -289.56895245252014 to -322.4497678974471
Iteration 8 complete. Error: -322

...skipping 1575 bytes...

9270639687E-4
New Minimum: -356.1622220860509 > -389.0122351182677
END: th(75405.21415111597)=-389.0122351182677; dx=-3.501918801761261E-4 evalInputDelta=32.85001303221679
Fitness changed from -356.1622220860509 to -389.0122351182677
Iteration 10 complete. Error: -389.0122351182677 Total: 2.8989; Orientation: 0.2761; Line Search: 1.7544
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/cffb59d2-b475-4b99-830b-8fa812bb30dd.jpg)
Adding measurement 1a7f323f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.471e+04, gradient 2.952e-02, dot -0.313; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -389.0122351182677, -25.49738410840285, -14.003975805105922, -2.0927971016610867
LBFGS Accumulation History: 3 points
Removed measurement 1a7f323f to history. Total: 3
th(0)=-389.0122351182677;dx=-8.613452815443823E-4
New Minimum: -389.0122351182677 > -416.06927017729345
END: th(162455.60917644735)=-416.06927017729345; dx=-9.968394878794144E-5 evalInputDelta=27.057035059025736
Fitness changed from -389.0122351182677 to -416.06927017729345
Iteration 11 complete. Error: -416.06927017729345 Total: 2.9352; Orientation: 0.2783; Line Search: 1.7154
Adding measurement 29c7eab to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.965e+04, gradient 3.648e-02, dot 0.089; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-416.06927017729345;dx=-62.771093136160715
Armijo: th(350000.00000000023)=-14.630726279249352; dx=8.565014972187434E-6 evalInputDelta=-401.4385438980441
Armijo: th(175000.00000000012)=-14.631338129259607; dx=1.6960213216076576E-5 evalInputDelta=-401.4379320480338
Armijo: th(58333.33333333337)=-14.636556365118235; dx=4.9340193682582395E-5 evalInputDelta=-401.4327138121752
Armijo: th(14583.333333333343)=-14.628270446982786; dx=2.0693972746891335E-4 evalInputDelta=-401.44099973031064
Armijo: th(2916.666666666669)=-14.718667072084573; dx=0.0011356219125639604 evalInputDelta=-401.35060310520885
Armijo: th(486.1111111111115)=-14.781310982967902; dx=0.00687388385677746 evalInputDelta=-401.28795919432554
Armijo: th(69.4444444444445)=-16.509138137447145; dx=0.04320968135404887 evalInputDelta=-399.5601320398463
Armijo: th(8.680555555555562)=-12.20981558951871; dx=-0.651033741246367 evalInputDelta=-403.85945458777474
Armijo: th(0.9645061728395069)=-93.79898715863516; dx=115.04465145439389 evalInputDelta=-322.2702830186583
Armijo: th(0.09645061728395068)=-407.20374272077123; dx=81.1100186604305 evalInputDelta=-8.865527456522216
Armijo: th(0.008768237934904608)=-416.06893052633103; dx=-13.025557728820464 evalInputDelta=-3.3965096241672654E-4
New Minimum: -416.06927017729345 > -416.09080348230094
END: th(7.30686494575384E-4)=-416.09080348230094; dx=-49.721018940140155 evalInputDelta=0.02153330500749462
Fitness changed from -416.06927017729345 to -416.09080348230094
Iteration 12 complete. Error: -416.09080348230094 Total: 12.6707; Orientation: 0.2701; Line Search: 11.5711
Adding measurement 78cd03b5 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.859e+07, gradient 3.643e-02, dot -0.300; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -416.09080348230094, -416.06927017729345, -25.49738410840285, -14.003975805105922, -2.0927971016610867
Rejected: LBFGS Orientation magnitude: 1.216e+08, gradient 3.643e-02, dot -0.350; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -416.09080348230094, -416.06927017729345, -25.49738410840285, -14.003975805105922
LBFGS Accumulation History: 3 points
Removed measurement 78cd03b5 to history. Total: 4
Removed measurement 29c7eab to history. Total: 3
th(0)=-416.09080348230094;dx=-0.001314646556527606
New Minimum: -416.09080348230094 > -416.09082612451675
WOLFE (weak): th(0.0015742163314510012)=-416.09082612451675; dx=-0.0012439439698207027 evalInputDelta=2.264221581071979E-5
WOLFE (weak): th(0.0031484326629020024)=-416.09082612451675; dx=-0.0012386829860519095 evalInputDelta=2.264221581071979E-5
WOLFE (weak): th(0.009445297988706008)=-416.09082612451675; dx=-0.0012402450394024857 evalInputDelta=2.264221581071979E-5
New Minimum: -416.09082612451675 > -416.0908714089447
WOLFE (weak): th(0.03778119195482403)=-416.0908714089447; dx=-0.0012401111461090683 evalInputDelta=6.792664373733714E-5
New Minimum: -416.0908714089447 > -416.0910978310103
WOLFE (weak): th(0.18890595977412017)=-416.0910978310103; dx=-0.0012416334857172728 evalInputDelta=2.9434870936029256E-4
New Minimum: -416.0910978310103 > -416.0925469293129
WOLFE (weak): th(1.133435758644721)=-416.0925469293129; dx=-0.001243139421805964 evalInputDelta=0.0017434470119610523
New Minimum: -416.0925469293129 > -416.10273575926396
WOLFE (weak): th(7.934050310513047)=-416.10273575926396; dx=-0.0012408221808344441 evalInputDelta=0.011932276963023014
New Minimum: -416.10273575926396 > -416.1847127986225
WOLFE (weak): th(63.47240248410438)=-416.1847127986225; dx=-0.0012162875751199449 evalInputDelta=0.09390931632157162
New Minimum: -416.1847127986225 > -416.8641768563708
END: th(571.2516223569394)=-416.8641768563708; dx=-0.0011072309762106183 evalInputDelta=0.7733733740698767
Fitness changed from -416.09080348230094 to -416.8641768563708
Iteration 13 complete. Error: -416.8641768563708 Total: 10.6043; Orientation: 0.5832; Line Search: 9.0114
Adding measurement 225d0f0e to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.345e+04, gradient 3.625e-02, dot 0.363; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
th(0)=-416.8641768563708;dx=-176.10873155376856
Armijo: th(1230.7243119427835)=-15.946945200638144; dx=0.006648758541297386 evalInputDelta=-400.9172316557327
Armijo: th(615.3621559713918)=-16.114832151388367; dx=0.013026495492203515 evalInputDelta=-400.74934470498243
Armijo: th(205.1207186571306)=-17.413047135798326; dx=0.04373812570870126 evalInputDelta=-399.4511297205725
Armijo: th(51.28017966428265)=-22.44673562723699; dx=0.2477377046572568 evalInputDelta=-394.41744122913383
Armijo: th(10.25603593285653)=-41.04959072243674; dx=1.5366234644247039 evalInputDelta=-375.8145861339341
Armijo: th(1.709339322142755)=-165.58740261365884; dx=47.62256800813648 evalInputDelta=-251.27677424271198
New Minimum: -416.8641768563708 > -418.81286790639933
WOLF (strong): th(0.2441913317346793)=-418.81286790639933; dx=16.908260762013583 evalInputDelta=1.9486910500285148
New Minimum: -418.81286790639933 > -420.3196878507505
END: th(0.030523916466834913)=-420.3196878507505; dx=-115.24017945580961 evalInputDelta=3.455510994379665
Fitness changed from -416.8641768563708 to -420.3196878507505
Iteration 14 complete. Error: -420.3196878507505 Total: 9.2910; Orientation: 0.2618; Line Search: 7.9047
Adding measurement 691f3aef to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.199e+06, gradient 3.617e-02, dot -0.343; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -420.3196878507505, -416.8641768563708, -25.49738410840285, -14.003975805105922, -2.0927971016610867
Rejected: LBFGS Orientation magnitude: 5.277e+06, gradient 3.617e-02, dot -0.375; [b1e62404-d2fe-4f0a-964d-1829fe3a7bc2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -420.3196878507505, -416.8641768563708, -25.49738410840285, -14.003975805105922
LBFGS Accumulation History: 3 points
Removed measurement 691f3aef to history. Total: 4
Removed measurement 225d0f0e to history. Total: 3
th(0)=-420.3196878507505;dx=-0.0012983234987081448
New Minimum: -420.3196878507505 > -420.31977750838286
END: th(0.06576178451178459)=-420.31977750838286; dx=-0.001146357881188494 evalInputDelta=8.965763237256397E-5
Fitness changed from -420.3196878507505 to -420.31977750838286
Iteration 15 complete. Error: -420.31977750838286 Total: 3.3855; Orientation: 0.6021; Line Search: 1.9374
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/6de79d7f-5b0c-42a1-9320-43fa3cc4e8d0.jpg)
Final threshold in iteration 16: -420.31977750838286 (> -Infinity) after 85.496s (< 5400.000s)

Returns

    -420.31977750838286