Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 71.18 seconds (1.188 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: 138024030790199
Reset training subject: 138025210176100
Adding measurement 2161a5e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.5590092052623707;dx=-1.2492260491560724E-5
New Minimum: -2.5590092052623707 > -2.5590373557037887
WOLFE (weak): th(2.154434690031884)=-2.5590373557037887; dx=-1.2394131363881494E-5 evalInputDelta=2.815044141790679E-5
New Minimum: -2.5590373557037887 > -2.5590651614932947
WOLFE (weak): th(4.308869380063768)=-2.5590651614932947; dx=-1.2461104538689105E-5 evalInputDelta=5.5956230923914774E-5
New Minimum: -2.5590651614932947 > -2.5591771563665078
WOLFE (weak): th(12.926608140191302)=-2.5591771563665078; dx=-1.2371666856089016E-5 evalInputDelta=1.6795110413703185E-4
New Minimum: -2.5591771563665078 > -2.5596792222614337
WOLFE (weak): th(51.70643256076521)=-2.5596792222614337; dx=-1.2418044405005723E-5 evalInputDelta=6.700169990629945E-4
New Minimum: -2.5596792222614337 > -2.5623595156903463
WOLFE (weak): th(258.53216280382605)=-2.5623595156903463; dx=-1.2468916301728126E-5 evalInputDelta=0.0033503104279755114
New Minimum: -2.5623595156903463 > -2.579112240169574
WOLFE (weak): th(1551.1929768229563)=-2.579112240169574; dx=-1.2411527844785263E-5 evalInputDelta=0.02010303490720311
New Minimum: -2.579112240169574 > -2.7001212900980667
WOLFE (weak): th(10858.350837760694)=-2.7001212900980667; dx=-1.2487040982289039E-5 evalInputDelta=0.14111208483569593
New Minimum: -2.7001212900980667 > -3.660788477179525
END: th(86866.80670208555)=-3.660788477179525; dx=-1.0872424824233412E-5 evalInputDelta=1.1017792719171542
Fitness changed from -2.5590092052623707 to -3.660788477179525
Iteration 1 complete. Error: -3.660788477179525 Total: 11.1347; Orientation: 0.0151; Line Search: 8.2560
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4a2b3276-523d-47ae-b522-8642a7e232e0.jpg)
Adding measurement 67b4b072 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-3.660788477179525;dx=-1.337163961527389E-5
New Minimum: -3.660788477179525 > -5.78119322851791
END: th(187148.86177126726)=-5.78119322851791; dx=-8.216007155623816E-6 evalInputDelta=2.1204047513383855
Fitness changed from -3.660788477179525 to -5.78119322851791
Iteration 2 complete. Error: -5.78119322851791 Total: 2.8093; Orientation: 0.0148; Line Search: 1.7266
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3566b21d-a390-4c52-a8c3-72a312b58dec.jpg)
Adding measurement 3e709353 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-5.78119322851791;dx=-1.338700227084526E-5
New Minimum: -5.78119322851791 > -8.882656230748358
END: th(403200.00000000006)=-8.882656230748358; dx=-5.6218459180839164E-6 evalInputDelta=3.1014630022304477
Fitness changed from -5.78119322851791 to -8.882656230748358
Iteration 3 complete. Error: -8.882656230748358 Total: 2.8439; Orientation: 0.0155; Line Search: 1.7803
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/80f00a02-8d1d-4509-850e-af724a03f99e.jpg)
Adding measurement 2c1feb95 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.312e+04, gradient 4.017e-03, dot -0.351; [a16d3d8f-7325-442b-a733-9a846cd2203c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.882656230748358, -5.78119322851791, -3.660788477179525, -2.5590092052623707
LBFGS Accumulation History: 3 points
Removed measurement 2c1feb95 to history. Total: 3
th(0)=-8.882656230748358;dx=-1.592807859636187E-5
New Minimum: -8.882656230748358 > -12.21248376095922
END: th(868668.0670208557)=-12.21248376095922; dx=-2.611876161044291E-6 evalInputDelta=3.3298275302108618
Fitness changed from -8.882656230748358 to -12.21248376095922
Iteration 4 complete. Error: -12.21248376095922 Total: 3.1219; Orientation: 0.2839; Line Search: 1.9008
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/2e864dd6-dfb8-407f-9830-ae5a64f24800.jpg)
Adding measurement 332c8e2c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.328e+04, gradient 4.402e-03, dot -0.236; [a16d3d8f-7325-442b-a733-9a846cd2203c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.21248376095922, -5.78119322851791, -3.660788477179525, -2.5590092052623707
LBFGS Accumulation History: 3 points
Removed measurement 332c8e2c to history. Total: 3
th(0)=-12.21248376095922;dx=-1.9272425268487242E-5
New Minimum: -12.21248376095922 > -14.44973859985412
END: th(1871488.617712673)=-14.44973859985412; dx=-3.2128161554495226E-7 evalInputDelta=2.2372548388949003
Fitness changed from -12.21248376095922 to -14.44973859985412
Iteration 5 complete. Error: -14.44973859985412 Total: 2.9923; Orientation: 0.2847; Line Search: 1.7227
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7a3d8bec-5d73-427e-a6dc-1ed7a27b42d8.jpg)
Adding measurement 47ca28c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.498e+04, gradient 3.990e-03, dot -0.138; [a16d3d8f-7325-442b-a733-9a846cd2203c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.44973859985412, -5.78119322851791, -3.660788477179525, -2.5590092052623707
LBFGS Accumulation History: 3 points
Removed measurement 47ca28c1 to history. Total: 3
th(0)=-14.44973859985412;dx=-1.5854974886599942E-5
New Minimum: -14.44973859985412 > -15.262274836954004
WOLF (strong): th(4032000.0000000014)=-15.262274836954004; dx=1.03189065763948E-6 evalInputDelta=0.8125362370998843
New Minimum: -15.262274836954004 > -20.506518900191992
END: th(2016000.0000000007)=-20.506518900191992; dx=-2.3404456693639253E-8 evalInputDelta=6.056780300337872
Fitness changed from -14.44973859985412 to -20.506518900191992
Iteration 6 complete. Error: -20.506518900191992 Total: 3.9617; Orientation: 0.2715; Line Search: 2.7220
Adding measurement 15ef9a70 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.130e+04, gradient 3.742e-03, dot -0.147; [a16d3d8f-7325-442b-a733-9a846cd2203c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.506518900191992, -5.78119322851791, -3.660788477179525, -2.5590092052623707
LBFGS Accumulation History: 3 points
Removed measurement 15ef9a70 to history. Total: 3
th(0)=-20.506518900191992;dx=-1.394229392747287E-5
Armijo: th(4343340.335104279)=-19.294341988837967; dx=1.3511408366883085E-6 evalInputDelta=-1.2121769113540246
New Minimum: -20.506518900191992 > -26.01353696808494
WOLF (strong): th(2171670.1675521396)=-26.01353696808494; dx=4.982784438534323E-7 evalInputDelta=5.507018067892947
New Minimum: -26.01353696808494 > -26.807567659369564
END: th(723890.0558507132)=-26.807567659369564; dx=-5.135285236647853E-6 evalInputDelta=6.301048759177572
Fitness changed from -20.506518900191992 to -26.807567659369564
Iteration 7 complete. Error: -26.807567659369564 Total: 4.8274; Orientation: 0.2767; Line Search: 3.6998
Adding measurement 5ad34ed2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.461e+04, gradient 3.252e-03, dot -0.210; [a16d3d8f-7325-442b-a733-9a846cd2203c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.807567659369564, -5.78119322851791, -3.660788477179525, -2.5590092052623707
LBFGS Accumulation History: 3 points
Removed measurement 5ad34ed2 to history. Total: 3
th(0)=-26.807567659369564;dx=-1.0468315116079498E-5
New Minimum: -26.807567659369564 > -31.226670965314728
END: th(1559573.8480938943)=-31.226670965314728; dx=-1.8557458812685003E-6 evalInputDelta=4.419103305945164
Fitness changed from -26.807567659369564 to -31.226670965314728
Iteration 8 complete. Error: -31.226670965314728 Total: 3.2086; Orientation: 0.2746; Line Search: 2.0825
Adding measurement 5e4ac279 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.305e+05, gradient 3.747e-03, dot -0.237; [a16d3d8f-7325-442b-a733-9a846cd2203c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -31.226670965314728, -5.78119322851791, -3.660788477179525, -2.5590092052623707
LBFGS Accumulation History: 3 points
Removed measurement 5e4ac279 to history. Total: 3
th(0)=-31.226670965314728;dx=-1.3968769553996052E-5
Armijo: th(3360000.0000000014)=-26.882308602742523; dx=1.2351782915930755E-6 evalInputDelta=-4.344362362572205
New Minimum: -31.226670965314728 > -32.855499411121926
WOLF (strong): th(1680000.0000000007)=-32.855499411121926; dx=9.440358472930588E-7 evalInputDelta=1.6288284458071978
New Minimum: -32.855499411121926 > -35.06544184251925
END: th(560000.0000000002)=-35.06544184251925; dx=-3.868195795376667E-6 evalInputDelta=3.838770877204521
Fitness changed from -31.226670965314728 to -35.06544184251925
Iteration 9 complete. Error: -35.06544184251925 Total: 4.7391; Orientation: 0.2798; Line Search: 3.5962
Adding measurement 446c63b4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.915e+05, gradient 3.017e-03, dot -0.300; [a16d3d8f-7325-442b-a733-9a846cd2203c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -35.06544184251925, -5.78119322851791, -3.660788477179525, -2.5590092052623707
LBFGS Accumulation History: 3 points
Removed measurement 446c63b4 to history. Total: 3
th(0)=-35.06544184251925;dx=-9.059767326552185E-6
New Minimum: -35.06544184251925 > -37.91570447292172
END: th(1206483.4264178555)=-37.91570447292172; dx=-2.3035158442731985E-6 evalInputDelta=2.8502626304024687
Fitness changed from -35.06544184251925 to -37.91570447292172
Iteration 10 complete. Error: -37.91570447292172 Total: 3.1050; Orientation: 0.2736; Line Search: 1.7875
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/4c2cd737-61f1-4840-868e-353fb2a23120.jpg)
Adding measurement 21f1669b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.022e+06, gradient 3.458e-03, dot -0.280; [a16d3d8f-7325-442b-a733-9a846cd2203c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.91570447292172, -5.78119322851791, -3.660788477179525, -2.5590092052623707
LBFGS Accumulation History: 3 points
Removed measurement 21f1669b to history. Total: 3
th(0)=-37.91570447292172;dx=-1.1896394421255474E-5
Armijo: th(2599289.7468231576)=-34.237505764139584; dx=1.2435441453502885E-6 evalInputDelta=-3.6781987087821335
New Minimum: -37.91570447292172 > -39.00320477214821
WOLF (strong): th(1299644.8734115788)=-39.00320477214821; dx=4.87483964835356E-7 evalInputDelta=1.087500299226491
New Minimum: -39.00320477214821 > -40.231328300462295
END: th(433214.9578038596)=-40.231328300462295; dx=-3.928905296499275E-6 evalInputDelta=2.315623827540577
Fitness changed from -37.91570447292172 to -40.231328300462295
Iteration 11 complete. Error: -40.231328300462295 Total: 4.9822; Orientation: 0.2871; Line Search: 3.7454
Adding measurement 26a10abd to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.219e+05, gradient 2.833e-03, dot 0.374; [a16d3d8f-7325-442b-a733-9a846cd2203c = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-40.231328300462295;dx=-235.0362445941759
Armijo: th(933333.333333334)=-13.792021204046698; dx=1.1556023166517254E-5 evalInputDelta=-26.439307096415597
Armijo: th(466666.666666667)=-13.792021204046698; dx=2.3184881208749278E-5 evalInputDelta=-26.439307096415597
Armijo: th(155555.55555555565)=-13.79196242364882; dx=6.95518481624291E-5 evalInputDelta=-26.439365876813476
Armijo: th(38888.88888888891)=-13.791327068229478; dx=2.7690299096530985E-4 evalInputDelta=-26.440001232232817
Armijo: th(7777.777777777783)=-13.79265192750672; dx=0.0013985038381243123 evalInputDelta=-26.438676372955577
Armijo: th(1296.2962962962972)=-13.795822486008792; dx=0.008397422647804995 evalInputDelta=-26.435505814453503
Armijo: th(185.1851851851853)=-13.845429311155058; dx=0.05900504281093088 evalInputDelta=-26.385898989307236
Armijo: th(23.148148148148163)=-14.106540531360485; dx=0.4755883660603305 evalInputDelta=-26.124787769101808
Armijo: th(2.5720164609053513)=-15.672418271527246; dx=4.472749627633134 evalInputDelta=-24.55891002893505
Armijo: th(0.25720164609053514)=-25.860430234546204; dx=29.32601234851588 evalInputDelta=-14.37089806591609
New Minimum: -40.231328300462295 > -40.84213121905413
END: th(0.023381967826412286)=-40.84213121905413; dx=-17.609306691388102 evalInputDelta=0.6108029185918369
Fitness changed from -40.231328300462295 to -40.84213121905413
Iteration 12 complete. Error: -40.84213121905413 Total: 12.1760; Orientation: 0.2857; Line Search: 11.0542
Adding measurement 1422c17f to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.062e+06, gradient 3.283e-03, dot -0.165; [a16d3d8f-7325-442b-a733-9a846cd2203c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.84213121905413, -40.231328300462295, -5.78119322851791, -3.660788477179525, -2.5590092052623707
Rejected: LBFGS Orientation magnitude: 1.259e+06, gradient 3.283e-03, dot -0.271; [a16d3d8f-7325-442b-a733-9a846cd2203c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.84213121905413, -40.231328300462295, -5.78119322851791, -3.660788477179525
LBFGS Accumulation History: 3 points
Removed measurement 1422c17f to history. Total: 4
Removed measurement 26a10abd to history. Total: 3
th(0)=-40.84213121905413;dx=-1.0645536631249398E-5
Armijo: th(0.05037492260643203)=-40.84213121905413; dx=-7.208431930022471E-6 evalInputDelta=0.0
Armijo: th(0.025187461303216016)=-40.84213121905413; dx=-7.15496455495339E-6 evalInputDelta=0.0
Armijo: th(0.008395820434405338)=-40.84213121905413; dx=-7.198730373814745E-6 evalInputDelta=0.0
Armijo: th(0.0020989551086013345)=-40.84213121905413; dx=-7.1923923280346564E-6 evalInputDelta=0.0
Armijo: th(4.197910217202669E-4)=-40.84213121905413; dx=-7.199772884430333E-6 evalInputDelta=0.0
END: th(6.996517028671115E-5)=-40.84213121905413; dx=-7.2000618432728705E-6 evalInputDelta=0.0
Fitness changed from -40.84213121905413 to -40.84213121905413
Static Iteration Total: 7.8414; Orientation: 0.6050; Line Search: 6.3676
Iteration 13 failed. Error: -40.84213121905413
Previous Error: 0.0 -> -40.84213121905413
Retrying iteration 13
Reset training subject: 138091774312100
Adding measurement 4c5c067a to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-40.84213121905413;dx=-1.0699383097383915E-5
END: th(1.507353899596785E-4)=-40.84213121905413; dx=-7.223601153981931E-6 evalInputDelta=0.0
Fitness changed from -40.84213121905413 to -40.84213121905413
Static Iteration Total: 3.4341; Orientation: 0.0144; Line Search: 1.7520
Iteration 14 failed. Error: -40.84213121905413
Previous Error: 0.0 -> -40.84213121905413
Optimization terminated 14
Final threshold in iteration 14: -40.84213121905413 (> -Infinity) after 71.178s (< 5400.000s)

Returns

    -40.84213121905413