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 57.03 seconds (1.468 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: 212080474723300
Reset training subject: 212081339510800
Adding measurement 6726beca to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=113.32394164104574;dx=-1.5357430724111153E-4
New Minimum: 113.32394164104574 > 113.32363473766674
WOLFE (weak): th(2.154434690031884)=113.32363473766674; dx=-1.53578913332919E-4 evalInputDelta=3.0690337899841325E-4
New Minimum: 113.32363473766674 > 113.32330408493185
WOLFE (weak): th(4.308869380063768)=113.32330408493185; dx=-1.535766367082197E-4 evalInputDelta=6.37556113886717E-4
New Minimum: 113.32330408493185 > 113.32204095712629
WOLFE (weak): th(12.926608140191302)=113.32204095712629; dx=-1.5356550702825124E-4 evalInputDelta=0.0019006839194446457
New Minimum: 113.32204095712629 > 113.31629130260244
WOLFE (weak): th(51.70643256076521)=113.31629130260244; dx=-1.535700188986299E-4 evalInputDelta=0.00765033844329821
New Minimum: 113.31629130260244 > 113.28571422492617
WOLFE (weak): th(258.53216280382605)=113.28571422492617; dx=-1.535440651168206E-4 evalInputDelta=0.03822741611956815
New Minimum: 113.28571422492617 > 113.09476504295671
WOLFE (weak): th(1551.1929768229563)=113.09476504295671; dx=-1.5331106899663788E-4 evalInputDelta=0.22917659808902613
New Minimum: 113.09476504295671 > 111.73171968401329
WOLFE (weak): th(10858.350837760694)=111.73171968401329; dx=-1.5154436672185114E-4 evalInputDelta=1.59222195703245
New Minimum: 111.73171968401329 > 101.72109506428235
END: th(86866.80670208555)=101.72109506428235; dx=-1.2934856226475604E-4 evalInputDelta=11.602846576763383
Fitness changed from 113.32394164104574 to 101.72109506428235
Iteration 1 complete. Error: 101.72109506428235 Total: 9.3909; Orientation: 0.0164; Line Search: 6.9469
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c9dc44d6-e7bf-4b1d-a52d-0a39bcb11f04.jpg)
Adding measurement 778d4db7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=101.72109506428235;dx=-1.3273454854295628E-4
New Minimum: 101.72109506428235 > 85.14618632164154
END: th(187148.86177126726)=85.14618632164154; dx=-7.215672918471431E-5 evalInputDelta=16.574908742640815
Fitness changed from 101.72109506428235 to 85.14618632164154
Iteration 2 complete. Error: 85.14618632164154 Total: 2.3850; Orientation: 0.0164; Line Search: 1.6569
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/425c4d84-1b96-4162-b635-e581eec1fb37.jpg)
Adding measurement 453f92db to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=85.14618632164154;dx=-9.874389776437831E-5
New Minimum: 85.14618632164154 > 77.04503606882301
END: th(403200.00000000006)=77.04503606882301; dx=-9.648327324242956E-6 evalInputDelta=8.101150252818528
Fitness changed from 85.14618632164154 to 77.04503606882301
Iteration 3 complete. Error: 77.04503606882301 Total: 2.5423; Orientation: 0.0197; Line Search: 1.6904
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/60e64d02-d731-4e85-9381-fc48246f7155.jpg)
Adding measurement 2cf482de to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.016e+03, gradient 9.989e-03, dot -0.329; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 77.04503606882301, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement 2cf482de to history. Total: 3
th(0)=77.04503606882301;dx=-9.97164761394783E-5
Armijo: th(868668.0670208557)=123.5034217281409; dx=6.52426426524111E-5 evalInputDelta=-46.4583856593179
Armijo: th(434334.03351042786)=77.66550172277604; dx=1.4843859864063056E-5 evalInputDelta=-0.6204656539530333
New Minimum: 77.04503606882301 > 69.12443550009228
END: th(144778.01117014262)=69.12443550009228; dx=-5.2905462923417124E-5 evalInputDelta=7.920600568730734
Fitness changed from 77.04503606882301 to 69.12443550009228
Iteration 4 complete. Error: 69.12443550009228 Total: 4.4555; Orientation: 0.3118; Line Search: 3.3143
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e38cc710-1b32-4803-a113-758107eaf57b.jpg)
Adding measurement 3b0e19f0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.397e+03, gradient 7.979e-03, dot -0.318; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 69.12443550009228, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement 3b0e19f0 to history. Total: 3
th(0)=69.12443550009228;dx=-6.362071653042297E-5
New Minimum: 69.12443550009228 > 65.81915448962216
END: th(311914.76961877884)=65.81915448962216; dx=-1.3591520806220025E-5 evalInputDelta=3.305281010470111
Fitness changed from 69.12443550009228 to 65.81915448962216
Iteration 5 complete. Error: 65.81915448962216 Total: 2.6267; Orientation: 0.3233; Line Search: 1.5975
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1001754c-bf2b-4b13-906c-8f9b973168c5.jpg)
Adding measurement 7a4822f2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.321e+03, gradient 8.184e-03, dot -0.284; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 65.81915448962216, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement 7a4822f2 to history. Total: 3
th(0)=65.81915448962216;dx=-6.692974587860905E-5
Armijo: th(672000.0000000002)=85.31797476867487; dx=3.138517281738361E-5 evalInputDelta=-19.49882027905271
New Minimum: 65.81915448962216 > 65.25382293434937
WOLF (strong): th(336000.0000000001)=65.25382293434937; dx=1.5559591851519243E-6 evalInputDelta=0.5653315552727918
New Minimum: 65.25382293434937 > 61.933159389963485
END: th(112000.00000000004)=61.933159389963485; dx=-3.9031113777625125E-5 evalInputDelta=3.885995099658679
Fitness changed from 65.81915448962216 to 61.933159389963485
Iteration 6 complete. Error: 61.933159389963485 Total: 4.1830; Orientation: 0.3106; Line Search: 3.1562
Adding measurement 69942950 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.652e+03, gradient 6.762e-03, dot -0.320; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 61.933159389963485, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement 69942950 to history. Total: 3
th(0)=61.933159389963485;dx=-4.569011167560223E-5
New Minimum: 61.933159389963485 > 59.73485361924591
END: th(241296.68528357107)=59.73485361924591; dx=-1.4291896912815654E-5 evalInputDelta=2.1983057707175746
Fitness changed from 61.933159389963485 to 59.73485361924591
Iteration 7 complete. Error: 59.73485361924591 Total: 2.6701; Orientation: 0.3135; Line Search: 1.6661
Adding measurement a5eade4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.229e+03, gradient 7.106e-03, dot -0.292; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 59.73485361924591, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement a5eade4 to history. Total: 3
th(0)=59.73485361924591;dx=-5.0439049890780996E-5
Armijo: th(519857.9493646315)=68.5806700296501; dx=1.5102619098806084E-5 evalInputDelta=-8.845816410404183
New Minimum: 59.73485361924591 > 59.0636330292945
END: th(259928.97468231575)=59.0636330292945; dx=-3.2803257312606553E-6 evalInputDelta=0.6712205899514103
Fitness changed from 59.73485361924591 to 59.0636330292945
Iteration 8 complete. Error: 59.0636330292945 Total: 3.2857; Orientation: 0.3091; Line Search: 2.2797
Adding measurement 2538598 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.177e+03, gradient 7.608e-03, dot -0.265; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 59.0636330292945, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement 2538598 to history. Total: 3
th(0)=59.0636330292945;dx=-5.781351834703746E-5
Armijo: th(560000.0000000003)=73.52349389960058; dx=2.956378793263769E-5 evalInputDelta=-14.45986087030608
Armijo: th(280000.0000000002)=59.12828923875382; dx=5.920241704069829E-6 evalInputDelta=-0.06465620945932216
New Minimum: 59.0636330292945 > 56.32940704933497
END: th(93333.33333333339)=56.32940704933497; dx=-3.2186081084138366E-5 evalInputDelta=2.7342259799595325
Fitness changed from 59.0636330292945 to 56.32940704933497
Iteration 9 complete. Error: 56.32940704933497 Total: 4.3466; Orientation: 0.3080; Line Search: 3.0351
Adding measurement 6e19792e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.404e+03, gradient 6.177e-03, dot -0.299; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 56.32940704933497, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement 6e19792e to history. Total: 3
th(0)=56.32940704933497;dx=-3.8117713174149674E-5
New Minimum: 56.32940704933497 > 55.08971445188504
END: th(201080.5710696426)=55.08971445188504; dx=-9.52161221135987E-6 evalInputDelta=1.239692597449931
Fitness changed from 56.32940704933497 to 55.08971445188504
Iteration 10 complete. Error: 55.08971445188504 Total: 2.5354; Orientation: 0.3187; Line Search: 1.5405
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/7d254d14-cb26-47e6-b158-4b9467fdf3cb.jpg)
Adding measurement 22fef226 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.142e+03, gradient 6.529e-03, dot -0.280; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 55.08971445188504, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement 22fef226 to history. Total: 3
th(0)=55.08971445188504;dx=-4.257130581614107E-5
Armijo: th(433214.95780385967)=61.48127825979567; dx=1.2449103623011707E-5 evalInputDelta=-6.391563807910636
New Minimum: 55.08971445188504 > 54.81702892536535
END: th(216607.47890192983)=54.81702892536535; dx=-1.9514744687868983E-6 evalInputDelta=0.27268552651968747
Fitness changed from 55.08971445188504 to 54.81702892536535
Iteration 11 complete. Error: 54.81702892536535 Total: 3.9677; Orientation: 0.3073; Line Search: 2.9217
Adding measurement 5668b3a5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.350e+03, gradient 7.092e-03, dot -0.259; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 54.81702892536535, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement 5668b3a5 to history. Total: 3
th(0)=54.81702892536535;dx=-5.0245131695787147E-5
Armijo: th(466666.66666666704)=64.789431967717; dx=2.2485632692696075E-5 evalInputDelta=-9.972403042351644
Armijo: th(233333.33333333352)=55.1302776666038; dx=4.8822510596587835E-6 evalInputDelta=-0.3132487412384535
New Minimum: 54.81702892536535 > 52.99227494346902
END: th(77777.77777777784)=52.99227494346902; dx=-2.697077950767601E-5 evalInputDelta=1.824753981896329
Fitness changed from 54.81702892536535 to 52.99227494346902
Iteration 12 complete. Error: 52.99227494346902 Total: 3.9560; Orientation: 0.2964; Line Search: 2.9776
Adding measurement 2b3a7b20 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.449e+03, gradient 5.703e-03, dot -0.292; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 52.99227494346902, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement 2b3a7b20 to history. Total: 3
th(0)=52.99227494346902;dx=-3.249084778501569E-5
New Minimum: 52.99227494346902 > 52.238677999408814
END: th(167567.14255803553)=52.238677999408814; dx=-8.334874958847343E-6 evalInputDelta=0.7535969440602059
Fitness changed from 52.99227494346902 to 52.238677999408814
Iteration 13 complete. Error: 52.238677999408814 Total: 2.8053; Orientation: 0.4730; Line Search: 1.6307
Adding measurement 669d5b4c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.291e+03, gradient 6.051e-03, dot -0.275; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 52.238677999408814, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement 669d5b4c to history. Total: 3
th(0)=52.238677999408814;dx=-3.656618738143577E-5
Armijo: th(361012.46483654977)=56.45628609867454; dx=8.611478711736226E-6 evalInputDelta=-4.217608099265725
New Minimum: 52.238677999408814 > 52.0508902995616
END: th(180506.23241827489)=52.0508902995616; dx=-2.705154504278508E-6 evalInputDelta=0.18778769984721322
Fitness changed from 52.238677999408814 to 52.0508902995616
Iteration 14 complete. Error: 52.0508902995616 Total: 3.4019; Orientation: 0.3140; Line Search: 2.3063
Adding measurement 684f26c4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.349e+03, gradient 6.472e-03, dot -0.259; [552fb576-db04-4333-be8e-5af6c90a8514 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 52.0508902995616, 85.14618632164154, 101.72109506428235, 113.32394164104574
LBFGS Accumulation History: 3 points
Removed measurement 684f26c4 to history. Total: 3
th(0)=52.0508902995616;dx=-4.184859019431211E-5
Armijo: th(388888.8888888892)=58.20024433456729; dx=1.5088275240204448E-5 evalInputDelta=-6.149354035005686
Armijo: th(194444.4444444446)=52.14193037343134; dx=1.89003383741189E-6 evalInputDelta=-0.09104007386974189
New Minimum: 52.0508902995616 > 50.83169052063556
END: th(64814.81481481487)=50.83169052063556; dx=-2.2651287487037388E-5 evalInputDelta=1.2191997789260398
Fitness changed from 52.0508902995616 to 50.83169052063556
Iteration 15 complete. Error: 50.83169052063556 Total: 4.4537; Orientation: 0.3182; Line Search: 3.4584
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/6dda50bc-65b0-4851-ab02-186a4937d604.jpg)
Final threshold in iteration 16: 50.83169052063556 (> -Infinity) after 57.028s (< 5400.000s)

Returns

    50.83169052063556