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 58.80 seconds (1.984 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: 207552440591800
Reset training subject: 207553404794700
Adding measurement 1cd6b1bd to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=9.98958854708168;dx=-3.668127696972819E-5
New Minimum: 9.98958854708168 > 9.989529081924076
WOLFE (weak): th(2.154434690031884)=9.989529081924076; dx=-3.6409200163288745E-5 evalInputDelta=5.9465157605131935E-5
New Minimum: 9.989529081924076 > 9.989469457537993
WOLFE (weak): th(4.308869380063768)=9.989469457537993; dx=-3.664435941920884E-5 evalInputDelta=1.1908954368777813E-4
New Minimum: 9.989469457537993 > 9.98923464004666
WOLFE (weak): th(12.926608140191302)=9.98923464004666; dx=-3.648031702459315E-5 evalInputDelta=3.5390703502002907E-4
New Minimum: 9.98923464004666 > 9.988174607300884
WOLFE (weak): th(51.70643256076521)=9.988174607300884; dx=-3.675519480076256E-5 evalInputDelta=0.0014139397807966247
New Minimum: 9.988174607300884 > 9.982528349849279
WOLFE (weak): th(258.53216280382605)=9.982528349849279; dx=-3.64830814446479E-5 evalInputDelta=0.007060197232402032
New Minimum: 9.982528349849279 > 9.947281752385218
WOLFE (weak): th(1551.1929768229563)=9.947281752385218; dx=-3.684461265716654E-5 evalInputDelta=0.04230679469646326
New Minimum: 9.947281752385218 > 9.692750782829991
WOLFE (weak): th(10858.350837760694)=9.692750782829991; dx=-3.6295786774749874E-5 evalInputDelta=0.2968377642516895
New Minimum: 9.692750782829991 > 8.314294317584622
END: th(86866.80670208555)=8.314294317584622; dx=-1.6921655945110046E-5 evalInputDelta=1.6752942294970588
Fitness changed from 9.98958854708168 to 8.314294317584622
Iteration 1 complete. Error: 8.314294317584622 Total: 10.3294; Orientation: 0.0381; Line Search: 7.6332
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/be2c8b24-98e7-48c0-80db-b4c129b943b2.jpg)
Adding measurement 41bb1f09 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=8.314294317584622;dx=-4.423404508889754E-5
New Minimum: 8.314294317584622 > 5.8168000275035645
END: th(187148.86177126726)=5.8168000275035645; dx=-1.0191213454395023E-5 evalInputDelta=2.4974942900810575
Fitness changed from 8.314294317584622 to 5.8168000275035645
Iteration 2 complete. Error: 5.8168000275035645 Total: 2.7351; Orientation: 0.0134; Line Search: 1.8953
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3be8fa10-1f8e-402a-8e67-7da3fc01d625.jpg)
Adding measurement 2d2fc130 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=5.8168000275035645;dx=-5.751779128723997E-5
New Minimum: 5.8168000275035645 > 4.093306262015478
END: th(403200.00000000006)=4.093306262015478; dx=-2.9477149640796484E-6 evalInputDelta=1.7234937654880866
Fitness changed from 5.8168000275035645 to 4.093306262015478
Iteration 3 complete. Error: 4.093306262015478 Total: 2.2421; Orientation: 0.0125; Line Search: 1.4708
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/9c617572-57e0-49a1-8123-a617f4551c52.jpg)
Adding measurement 4bf8b77 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.791e+03, gradient 7.656e-03, dot -0.215; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.093306262015478, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement 4bf8b77 to history. Total: 3
th(0)=4.093306262015478;dx=-5.74814804418332E-5
Armijo: th(868668.0670208557)=5.636722134095574; dx=3.4626921334453878E-6 evalInputDelta=-1.5434158720800966
New Minimum: 4.093306262015478 > 0.4790259479548489
END: th(434334.03351042786)=0.4790259479548489; dx=-2.7761633600542324E-6 evalInputDelta=3.614280314060629
Fitness changed from 4.093306262015478 to 0.4790259479548489
Iteration 4 complete. Error: 0.4790259479548489 Total: 3.6406; Orientation: 0.3744; Line Search: 2.5476
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/00a2c72f-9de2-413b-9a4b-836cd5d698eb.jpg)
Adding measurement 3c3ab672 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.305e+03, gradient 7.396e-03, dot -0.191; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.4790259479548489, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement 3c3ab672 to history. Total: 3
th(0)=0.4790259479548489;dx=-5.422163159934825E-5
Armijo: th(935744.3088563365)=3.3220660667783477; dx=3.4220000548451737E-6 evalInputDelta=-2.843040118823499
New Minimum: 0.4790259479548489 > -3.0020752040188228
END: th(467872.15442816826)=-3.0020752040188228; dx=-4.955013515886387E-6 evalInputDelta=3.4811011519736716
Fitness changed from 0.4790259479548489 to -3.0020752040188228
Iteration 5 complete. Error: -3.0020752040188228 Total: 3.4315; Orientation: 0.3070; Line Search: 2.3681
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/908c85ba-c9b4-411a-88bb-ae9122f7e16e.jpg)
Adding measurement 4331be30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.358e+03, gradient 7.223e-03, dot -0.186; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.0020752040188228, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement 4331be30 to history. Total: 3
th(0)=-3.0020752040188228;dx=-5.157164431197955E-5
Armijo: th(1008000.0000000003)=1.9374628554133349; dx=4.897311665281172E-6 evalInputDelta=-4.939538059432158
New Minimum: -3.0020752040188228 > -6.252787921540168
END: th(504000.0000000002)=-6.252787921540168; dx=-4.33832837074832E-6 evalInputDelta=3.2507127175213455
Fitness changed from -3.0020752040188228 to -6.252787921540168
Iteration 6 complete. Error: -6.252787921540168 Total: 3.7866; Orientation: 0.3430; Line Search: 2.4411
Adding measurement 6651efa4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.662e+03, gradient 7.358e-03, dot -0.167; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.252787921540168, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement 6651efa4 to history. Total: 3
th(0)=-6.252787921540168;dx=-5.378206444946407E-5
Armijo: th(1085835.0837760698)=1.166933360758179; dx=6.1445307746233386E-6 evalInputDelta=-7.419721282298347
New Minimum: -6.252787921540168 > -8.792159121577928
END: th(542917.5418880349)=-8.792159121577928; dx=-2.570051761485875E-6 evalInputDelta=2.5393712000377597
Fitness changed from -6.252787921540168 to -8.792159121577928
Iteration 7 complete. Error: -8.792159121577928 Total: 3.9467; Orientation: 0.3784; Line Search: 2.8133
Adding measurement 3831f4c2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.368e+03, gradient 7.423e-03, dot -0.152; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.792159121577928, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement 3831f4c2 to history. Total: 3
th(0)=-8.792159121577928;dx=-5.473398896634682E-5
Armijo: th(1169680.3860704207)=0.8336796944754674; dx=8.186507915275132E-6 evalInputDelta=-9.625838816053395
New Minimum: -8.792159121577928 > -10.970483245754249
END: th(584840.1930352104)=-10.970483245754249; dx=-1.5351673940067426E-7 evalInputDelta=2.1783241241763207
Fitness changed from -8.792159121577928 to -10.970483245754249
Iteration 8 complete. Error: -10.970483245754249 Total: 3.6450; Orientation: 0.3238; Line Search: 2.5211
Adding measurement 3945886e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.846e+03, gradient 7.488e-03, dot -0.144; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -10.970483245754249, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement 3945886e to history. Total: 3
th(0)=-10.970483245754249;dx=-5.573748417432722E-5
Armijo: th(1260000.0000000005)=0.10845587246592814; dx=9.047796676382724E-6 evalInputDelta=-11.078939118220177
New Minimum: -10.970483245754249 > -13.25389504409749
WOLF (strong): th(630000.0000000002)=-13.25389504409749; dx=3.66860501328353E-7 evalInputDelta=2.2834117983432414
New Minimum: -13.25389504409749 > -15.91141425906455
END: th(210000.0000000001)=-15.91141425906455; dx=-2.5328131388174936E-5 evalInputDelta=4.940931013310301
Fitness changed from -10.970483245754249 to -15.91141425906455
Iteration 9 complete. Error: -15.91141425906455 Total: 4.4175; Orientation: 0.3403; Line Search: 3.1149
Adding measurement 3506bc8b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.298e+04, gradient 6.224e-03, dot -0.182; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.91141425906455, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement 3506bc8b to history. Total: 3
th(0)=-15.91141425906455;dx=-3.834417389119617E-5
New Minimum: -15.91141425906455 > -19.10522106748229
END: th(452431.2849066958)=-19.10522106748229; dx=-1.043459092572683E-5 evalInputDelta=3.1938068084177402
Fitness changed from -15.91141425906455 to -19.10522106748229
Iteration 10 complete. Error: -19.10522106748229 Total: 2.7927; Orientation: 0.3121; Line Search: 1.7601
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9dd684e2-8add-40c4-887f-79c480043d01.jpg)
Adding measurement cae4952 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.718e+04, gradient 6.686e-03, dot -0.176; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.10522106748229, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement cae4952 to history. Total: 3
th(0)=-19.10522106748229;dx=-4.4410833466985956E-5
Armijo: th(974733.6550586841)=-12.437310202641218; dx=4.524523288055136E-6 evalInputDelta=-6.6679108648410725
New Minimum: -19.10522106748229 > -20.37458230538094
END: th(487366.82752934203)=-20.37458230538094; dx=-4.0990653302385665E-6 evalInputDelta=1.26936123789865
Fitness changed from -19.10522106748229 to -20.37458230538094
Iteration 11 complete. Error: -20.37458230538094 Total: 3.4840; Orientation: 0.3174; Line Search: 2.3964
Adding measurement 79f59e0e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.822e+04, gradient 7.064e-03, dot -0.158; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.37458230538094, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement 79f59e0e to history. Total: 3
th(0)=-20.37458230538094;dx=-4.951939103287192E-5
Armijo: th(1050000.0000000005)=-9.298278808515597; dx=8.786205800964463E-6 evalInputDelta=-11.076303496865343
New Minimum: -20.37458230538094 > -20.720441502810303
WOLF (strong): th(525000.0000000002)=-20.720441502810303; dx=3.78591477609953E-7 evalInputDelta=0.34585919742936255
New Minimum: -20.720441502810303 > -23.45306221635021
END: th(175000.0000000001)=-23.45306221635021; dx=-2.3964950168748406E-5 evalInputDelta=3.0784799109692713
Fitness changed from -20.37458230538094 to -23.45306221635021
Iteration 12 complete. Error: -23.45306221635021 Total: 4.4719; Orientation: 0.3089; Line Search: 3.4193
Adding measurement 2468c0e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.734e+04, gradient 5.960e-03, dot -0.204; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.45306221635021, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement 2468c0e4 to history. Total: 3
th(0)=-23.45306221635021;dx=-3.525774550263115E-5
New Minimum: -23.45306221635021 > -25.17264466319819
END: th(377026.07075557986)=-25.17264466319819; dx=-1.2250377734632178E-5 evalInputDelta=1.71958244684798
Fitness changed from -23.45306221635021 to -25.17264466319819
Iteration 13 complete. Error: -25.17264466319819 Total: 2.5633; Orientation: 0.3171; Line Search: 1.5721
Adding measurement 5af47414 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.464e+04, gradient 6.264e-03, dot -0.194; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.17264466319819, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement 5af47414 to history. Total: 3
th(0)=-25.17264466319819;dx=-3.893764567135045E-5
Armijo: th(812278.0458822368)=-20.435209377405414; dx=2.2179077899150266E-6 evalInputDelta=-4.7374352857927775
New Minimum: -25.17264466319819 > -25.943118374563923
END: th(406139.0229411184)=-25.943118374563923; dx=-6.607360627302688E-6 evalInputDelta=0.7704737113657316
Fitness changed from -25.17264466319819 to -25.943118374563923
Iteration 14 complete. Error: -25.943118374563923 Total: 3.8212; Orientation: 0.3080; Line Search: 2.7736
Adding measurement 3aae9e8f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.719e+04, gradient 6.754e-03, dot -0.175; [e84e4644-24fa-44ac-9333-e547831536ea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.943118374563923, 5.8168000275035645, 8.314294317584622, 9.98958854708168
LBFGS Accumulation History: 3 points
Removed measurement 3aae9e8f to history. Total: 3
th(0)=-25.943118374563923;dx=-4.536213552561561E-5
Armijo: th(875000.0000000006)=-17.904538408128587; dx=6.604167647770742E-6 evalInputDelta=-8.038579966435336
New Minimum: -25.943118374563923 > -26.13229924183529
END: th(437500.0000000003)=-26.13229924183529; dx=-1.0421812317676011E-6 evalInputDelta=0.18918086727136796
Fitness changed from -25.943118374563923 to -26.13229924183529
Iteration 15 complete. Error: -26.13229924183529 Total: 3.4474; Orientation: 0.3087; Line Search: 2.3694
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/15c7c5a3-1cff-413d-b9bf-ba3ce95e5353.jpg)
Final threshold in iteration 16: -26.13229924183529 (> -Infinity) after 58.780s (< 5400.000s)

Returns

    -26.13229924183529