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 45.40 seconds (0.958 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: 224854783308900
Reset training subject: 224855432144900
Adding measurement 31e1a80 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-3.0251444978622493;dx=-5.06787811605351E-4
New Minimum: -3.0251444978622493 > -3.0261926430919304
WOLFE (weak): th(2.154434690031884)=-3.0261926430919304; dx=-5.064021334419762E-4 evalInputDelta=0.0010481452296811078
New Minimum: -3.0261926430919304 > -3.0272381871695693
WOLFE (weak): th(4.308869380063768)=-3.0272381871695693; dx=-5.057088960258428E-4 evalInputDelta=0.0020936893073200125
New Minimum: -3.0272381871695693 > -3.031420937852243
WOLFE (weak): th(12.926608140191302)=-3.031420937852243; dx=-5.056161333097275E-4 evalInputDelta=0.006276439989993943
New Minimum: -3.031420937852243 > -3.0502018331010166
WOLFE (weak): th(51.70643256076521)=-3.0502018331010166; dx=-5.056609310955115E-4 evalInputDelta=0.025057335238767298
New Minimum: -3.0502018331010166 > -3.151429422730443
WOLFE (weak): th(258.53216280382605)=-3.151429422730443; dx=-4.958497235605893E-4 evalInputDelta=0.12628492486819365
New Minimum: -3.151429422730443 > -3.83508820726454
WOLFE (weak): th(1551.1929768229563)=-3.83508820726454; dx=-5.122621715838401E-4 evalInputDelta=0.8099437094022908
New Minimum: -3.83508820726454 > -7.865657209962596
END: th(10858.350837760694)=-7.865657209962596; dx=-3.0441663661842617E-4 evalInputDelta=4.840512712100347
Fitness changed from -3.0251444978622493 to -7.865657209962596
Iteration 1 complete. Error: -7.865657209962596 Total: 7.0075; Orientation: 0.0197; Line Search: 5.1618
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/062929c0-dcbb-49d9-b34a-f0b448cde5ad.jpg)
Adding measurement 48465eca to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-7.865657209962596;dx=-4.019707033295804E-4
New Minimum: -7.865657209962596 > -13.488442498226703
END: th(23393.607721408407)=-13.488442498226703; dx=-1.8882365580391165E-4 evalInputDelta=5.622785288264107
Fitness changed from -7.865657209962596 to -13.488442498226703
Iteration 2 complete. Error: -13.488442498226703 Total: 1.9463; Orientation: 0.0171; Line Search: 1.3145
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/4e2744bf-2839-416d-a080-adfe972f0ab9.jpg)
Adding measurement 7d3d7b07 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-13.488442498226703;dx=-3.0816341947026074E-4
New Minimum: -13.488442498226703 > -18.81686115872785
END: th(50400.00000000001)=-18.81686115872785; dx=-1.0395041498834393E-4 evalInputDelta=5.328418660501146
Fitness changed from -13.488442498226703 to -18.81686115872785
Iteration 3 complete. Error: -18.81686115872785 Total: 2.1940; Orientation: 0.0167; Line Search: 1.5524
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f52ea78e-6ba2-4f76-b737-8ad431fc077e.jpg)
Adding measurement 28a0dafd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.720e+03, gradient 1.709e-02, dot -0.374; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.81686115872785, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 28a0dafd to history. Total: 3
th(0)=-18.81686115872785;dx=-2.914611646551358E-4
New Minimum: -18.81686115872785 > -22.549653402381658
END: th(108583.50837760697)=-22.549653402381658; dx=-4.00916001714301E-5 evalInputDelta=3.732792243653808
Fitness changed from -18.81686115872785 to -22.549653402381658
Iteration 4 complete. Error: -22.549653402381658 Total: 2.1865; Orientation: 0.3017; Line Search: 1.2600
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/87c63f8b-a129-4439-b496-401efc0863b0.jpg)
Adding measurement 65ce0497 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.328e+03, gradient 1.556e-02, dot -0.256; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -22.549653402381658, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 65ce0497 to history. Total: 3
th(0)=-22.549653402381658;dx=-2.4109920667188364E-4
Armijo: th(233936.07721408413)=-22.247154546253512; dx=-8.577985808836808E-6 evalInputDelta=-0.3024988561281461
New Minimum: -22.549653402381658 > -28.642790568228808
END: th(116968.03860704206)=-28.642790568228808; dx=-4.836787133317806E-5 evalInputDelta=6.09313716584715
Fitness changed from -22.549653402381658 to -28.642790568228808
Iteration 5 complete. Error: -28.642790568228808 Total: 2.8767; Orientation: 0.3162; Line Search: 1.9536
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/06bf8e1b-1656-452b-a8cf-b0b66b0bcf03.jpg)
Adding measurement 89a6e34 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.867e+03, gradient 1.568e-02, dot -0.259; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.642790568228808, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 89a6e34 to history. Total: 3
th(0)=-28.642790568228808;dx=-2.4420735435679795E-4
Armijo: th(252000.0000000001)=-25.16215470159192; dx=-8.66865723125643E-6 evalInputDelta=-3.480635866636888
New Minimum: -28.642790568228808 > -33.41868718581048
END: th(126000.00000000004)=-33.41868718581048; dx=-4.58536493718598E-5 evalInputDelta=4.775896617581669
Fitness changed from -28.642790568228808 to -33.41868718581048
Iteration 6 complete. Error: -33.41868718581048 Total: 2.8330; Orientation: 0.3047; Line Search: 1.9364
Adding measurement 26562cb3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.351e+03, gradient 1.537e-02, dot -0.279; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.41868718581048, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 26562cb3 to history. Total: 3
th(0)=-33.41868718581048;dx=-2.3533084761375732E-4
Armijo: th(271458.77094401745)=-29.5874284414364; dx=8.51134553467539E-7 evalInputDelta=-3.8312587443740753
New Minimum: -33.41868718581048 > -39.3668586499104
END: th(135729.38547200873)=-39.3668586499104; dx=-4.892414431973248E-5 evalInputDelta=5.9481714640999215
Fitness changed from -33.41868718581048 to -39.3668586499104
Iteration 7 complete. Error: -39.3668586499104 Total: 2.7786; Orientation: 0.3085; Line Search: 1.8740
Adding measurement 226e1052 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.623e+03, gradient 1.482e-02, dot -0.265; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.3668586499104, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 226e1052 to history. Total: 3
th(0)=-39.3668586499104;dx=-2.183144602046535E-4
Armijo: th(292420.0965176052)=-34.24986348459197; dx=-8.397934679758663E-7 evalInputDelta=-5.1169951653184285
New Minimum: -39.3668586499104 > -44.94221882989053
END: th(146210.0482588026)=-44.94221882989053; dx=-4.521312081013298E-5 evalInputDelta=5.57536017998013
Fitness changed from -39.3668586499104 to -44.94221882989053
Iteration 8 complete. Error: -44.94221882989053 Total: 3.1662; Orientation: 0.5575; Line Search: 2.0127
Adding measurement 1107e74f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.214e+04, gradient 1.498e-02, dot -0.266; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.94221882989053, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 1107e74f to history. Total: 3
th(0)=-44.94221882989053;dx=-2.2365005938568822E-4
Armijo: th(315000.0000000001)=-37.24721471534769; dx=-2.299161483556877E-6 evalInputDelta=-7.69500411454284
New Minimum: -44.94221882989053 > -49.616652586540134
END: th(157500.00000000006)=-49.616652586540134; dx=-4.06811937684112E-5 evalInputDelta=4.674433756649606
Fitness changed from -44.94221882989053 to -49.616652586540134
Iteration 9 complete. Error: -49.616652586540134 Total: 2.7649; Orientation: 0.2981; Line Search: 1.8598
Adding measurement 733d02d6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.696e+04, gradient 1.519e-02, dot -0.265; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.616652586540134, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 733d02d6 to history. Total: 3
th(0)=-49.616652586540134;dx=-2.3013911590590014E-4
Armijo: th(339323.4636800218)=-40.444187083198244; dx=5.571066393062824E-7 evalInputDelta=-9.17246550334189
New Minimum: -49.616652586540134 > -54.18541057396379
END: th(169661.7318400109)=-54.18541057396379; dx=-3.900960916024098E-5 evalInputDelta=4.568757987423659
Fitness changed from -49.616652586540134 to -54.18541057396379
Iteration 10 complete. Error: -54.18541057396379 Total: 2.7805; Orientation: 0.3002; Line Search: 1.8747
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d71a9b8a-b806-4610-ba33-899b4940323f.jpg)
Adding measurement 56f1f3da to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.296e+04, gradient 1.556e-02, dot -0.246; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.18541057396379, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 56f1f3da to history. Total: 3
th(0)=-54.18541057396379;dx=-2.4145890206339257E-4
Armijo: th(365525.1206470065)=-41.24922214603953; dx=1.0296020044750645E-5 evalInputDelta=-12.936188427924264
New Minimum: -54.18541057396379 > -57.509348919094364
END: th(182762.56032350325)=-57.509348919094364; dx=-2.7340867675404405E-5 evalInputDelta=3.3239383451305713
Fitness changed from -54.18541057396379 to -57.509348919094364
Iteration 11 complete. Error: -57.509348919094364 Total: 2.8623; Orientation: 0.3084; Line Search: 1.9544
Adding measurement 911020d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.843e+04, gradient 1.566e-02, dot -0.250; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -57.509348919094364, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 911020d to history. Total: 3
th(0)=-57.509348919094364;dx=-2.4475693399707537E-4
Armijo: th(393750.0000000002)=-43.23733084696436; dx=1.5845955535536212E-5 evalInputDelta=-14.272018072130003
New Minimum: -57.509348919094364 > -61.79193322585823
END: th(196875.0000000001)=-61.79193322585823; dx=-2.511754049414444E-5 evalInputDelta=4.282584306763866
Fitness changed from -57.509348919094364 to -61.79193322585823
Iteration 12 complete. Error: -61.79193322585823 Total: 3.2430; Orientation: 0.2991; Line Search: 2.0511
Adding measurement 332166d7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.161e+04, gradient 1.525e-02, dot -0.253; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.79193322585823, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 332166d7 to history. Total: 3
th(0)=-61.79193322585823;dx=-2.3175003033991195E-4
Armijo: th(424154.3296000273)=-45.07602718360866; dx=1.982632225542918E-5 evalInputDelta=-16.71590604224957
New Minimum: -61.79193322585823 > -65.92975703224266
END: th(212077.16480001365)=-65.92975703224266; dx=-2.364731769173563E-5 evalInputDelta=4.137823806384432
Fitness changed from -61.79193322585823 to -65.92975703224266
Iteration 13 complete. Error: -65.92975703224266 Total: 2.8733; Orientation: 0.3115; Line Search: 1.9165
Adding measurement 42136bc7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.653e+05, gradient 1.525e-02, dot -0.258; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.92975703224266, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 42136bc7 to history. Total: 3
th(0)=-65.92975703224266;dx=-2.322853788959724E-4
Armijo: th(456906.40080875816)=-45.82362574824724; dx=2.4753106430982657E-5 evalInputDelta=-20.106131283995424
New Minimum: -65.92975703224266 > -69.43456092512088
END: th(228453.20040437908)=-69.43456092512088; dx=-1.8259272439394912E-5 evalInputDelta=3.504803892878215
Fitness changed from -65.92975703224266 to -69.43456092512088
Iteration 14 complete. Error: -69.43456092512088 Total: 2.8216; Orientation: 0.3071; Line Search: 1.9021
Adding measurement 6c491e45 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.225e+05, gradient 1.508e-02, dot -0.240; [012fc445-677d-473d-b7d6-4b0a2d02e37b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.43456092512088, -13.488442498226703, -7.865657209962596, -3.0251444978622493
LBFGS Accumulation History: 3 points
Removed measurement 6c491e45 to history. Total: 3
th(0)=-69.43456092512088;dx=-2.269125292843961E-4
Armijo: th(492187.5000000003)=-50.963857461209585; dx=1.960999508404119E-5 evalInputDelta=-18.470703463911292
New Minimum: -69.43456092512088 > -73.35410210707377
END: th(246093.75000000015)=-73.35410210707377; dx=-1.537717082029489E-5 evalInputDelta=3.9195411819528942
Fitness changed from -69.43456092512088 to -73.35410210707377
Iteration 15 complete. Error: -73.35410210707377 Total: 3.0438; Orientation: 0.2988; Line Search: 2.1767
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/094ef7e3-d95f-4a8f-8373-ef8ca0988fa4.jpg)
Final threshold in iteration 16: -73.35410210707377 (> -Infinity) after 45.399s (< 5400.000s)

Returns

    -73.35410210707377