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.98 seconds (0.220 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: 145903068534500
Reset training subject: 145903197682200
Adding measurement 7717b3b8 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-74.7184363230555;dx=-0.2706342316328283
New Minimum: -74.7184363230555 > -75.60167835128563
WOLFE (weak): th(2.154434690031884)=-75.60167835128563; dx=-0.27626123646797296 evalInputDelta=0.8832420282301285
New Minimum: -75.60167835128563 > -76.49196048952628
WOLFE (weak): th(4.308869380063768)=-76.49196048952628; dx=-0.27495081106161634 evalInputDelta=1.7735241664707786
New Minimum: -76.49196048952628 > -80.11046145888969
WOLFE (weak): th(12.926608140191302)=-80.11046145888969; dx=-0.2804166397092389 evalInputDelta=5.392025135834189
New Minimum: -80.11046145888969 > -96.7237226104589
WOLFE (weak): th(51.70643256076521)=-96.7237226104589; dx=-0.28033676145898323 evalInputDelta=22.005286287403408
New Minimum: -96.7237226104589 > -160.55206880284976
END: th(258.53216280382605)=-160.55206880284976; dx=-0.08521218862076085 evalInputDelta=85.83363247979426
Fitness changed from -74.7184363230555 to -160.55206880284976
Iteration 1 complete. Error: -160.55206880284976 Total: 1.0321; Orientation: 0.0014; Line Search: 0.6828
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/859f0447-3b26-41e5-b449-82d9f25732ef.jpg)
Adding measurement 25dbd846 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-160.55206880284976;dx=-0.4042383263248867
New Minimum: -160.55206880284976 > -230.14024256961233
END: th(556.9906600335335)=-230.14024256961233; dx=-0.02404280939094401 evalInputDelta=69.58817376676257
Fitness changed from -160.55206880284976 to -230.14024256961233
Iteration 2 complete. Error: -230.14024256961233 Total: 0.3429; Orientation: 0.0015; Line Search: 0.2257
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/9a00e092-3b27-4e03-97b2-c8a4f3d1852e.jpg)
Adding measurement 2b68a25c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-230.14024256961233;dx=-0.55338835185421
New Minimum: -230.14024256961233 > -244.79266577810293
WOLF (strong): th(1200.0)=-244.79266577810293; dx=0.0330540687562239 evalInputDelta=14.652423208490603
New Minimum: -244.79266577810293 > -311.2183091296205
WOLF (strong): th(600.0)=-311.2183091296205; dx=0.024665619894332892 evalInputDelta=81.07806656000815
New Minimum: -311.2183091296205 > -330.8391201739903
END: th(200.0)=-330.8391201739903; dx=-0.13181050469889286 evalInputDelta=100.69887760437797
Fitness changed from -230.14024256961233 to -330.8391201739903
Iteration 3 complete. Error: -330.8391201739903 Total: 0.8387; Orientation: 0.0015; Line Search: 0.7156
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f67d73a5-99a5-4420-87db-6096b69d774b.jpg)
Adding measurement 2e65702f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.510e+02, gradient 5.331e-01, dot -0.386; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -330.8391201739903, -230.14024256961233, -160.55206880284976, -74.7184363230555
LBFGS Accumulation History: 3 points
Removed measurement 2e65702f to history. Total: 3
th(0)=-330.8391201739903;dx=-0.2772156539744718
New Minimum: -330.8391201739903 > -440.0200812178917
END: th(430.88693800637674)=-440.0200812178917; dx=-0.08545925400767984 evalInputDelta=109.18096104390139
Fitness changed from -330.8391201739903 to -440.0200812178917
Iteration 4 complete. Error: -440.0200812178917 Total: 0.3840; Orientation: 0.0306; Line Search: 0.2313
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e4f8a1c1-db1a-4eb7-9f0c-6fa61be20d96.jpg)
Adding measurement e5b244 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.983e+03, gradient 7.520e-01, dot -0.379; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -440.0200812178917, -230.14024256961233, -160.55206880284976, -74.7184363230555
LBFGS Accumulation History: 3 points
Removed measurement e5b244 to history. Total: 3
th(0)=-440.0200812178917;dx=-0.5572061566915703
New Minimum: -440.0200812178917 > -455.4829168036931
WOLF (strong): th(928.3177667225558)=-455.4829168036931; dx=0.027261974430562025 evalInputDelta=15.462835585801429
New Minimum: -455.4829168036931 > -512.4806398782299
WOLF (strong): th(464.1588833612779)=-512.4806398782299; dx=0.033344091947041174 evalInputDelta=72.46055866033822
END: th(154.71962778709263)=-510.0786397703789; dx=-0.168666790248553 evalInputDelta=70.05855855248723
Fitness changed from -440.0200812178917 to -512.4806398782299
Iteration 5 complete. Error: -512.4806398782299 Total: 0.6026; Orientation: 0.0289; Line Search: 0.4534
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/eaab6825-ef98-4564-baf7-2c0c2fd5c7c6.jpg)
Adding measurement 7e6cac7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.442e+03, gradient 7.680e-01, dot -0.296; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -512.4806398782299, -230.14024256961233, -160.55206880284976, -74.7184363230555
LBFGS Accumulation History: 3 points
Removed measurement 7e6cac7 to history. Total: 3
th(0)=-512.4806398782299;dx=-0.5797551028527337
New Minimum: -512.4806398782299 > -662.3630754729614
END: th(333.33333333333337)=-662.3630754729614; dx=-0.09687674422087891 evalInputDelta=149.88243559473153
Fitness changed from -512.4806398782299 to -662.3630754729614
Iteration 6 complete. Error: -662.3630754729614 Total: 0.3727; Orientation: 0.0284; Line Search: 0.2260
Adding measurement fe73be4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.524e+03, gradient 6.165e-01, dot -0.434; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -662.3630754729614, -230.14024256961233, -160.55206880284976, -74.7184363230555
LBFGS Accumulation History: 3 points
Removed measurement fe73be4 to history. Total: 3
th(0)=-662.3630754729614;dx=-0.37511852772631454
New Minimum: -662.3630754729614 > -795.575577805151
END: th(718.1448966772947)=-795.575577805151; dx=-2.8713752661680206E-4 evalInputDelta=133.21250233218962
Fitness changed from -662.3630754729614 to -795.575577805151
Iteration 7 complete. Error: -795.575577805151 Total: 0.3728; Orientation: 0.0276; Line Search: 0.2330
Adding measurement 5d34ff08 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.999e+03, gradient 9.752e-01, dot -0.329; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -795.575577805151, -230.14024256961233, -160.55206880284976, -74.7184363230555
LBFGS Accumulation History: 3 points
Removed measurement 5d34ff08 to history. Total: 3
th(0)=-795.575577805151;dx=-0.9333298082075238
Armijo: th(1547.1962778709267)=-600.5896841854678; dx=0.06275541754441433 evalInputDelta=-194.98589361968322
New Minimum: -795.575577805151 > -804.447830813161
WOLF (strong): th(773.5981389354633)=-804.447830813161; dx=0.10216759663912359 evalInputDelta=8.87225300800992
New Minimum: -804.447830813161 > -954.5060240773759
END: th(257.8660463118211)=-954.5060240773759; dx=-0.1283278248529883 evalInputDelta=158.9304462722248
Fitness changed from -795.575577805151 to -954.5060240773759
Iteration 8 complete. Error: -954.5060240773759 Total: 0.5938; Orientation: 0.0282; Line Search: 0.4563
Adding measurement 282b83a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.844e+04, gradient 6.663e-01, dot -0.449; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -954.5060240773759, -230.14024256961233, -160.55206880284976, -74.7184363230555
LBFGS Accumulation History: 3 points
Removed measurement 282b83a1 to history. Total: 3
th(0)=-954.5060240773759;dx=-0.4361086259720797
New Minimum: -954.5060240773759 > -1092.900269924022
END: th(555.5555555555557)=-1092.900269924022; dx=-0.0777142105195351 evalInputDelta=138.39424584664619
Fitness changed from -954.5060240773759 to -1092.900269924022
Iteration 9 complete. Error: -1092.900269924022 Total: 0.3655; Orientation: 0.0270; Line Search: 0.2263
Adding measurement 23c86936 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.989e+05, gradient 8.944e-01, dot -0.383; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1092.900269924022, -230.14024256961233, -160.55206880284976, -74.7184363230555
LBFGS Accumulation History: 3 points
Removed measurement 23c86936 to history. Total: 3
th(0)=-1092.900269924022;dx=-0.7900900879641222
Armijo: th(1196.9081611288245)=-961.6570659543869; dx=0.06436427439093526 evalInputDelta=-131.24320396963515
New Minimum: -1092.900269924022 > -1148.7995908773644
WOLF (strong): th(598.4540805644123)=-1148.7995908773644; dx=0.09795016325570655 evalInputDelta=55.89932095334234
New Minimum: -1148.7995908773644 > -1210.8211056964608
END: th(199.48469352147075)=-1210.8211056964608; dx=-0.24712027478597912 evalInputDelta=117.92083577243875
Fitness changed from -1092.900269924022 to -1210.8211056964608
Iteration 10 complete. Error: -1210.8211056964608 Total: 0.5944; Orientation: 0.0281; Line Search: 0.4539
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e0689935-a630-4751-8ed0-5f0f6c6357c3.jpg)
Adding measurement 45291469 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.288e+04, gradient 6.428e-01, dot -0.478; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1210.8211056964608, -230.14024256961233, -160.55206880284976, -74.7184363230555
LBFGS Accumulation History: 3 points
Removed measurement 45291469 to history. Total: 3
th(0)=-1210.8211056964608;dx=-0.40165883648065775
New Minimum: -1210.8211056964608 > -1303.2294502504153
END: th(429.77674385303516)=-1303.2294502504153; dx=-0.19205575564378943 evalInputDelta=92.40834455395452
Fitness changed from -1210.8211056964608 to -1303.2294502504153
Iteration 11 complete. Error: -1303.2294502504153 Total: 0.3755; Orientation: 0.0273; Line Search: 0.2293
Adding measurement 7c34aab2 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.710e+03, gradient 7.380e-01, dot 0.652; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1303.2294502504153;dx=-1283.6033832234511
Armijo: th(925.9259259259261)=-338.28399681332843; dx=0.8047580555705234 evalInputDelta=-964.9454534370868
Armijo: th(462.96296296296305)=-332.875410720738; dx=1.498772825206398 evalInputDelta=-970.3540395296773
Armijo: th(154.32098765432102)=-341.103551451022; dx=4.71375152173942 evalInputDelta=-962.1258987993933
Armijo: th(38.580246913580254)=-407.38736940410905; dx=19.943582756905787 evalInputDelta=-895.8420808463063
Armijo: th(7.716049382716051)=-896.208402102993; dx=57.88992061768231 evalInputDelta=-407.02104814742233
New Minimum: -1303.2294502504153 > -1835.1258812408482
END: th(1.2860082304526752)=-1835.1258812408482; dx=-180.2451790501314 evalInputDelta=531.8964309904329
Fitness changed from -1303.2294502504153 to -1835.1258812408482
Iteration 12 complete. Error: -1835.1258812408482 Total: 0.9355; Orientation: 0.0279; Line Search: 0.7937
Adding measurement 4aeaa1fb to history. Total: 4
Rejected: LBFGS Orientation magnitude: 2.271e+04, gradient 8.964e-01, dot -0.295; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1835.1258812408482, -1303.2294502504153, -230.14024256961233, -160.55206880284976, -74.7184363230555
Rejected: LBFGS Orientation magnitude: 2.627e+04, gradient 8.964e-01, dot -0.425; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1835.1258812408482, -1303.2294502504153, -230.14024256961233, -160.55206880284976
LBFGS Accumulation History: 3 points
Removed measurement 4aeaa1fb to history. Total: 4
Removed measurement 7c34aab2 to history. Total: 3
th(0)=-1835.1258812408482;dx=-0.7945900815707129
New Minimum: -1835.1258812408482 > -1837.4539450010714
END: th(2.770620743353761)=-1837.4539450010714; dx=-0.5827770466473685 evalInputDelta=2.328063760223131
Fitness changed from -1835.1258812408482 to -1837.4539450010714
Iteration 13 complete. Error: -1837.4539450010714 Total: 0.4100; Orientation: 0.0665; Line Search: 0.2348
Adding measurement 38b7bc14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.913e+04, gradient 8.996e-01, dot -0.239; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1837.4539450010714, -230.14024256961233, -160.55206880284976, -74.7184363230555
LBFGS Accumulation History: 3 points
Removed measurement 38b7bc14 to history. Total: 3
th(0)=-1837.4539450010714;dx=-0.7998156583612996
New Minimum: -1837.4539450010714 > -1842.4519668094472
END: th(5.969121442403267)=-1842.4519668094472; dx=-0.5815870460018435 evalInputDelta=4.9980218083758245
Fitness changed from -1837.4539450010714 to -1842.4519668094472
Iteration 14 complete. Error: -1842.4519668094472 Total: 0.3814; Orientation: 0.0303; Line Search: 0.2312
Adding measurement 57d06698 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.476e+04, gradient 9.024e-01, dot -0.242; [e404df05-90b4-40fb-8c88-cce33ad806f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1842.4519668094472, -230.14024256961233, -160.55206880284976, -74.7184363230555
LBFGS Accumulation History: 3 points
Removed measurement 57d06698 to history. Total: 3
th(0)=-1842.4519668094472;dx=-0.7996083863776946
New Minimum: -1842.4519668094472 > -1853.1662769433292
END: th(12.860082304526754)=-1853.1662769433292; dx=-0.5727841593915335 evalInputDelta=10.714310133882009
Fitness changed from -1842.4519668094472 to -1853.1662769433292
Iteration 15 complete. Error: -1853.1662769433292 Total: 0.3654; Orientation: 0.0274; Line Search: 0.2267
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/5472a93e-0323-4d18-b4cd-a10a22a2bf28.jpg)
Final threshold in iteration 16: -1853.1662769433292 (> -Infinity) after 7.984s (< 5400.000s)

Returns

    -1853.1662769433292