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 65.16 seconds (1.820 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: 221088551460400
Reset training subject: 221089226182800
Adding measurement 52c00983 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-35.46451594957992;dx=-0.001660394970621255
New Minimum: -35.46451594957992 > -35.46785052502632
WOLFE (weak): th(2.154434690031884)=-35.46785052502632; dx=-0.0016645678864852507 evalInputDelta=0.003334575446402255
New Minimum: -35.46785052502632 > -35.47118892576742
WOLFE (weak): th(4.308869380063768)=-35.47118892576742; dx=-0.0016628699696722613 evalInputDelta=0.0066729761875024
New Minimum: -35.47118892576742 > -35.484547556047445
WOLFE (weak): th(12.926608140191302)=-35.484547556047445; dx=-0.001661196332890527 evalInputDelta=0.02003160646752633
New Minimum: -35.484547556047445 > -35.544793451266706
WOLFE (weak): th(51.70643256076521)=-35.544793451266706; dx=-0.001658592838698243 evalInputDelta=0.08027750168678693
New Minimum: -35.544793451266706 > -35.86542545233787
WOLFE (weak): th(258.53216280382605)=-35.86542545233787; dx=-0.0016227780426097081 evalInputDelta=0.4009095027579477
New Minimum: -35.86542545233787 > -37.7452787745119
END: th(1551.1929768229563)=-37.7452787745119; dx=-0.0014525425311808346 evalInputDelta=2.2807628249319833
Fitness changed from -35.46451594957992 to -37.7452787745119
Iteration 1 complete. Error: -37.7452787745119 Total: 6.9489; Orientation: 0.0164; Line Search: 5.0390
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/57e3def3-81ca-462e-83d3-8736d835bff6.jpg)
Adding measurement 507c17ad to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-37.7452787745119;dx=-0.0022045043291191984
New Minimum: -37.7452787745119 > -42.77964772209273
END: th(3341.943960201201)=-42.77964772209273; dx=-0.0011050609593073663 evalInputDelta=5.03436894758083
Fitness changed from -37.7452787745119 to -42.77964772209273
Iteration 2 complete. Error: -42.77964772209273 Total: 2.0408; Orientation: 0.0263; Line Search: 1.3747
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3c0df163-5ce1-45c4-bffe-7500848ee7ee.jpg)
Adding measurement 36d80a8c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-42.77964772209273;dx=-0.00213242940027525
New Minimum: -42.77964772209273 > -50.226784131709955
END: th(7200.000000000001)=-50.226784131709955; dx=-8.030676280831319E-4 evalInputDelta=7.447136409617222
Fitness changed from -42.77964772209273 to -50.226784131709955
Iteration 3 complete. Error: -50.226784131709955 Total: 2.0840; Orientation: 0.0194; Line Search: 1.4074
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5f0040ac-e235-414c-bab1-badbd5881df4.jpg)
Adding measurement 2e7a59f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.998e+03, gradient 4.476e-02, dot -0.351; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.226784131709955, -42.77964772209273, -37.7452787745119, -35.46451594957992
LBFGS Accumulation History: 3 points
Removed measurement 2e7a59f to history. Total: 3
th(0)=-50.226784131709955;dx=-0.001985148492720065
New Minimum: -50.226784131709955 > -60.899213932382345
END: th(15511.929768229566)=-60.899213932382345; dx=-4.96006001273783E-4 evalInputDelta=10.67242980067239
Fitness changed from -50.226784131709955 to -60.899213932382345
Iteration 4 complete. Error: -60.899213932382345 Total: 2.4801; Orientation: 0.3819; Line Search: 1.3445
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/830bdea4-579c-432d-844d-28786c69656c.jpg)
Adding measurement 4f3f2166 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.855e+03, gradient 4.040e-02, dot -0.288; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.899213932382345, -42.77964772209273, -37.7452787745119, -35.46451594957992
LBFGS Accumulation History: 3 points
Removed measurement 4f3f2166 to history. Total: 3
th(0)=-60.899213932382345;dx=-0.0016167324997970306
New Minimum: -60.899213932382345 > -73.70250165469258
END: th(33419.43960201202)=-73.70250165469258; dx=-3.092553576571459E-4 evalInputDelta=12.803287722310237
Fitness changed from -60.899213932382345 to -73.70250165469258
Iteration 5 complete. Error: -73.70250165469258 Total: 2.4169; Orientation: 0.3611; Line Search: 1.4167
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8a2e1f36-8c8e-4f76-9c0c-aadb21ac12b1.jpg)
Adding measurement f4f59b6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.156e+03, gradient 3.821e-02, dot -0.184; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.70250165469258, -42.77964772209273, -37.7452787745119, -35.46451594957992
LBFGS Accumulation History: 3 points
Removed measurement f4f59b6 to history. Total: 3
th(0)=-73.70250165469258;dx=-0.0014489589741453189
New Minimum: -73.70250165469258 > -86.54519844308031
END: th(72000.00000000003)=-86.54519844308031; dx=-1.2564138402342245E-4 evalInputDelta=12.842696788387727
Fitness changed from -73.70250165469258 to -86.54519844308031
Iteration 6 complete. Error: -86.54519844308031 Total: 2.3960; Orientation: 0.3285; Line Search: 1.3991
Adding measurement 55c61e24 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.018e+03, gradient 3.535e-02, dot -0.116; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.54519844308031, -42.77964772209273, -37.7452787745119, -35.46451594957992
LBFGS Accumulation History: 3 points
Removed measurement 55c61e24 to history. Total: 3
th(0)=-86.54519844308031;dx=-0.0012356190545288902
Armijo: th(155119.2976822957)=-83.93889635325112; dx=-8.995157120500009E-6 evalInputDelta=-2.6063020898291853
New Minimum: -86.54519844308031 > -104.73466125471111
END: th(77559.64884114785)=-104.73466125471111; dx=-1.5907339982249578E-4 evalInputDelta=18.189462811630804
Fitness changed from -86.54519844308031 to -104.73466125471111
Iteration 7 complete. Error: -104.73466125471111 Total: 3.3621; Orientation: 0.3385; Line Search: 2.1192
Adding measurement 644cabc0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.746e+03, gradient 3.753e-02, dot -0.122; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -104.73466125471111, -42.77964772209273, -37.7452787745119, -35.46451594957992
LBFGS Accumulation History: 3 points
Removed measurement 644cabc0 to history. Total: 3
th(0)=-104.73466125471111;dx=-0.0013978252509139239
Armijo: th(167097.19801006012)=-94.47816074994684; dx=6.165435855115482E-6 evalInputDelta=-10.256500504764276
New Minimum: -104.73466125471111 > -120.20151320871548
END: th(83548.59900503006)=-120.20151320871548; dx=-1.4529705740075935E-4 evalInputDelta=15.466851954004369
Fitness changed from -104.73466125471111 to -120.20151320871548
Iteration 8 complete. Error: -120.20151320871548 Total: 3.0538; Orientation: 0.3266; Line Search: 2.1368
Adding measurement 26e8537b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.780e+03, gradient 3.555e-02, dot -0.154; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -120.20151320871548, -42.77964772209273, -37.7452787745119, -35.46451594957992
LBFGS Accumulation History: 3 points
Removed measurement 26e8537b to history. Total: 3
th(0)=-120.20151320871548;dx=-0.001253480113483016
Armijo: th(180000.0000000001)=-110.76652206924501; dx=2.5423239878063854E-5 evalInputDelta=-9.434991139470469
New Minimum: -120.20151320871548 > -139.5358203795594
END: th(90000.00000000004)=-139.5358203795594; dx=-1.3613756335661541E-4 evalInputDelta=19.334307170843914
Fitness changed from -120.20151320871548 to -139.5358203795594
Iteration 9 complete. Error: -139.5358203795594 Total: 3.1475; Orientation: 0.3429; Line Search: 2.1290
Adding measurement 41185f85 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.606e+04, gradient 3.278e-02, dot -0.171; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -139.5358203795594, -42.779647

