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 9.63 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: 150120657048200
Reset training subject: 150120789277700
Adding measurement 6450cbd3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-26.515661829673892;dx=-0.20658463879913228
New Minimum: -26.515661829673892 > -27.214702178205762
WOLFE (weak): th(2.154434690031884)=-27.214702178205762; dx=-0.21002929564511413 evalInputDelta=0.6990403485318701
New Minimum: -27.214702178205762 > -27.913475408393705
WOLFE (weak): th(4.308869380063768)=-27.913475408393705; dx=-0.21317204744256857 evalInputDelta=1.3978135787198127
New Minimum: -27.913475408393705 > -30.796053507244945
WOLFE (weak): th(12.926608140191302)=-30.796053507244945; dx=-0.21905633183703332 evalInputDelta=4.280391677571053
New Minimum: -30.796053507244945 > -45.04325855887385
WOLFE (weak): th(51.70643256076521)=-45.04325855887385; dx=-0.24301377198374907 evalInputDelta=18.52759672919996
New Minimum: -45.04325855887385 > -95.94321542421591
END: th(258.53216280382605)=-95.94321542421591; dx=-0.11377817296752066 evalInputDelta=69.42755359454202
Fitness changed from -26.515661829673892 to -95.94321542421591
Iteration 1 complete. Error: -95.94321542421591 Total: 1.0366; Orientation: 0.0015; Line Search: 0.6753
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/dd6200da-5e1b-4673-953e-4f1931c4d9c8.jpg)
Adding measurement 62ba1f1c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-95.94321542421591;dx=-0.31098429061611976
New Minimum: -95.94321542421591 > -183.3628894262686
END: th(556.9906600335335)=-183.3628894262686; dx=-0.02211362980458759 evalInputDelta=87.41967400205269
Fitness changed from -95.94321542421591 to -183.3628894262686
Iteration 2 complete. Error: -183.3628894262686 Total: 0.3540; Orientation: 0.0015; Line Search: 0.2294
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/03f8b222-6ffa-4e65-9aa6-54ee3d78de61.jpg)
Adding measurement 32643f25 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-183.3628894262686;dx=-0.23719647686825637
New Minimum: -183.3628894262686 > -252.67704189340193
WOLF (strong): th(1200.0)=-252.67704189340193; dx=0.015248120176910115 evalInputDelta=69.31415246713334
New Minimum: -252.67704189340193 > -286.1649982964374
END: th(600.0)=-286.1649982964374; dx=-0.016723984686839395 evalInputDelta=102.80210887016878
Fitness changed from -183.3628894262686 to -286.1649982964374
Iteration 3 complete. Error: -286.1649982964374 Total: 0.4634; Orientation: 0.0017; Line Search: 0.3404
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/8881ffb1-52af-4c8f-84d8-8a75ecea08eb.jpg)
Adding measurement 27d4731f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.018e+02, gradient 4.139e-01, dot -0.287; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -286.1649982964374, -183.3628894262686, -95.94321542421591, -26.515661829673892
LBFGS Accumulation History: 3 points
Removed measurement 27d4731f to history. Total: 3
th(0)=-286.1649982964374;dx=-0.16517249632822523
New Minimum: -286.1649982964374 > -313.48616895327297
WOLF (strong): th(1292.6608140191304)=-313.48616895327297; dx=0.01006418956890237 evalInputDelta=27.32117065683559
New Minimum: -313.48616895327297 > -353.3168947630441
END: th(646.3304070095652)=-353.3168947630441; dx=-0.028183613838591852 evalInputDelta=67.15189646660673
Fitness changed from -286.1649982964374 to -353.3168947630441
Iteration 4 complete. Error: -353.3168947630441 Total: 0.5028; Orientation: 0.0281; Line Search: 0.3543
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/28a47143-04c3-4949-aae1-dbedc9848785.jpg)
Adding measurement 1c21bd1d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.844e+02, gradient 3.661e-01, dot -0.340; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -353.3168947630441, -183.3628894262686, -95.94321542421591, -26.515661829673892
LBFGS Accumulation History: 3 points
Removed measurement 1c21bd1d to history. Total: 3
th(0)=-353.3168947630441;dx=-0.12835009407628234
New Minimum: -353.3168947630441 > -418.75011194028355
END: th(1392.4766500838339)=-418.75011194028355; dx=-0.0015662307482711257 evalInputDelta=65.43321717723944
Fitness changed from -353.3168947630441 to -418.75011194028355
Iteration 5 complete. Error: -418.75011194028355 Total: 0.3863; Orientation: 0.0298; Line Search: 0.2312
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/3ee4c5ea-3f8d-4066-871b-3d82c512729a.jpg)
Adding measurement 715bf619 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.375e+03, gradient 4.754e-01, dot -0.262; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -418.75011194028355, -183.3628894262686, -95.94321542421591, -26.515661829673892
LBFGS Accumulation History: 3 points
Removed measurement 715bf619 to history. Total: 3
th(0)=-418.75011194028355;dx=-0.22185422810037905
Armijo: th(3000.0000000000005)=-208.27991606849662; dx=0.02781686856652426 evalInputDelta=-210.47019587178693
New Minimum: -418.75011194028355 > -442.5407820190135
WOLF (strong): th(1500.0000000000002)=-442.5407820190135; dx=0.05558932362554945 evalInputDelta=23.79067007872993
New Minimum: -442.5407820190135 > -523.8634721948076
END: th(500.00000000000006)=-523.8634721948076; dx=-0.07086538618196109 evalInputDelta=105.11336025452408
Fitness changed from -418.75011194028355 to -523.8634721948076
Iteration 6 complete. Error: -523.8634721948076 Total: 0.6042; Orientation: 0.0276; Line Search: 0.4525
Adding measurement 4ec5bd64 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.270e+03, gradient 3.494e-01, dot -0.387; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -523.8634721948076, -183.3628894262686, -95.94321542421591, -26.515661829673892
LBFGS Accumulation History: 3 points
Removed measurement 4ec5bd64 to history. Total: 3
th(0)=-523.8634721948076;dx=-0.11569082145902228
New Minimum: -523.8634721948076 > -587.7569650799554
END: th(1077.217345015942)=-587.7569650799554; dx=-0.04213555795361133 evalInputDelta=63.89349288514779
Fitness changed from -523.8634721948076 to -587.7569650799554
Iteration 7 complete. Error: -587.7569650799554 Total: 0.3730; Orientation: 0.0274; Line Search: 0.2315
Adding measurement 3f4d8ab8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.231e+03, gradient 4.403e-01, dot -0.317; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -587.7569650799554, -183.3628894262686, -95.94321542421591, -26.515661829673892
LBFGS Accumulation History: 3 points
Removed measurement 3f4d8ab8 to history. Total: 3
th(0)=-587.7569650799554;dx=-0.18846990764307578
New Minimum: -587.7569650799554 > -601.7919335202159
WOLF (strong): th(2320.79441680639)=-601.7919335202159; dx=0.006891352203903752 evalInputDelta=14.034968440260513
New Minimum: -601.7919335202159 > -645.0351734595564
END: th(1160.397208403195)=-645.0351734595564; dx=-0.009341572284732928 evalInputDelta=57.27820837960098
Fitness changed from -587.7569650799554 to -645.0351734595564
Iteration 8 complete. Error: -645.0351734595564 Total: 0.4848; Orientation: 0.0280; Line Search: 0.3456
Adding measurement 7f6d0c6c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.667e+03, gradient 4.249e-01, dot -0.366; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -645.0351734595564, -183.3628894262686, -95.94321542421591, -26.515661829673892
LBFGS Accumulation History: 3 points
Removed measurement 7f6d0c6c to history. Total: 3
th(0)=-645.0351734595564;dx=-0.17508574468956906
New Minimum: -645.0351734595564 > -737.4294034007595
WOLF (strong): th(2500.000000000001)=-737.4294034007595; dx=0.0053044475761460375 evalInputDelta=92.3942299412031
New Minimum: -737.4294034007595 > -771.1823309049553
END: th(1250.0000000000005)=-771.1823309049553; dx=-0.019921006184419915 evalInputDelta=126.14715744539888
Fitness changed from -645.0351734595564 to -771.1823309049553
Iteration 9 complete. Error: -771.1823309049553 Total: 0.4849; Orientation: 0.0289; Line Search: 0.3439
Adding measurement 476a2218 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.360e+03, gradient 4.197e-01, dot -0.311; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -771.1823309049553, -183.3628894262686, -95.94321542421591, -26.515661829673892
LBFGS Accumulation History: 3 points
Removed measurement 476a2218 to history. Total: 3
th(0)=-771.1823309049553;dx=-0.16909273705498234
Armijo: th(2693.043362539856)=-724.1170917054783; dx=0.014091403500299617 evalInputDelta=-47.06523919947699
New Minimum: -771.1823309049553 > -824.0455842973737
END: th(1346.521681269928)=-824.0455842973737; dx=-0.015026584153911067 evalInputDelta=52.863253392418414
Fitness changed from -771.1823309049553 to -824.0455842973737
Iteration 10 complete. Error: -824.0455842973737 Total: 0.4814; Orientation: 0.0301; Line Search: 0.3400
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/8123805c-336a-4b17-a5c6-ec81e3d73432.jpg)
Adding measurement 2bca6dca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.467e+04, gradient 4.756e-01, dot -0.337; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -824.0455842973737, -183.3628894262686, -95.94321542421591, -26.515661829673892
LBFGS Accumulation History: 3 points
Removed measurement 2bca6dca to history. Total: 3
th(0)=-824.0455842973737;dx=-0.21780105668077698
New Minimum: -824.0455842973737 > -892.4646701690773
WOLF (strong): th(2900.9930210079883)=-892.4646701690773; dx=0.027518787568788262 evalInputDelta=68.4190858717036
New Minimum: -892.4646701690773 > -971.1919223304939
END: th(1450.4965105039942)=-971.1919223304939; dx=-0.0010558999252828962 evalInputDelta=147.14633803312017
Fitness changed from -824.0455842973737 to -971.1919223304939
Iteration 11 complete. Error: -971.1919223304939 Total: 0.4908; Orientation: 0.0280; Line Search: 0.3410
Adding measurement 2ec3fd7b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.473e+04, gradient 4.849e-01, dot -0.327; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -971.1919223304939, -183.3628894262686, -95.94321542421591, -26.515661829673892
LBFGS Accumulation History: 3 points
Removed measurement 2ec3fd7b to history. Total: 3
th(0)=-971.1919223304939;dx=-0.22944772140661765
Armijo: th(3125.000000000002)=-941.1671278258713; dx=0.03686138726542358 evalInputDelta=-30.024794504622605
New Minimum: -971.1919223304939 > -1069.6697504370215
END: th(1562.500000000001)=-1069.6697504370215; dx=-0.01626130476310737 evalInputDelta=98.47782810652768
Fitness changed from -971.1919223304939 to -1069.6697504370215
Iteration 12 complete. Error: -1069.6697504370215 Total: 0.4853; Orientation: 0.0270; Line Search: 0.3481
Adding measurement 2c16440b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.366e+04, gradient 4.723e-01, dot -0.332; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1069.6697504370215, -183.3628894262686, -95.94321542421591, -26.515661829673892
LBFGS Accumulation History: 3 points
Removed measurement 2c16440b to history. Total: 3
th(0)=-1069.6697504370215;dx=-0.21567074379451365
New Minimum: -1069.6697504370215 > -1196.7399466885026
WOLF (strong): th(3366.3042031748205)=-1196.7399466885026; dx=0.006130075294152663 evalInputDelta=127.0701962514811
New Minimum: -1196.7399466885026 > -1266.2179907109203
END: th(1683.1521015874102)=-1266.2179907109203; dx=-0.029899169458272715 evalInputDelta=196.54824027389873
Fitness changed from -1069.6697504370215 to -1266.2179907109203
Iteration 13 complete. Error: -1266.2179907109203 Total: 0.5120; Orientation: 0.0344; Line Search: 0.3628
Adding measurement 33c90941 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.837e+04, gradient 4.634e-01, dot 0.433; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1266.2179907109203;dx=-3652.126901309032
New Minimum: -1266.2179907109203 > -1319.6227207046718
WOLF (strong): th(3626.241276259986)=-1319.6227207046718; dx=0.11291913328457968 evalInputDelta=53.404729993751516
WOLF (strong): th(1813.120638129993)=-1318.1340978823057; dx=0.22716750856445345 evalInputDelta=51.91610717138542
WOLF (strong): th(604.373546043331)=-1313.6688129052923; dx=0.6815240744835538 evalInputDelta=47.450822194371995
New Minimum: -1319.6227207046718 > -1338.3657011444966
WOLF (strong): th(151.09338651083274)=-1338.3657011444966; dx=2.74128783235913 evalInputDelta=72.14771043357632
New Minimum: -1338.3657011444966 > -1399.539165225468
WOLF (strong): th(30.218677302166547)=-1399.539165225468; dx=12.131188710178328 evalInputDelta=133.3211745145477
WOLF (strong): th(5.036446217027758)=-1388.485235787547; dx=71.22449249524816 evalInputDelta=122.26724507662675
New Minimum: -1399.539165225468 > -1924.1615706587636
END: th(0.7194923167182512)=-1924.1615706587636; dx=-251.96415760496058 evalInputDelta=657.9435799478433
Fitness changed from -1266.2179907109203 to -1924.1615706587636
Iteration 14 complete. Error: -1924.1615706587636 Total: 1.0944; Orientation: 0.0284; Line Search: 0.9498
Adding measurement 4955b5bb to history. Total: 4
Accepted: LBFGS Orientation magnitude: 8.119e+03, gradient 4.618e-01, dot 0.169; [273a59da-3b2e-4ef1-9b22-97734b7d8aca = 1.000/1.000e+00]
th(0)=-1924.1615706587636;dx=-645.925800851252
Armijo: th(1.5500992063492076)=-1497.2141630374726; dx=88.70752383787863 evalInputDelta=-426.94740762129095
Armijo: th(0.7750496031746038)=-1685.2956713882581; dx=102.7938986595388 evalInputDelta=-238.86589927050545
Armijo: th(0.25834986772486795)=-1844.663926030972; dx=110.24524527061936 evalInputDelta=-79.49764462779149
Armijo: th(0.06458746693121699)=-1904.052060737836; dx=104.23678937357639 evalInputDelta=-20.10950992092762
Armijo: th(0.012917493386243397)=-1920.1033826333414; dx=100.92221621958637 evalInputDelta=-4.058188025422169
Armijo: th(0.0021529155643738996)=-1923.4842084093127; dx=93.74116903691178 evalInputDelta=-0.67736224945088
Armijo: th(3.075593663391285E-4)=-1924.0652275845537; dx=100.0054071617173 evalInputDelta=-0.09634307420992627
Armijo: th(3.8444920792391065E-5)=-1924.149552399709; dx=96.12784351216128 evalInputDelta=-0.012018259054684677
Armijo: th(4.27165786582123E-6)=-1924.1601414643221; dx=98.37969405137716 evalInputDelta=-0.0014291944414708269
Armijo: th(4.2716578658212296E-7)=-1924.1615056954029; dx=93.2793379601929 evalInputDelta=-6.496336072814302E-5
New Minimum: -1924.1615706587636 > -1924.1618305121842
WOLF (strong): th(3.883325332564754E-8)=-1924.1618305121842; dx=98.94081973104021 evalInputDelta=2.5985342062995187E-4
Armijo: th(3.2361044438039616E-9)=-1924.1615706587636; dx=99.19218036189667 evalInputDelta=0.0
Armijo: th(2.489311110618432E-10)=-1924.1615706587636; dx=98.00880363028553 evalInputDelta=0.0
MIN ALPHA (1.7780793647274514E-11): th(3.883325332564754E-8)=-1924.1618305121842
Fitness changed from -1924.1615706587636 to -1924.1618305121842
Iteration 15 complete. Error: -1924.1618305121842 Total: 1.8608; Orientation: 0.0336; Line Search: 1.7174
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/7f785dc4-6550-45f7-9906-6ea131cb8bae.jpg)
Final threshold in iteration 16: -1924.1618305121842 (> -Infinity) after 9.627s (< 5400.000s)

Returns

    -1924.1618305121842