...skipping 217 bytes...

-123.51509316385267; dx=1.4823347237922186E-5 evalInputDelta=-16.020727215706728
New Minimum: -139.5358203795594 > -155.76468251879422
END: th(96949.56105143482)=-155.76468251879422; dx=-1.5812427022546916E-4 evalInputDelta=16.22886213923482
Fitness changed from -139.5358203795594 to -155.76468251879422
Iteration 10 complete. Error: -155.76468251879422 Total: 3.1215; Orientation: 0.3396; Line Search: 2.1339
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/70155e73-0744-4dc0-b7ed-035e7a555c0c.jpg)
Adding measurement 7b1b0e19 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.915e+04, gradient 3.304e-02, dot -0.188; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -155.76468251879422, -42.77964772209273, -37.7452787745119, -35.46451594957992
LBFGS Accumulation History: 3 points
Removed measurement 7b1b0e19 to history. Total: 3
th(0)=-155.76468251879422;dx=-0.001085842470196239
Armijo: th(208871.49751257518)=-135.71359308057538; dx=1.180142492588291E-5 evalInputDelta=-20.05108943821884
New Minimum: -155.76468251879422 > -169.674977869741
END: th(104435.74875628759)=-169.674977869741; dx=-1.329474548370295E-4 evalInputDelta=13.910295350946797
Fitness changed from -155.76468251879422 to -169.674977869741
Iteration 11 complete. Error: -169.674977869741 Total: 3.4487; Orientation: 0.3200; Line Search: 2.1158
Adding measurement 5d945dd8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.519e+06, gradient 3.344e-02, dot -0.193; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -169.674977869741, -42.77964772209273, -37.7452787745119, -35.46451594957992
LBFGS Accumulation History: 3 points
Removed measurement 5d945dd8 to history. Total: 3
th(0)=-169.674977869741;dx=-0.0011150459406142014
Armijo: th(225000.00000000015)=-138.27389501208026; dx=5.3957419879601525E-5 evalInputDelta=-31.401082857660754
New Minimum: -169.674977869741 > -182.27683083949262
END: th(112500.00000000007)=-182.27683083949262; dx=-9.701764723792394E-5 evalInputDelta=12.601852969751604
Fitness changed from -169.674977869741 to -182.27683083949262
Iteration 12 complete. Error: -182.27683083949262 Total: 3.0184; Orientation: 0.3340; Line Search: 2.0699
Adding measurement 5c1d212 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 8.271e+04, gradient 3.387e-02, dot 0.196; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-182.27683083949262;dx=-546.9564212211523
Armijo: th(242373.9026285871)=626.1309573691113; dx=0.0015746687618480803 evalInputDelta=-808.407788208604
Armijo: th(121186.95131429355)=626.1149314976954; dx=0.0031511856759972377 evalInputDelta=-808.391762337188
Armijo: th(40395.65043809785)=626.0690539497821; dx=0.009446482058440925 evalInputDelta=-808.3458847892747
Armijo: th(10098.912609524463)=625.9194029314896; dx=0.03780105518837082 evalInputDelta=-808.1962337709822
Armijo: th(2019.7825219048925)=624.6800033718716; dx=0.1885853061855719 evalInputDelta=-806.9568342113643
Armijo: th(336.6304203174821)=615.9855737321232; dx=1.116508958887886 evalInputDelta=-798.2624045716158
Armijo: th(48.09006004535458)=586.3814671090984; dx=7.555147051025475 evalInputDelta=-768.658297948591
Armijo: th(6.011257505669323)=469.7467583848345; dx=53.56482570831499 evalInputDelta=-652.0235892243271
Armijo: th(0.6679175006299247)=41.89245518341468; dx=145.80417548671156 evalInputDelta=-224.1692860229073
Armijo: th(0.06679175006299247)=-176.88216462112976; dx=-109.88701957195592 evalInputDelta=-5.3946662183628575
New Minimum: -182.27683083949262 > -183.41617894669585
END: th(0.006071977278453861)=-183.41617894669585; dx=-359.7495729685767 evalInputDelta=1.139348107203233
Fitness changed from -182.27683083949262 to -183.41617894669585
Iteration 13 complete. Error: -183.41617894669585 Total: 9.2854; Orientation: 0.3264; Line Search: 8.2942
Adding measurement 63a93247 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 2.205e+05, gradient 3.373e-02, dot -0.178; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -183.41617894669585, -182.27683083949262, -42.77964772209273, -37.7452787745119, -35.46451594957992
Rejected: LBFGS Orientation magnitude: 3.629e+05, gradient 3.373e-02, dot -0.181; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -183.41617894669585, -182.27683083949262, -42.77964772209273, -37.7452787745119
LBFGS Accumulation History: 3 points
Removed measurement 63a93247 to history. Total: 4
Removed measurement 5c1d212 to history. Total: 3
th(0)=-183.41617894669585;dx=-0.0011323202639982068
New Minimum: -183.41617894669585 > -183.41620179913394
WOLFE (weak): th(0.013081678485786384)=-183.41620179913394; dx=-0.001031820567306321 evalInputDelta=2.285243809296844E-5
WOLFE (weak): th(0.02616335697157277)=-183.41620179913394; dx=-0.0010345343849093905 evalInputDelta=2.285243809296844E-5
New Minimum: -183.41620179913394 > -183.41623607778632
WOLFE (weak): th(0.07849007091471831)=-183.41623607778632; dx=-0.0010314462979907763 evalInputDelta=5.7131090471784773E-5
New Minimum: -183.41623607778632 > -183.41641651298377
WOLFE (weak): th(0.31396028365887324)=-183.41641651298377; dx=-0.0010331060920669645 evalInputDelta=2.3756628792170886E-4
New Minimum: -183.41641651298377 > -183.41739628542882
WOLFE (weak): th(1.5698014182943663)=-183.41739628542882; dx=-0.0010314126256682427 evalInputDelta=0.0012173387329710295
New Minimum: -183.41739628542882 > -183.42348475740351
WOLFE (weak): th(9.418808509766198)=-183.42348475740351; dx=-0.001032433695793259 evalInputDelta=0.0073058107076633405
New Minimum: -183.42348475740351 > -183.46729544776906
WOLFE (weak): th(65.93165956836339)=-183.46729544776906; dx=-0.0010318914495518884 evalInputDelta=0.051116501073209974
New Minimum: -183.46729544776906 > -183.82342311357561
WOLFE (weak): th(527.4532765469071)=-183.82342311357561; dx=-0.0010268494866222029 evalInputDelta=0.4072441668797637
New Minimum: -183.82342311357561 > -186.95966674256061
END: th(4747.079488922163)=-186.95966674256061; dx=-9.724379775706566E-4 evalInputDelta=3.5434877958647633
Fitness changed from -183.41617894669585 to -186.95966674256061
Iteration 14 complete. Error: -186.95966674256061 Total: 9.2849; Orientation: 0.7012; Line Search: 7.9656
Adding measurement 4de723a5 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.303e+05, gradient 3.255e-02, dot 0.198; [9bb7a5f9-52c8-44c7-81db-74d537a710bf = 1.000/1.000e+00]
th(0)=-186.95966674256061;dx=-836.9217532727693
Armijo: th(10227.272727272735)=624.0599788062725; dx=0.03734938638179196 evalInputDelta=-811.0196455488331
Armijo: th(5113.636363636368)=623.9460340527374; dx=0.07462291051774064 evalInputDelta=-810.9057007952981
Armijo: th(1704.5454545454559)=623.3397122392977; dx=0.22349031182096338 evalInputDelta=-810.2993789818584
Armijo: th(426.13636363636397)=619.0013337463727; dx=0.8877686322641836 evalInputDelta=-805.9610004889332
Armijo: th(85.22727272727279)=603.8209568556499; dx=4.355644952175447 evalInputDelta=-790.7806235982105
Armijo: th(14.204545454545466)=558.0252615169586; dx=24.91990794498596 evalInputDelta=-744.9849282595192
Armijo: th(2.029220779220781)=377.84849060458066; dx=139.13430492898868 evalInputDelta=-564.8081573471413
Armijo: th(0.2536525974025976)=-49.621009828677444; dx=192.46776071019997 evalInputDelta=-137.33865691388317
Armijo: th(0.028183621933621957)=-184.93610692154152; dx=-265.63023535761954 evalInputDelta=-2.0235598210190915
New Minimum: -186.95966674256061 > -187.58742270924148
END: th(0.0028183621933621957)=-187.58742270924148; dx=-517.7369177519223 evalInputDelta=0.6277559666808656
Fitness changed from -186.95966674256061 to -187.58742270924148
Iteration 15 complete. Error: -187.58742270924148 Total: 9.0533; Orientation: 0.3649; Line Search: 7.9462
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/46777b45-4d43-4085-aa53-888971ad02bc.jpg)
Final threshold in iteration 16: -187.58742270924148 (> -Infinity) after 65.163s (< 5400.000s)

Returns

    -187.58742270924148