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 55.80 seconds (1.376 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: 208166312644500
Reset training subject: 208167068410000
Adding measurement 41c9f542 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=10.184226110007383;dx=-8.256892363182096E-5
New Minimum: 10.184226110007383 > 10.18409215193417
WOLFE (weak): th(2.154434690031884)=10.18409215193417; dx=-8.303834447721714E-5 evalInputDelta=1.3395807321359143E-4
New Minimum: 10.18409215193417 > 10.18395820729429
WOLFE (weak): th(4.308869380063768)=10.18395820729429; dx=-8.278301152304345E-5 evalInputDelta=2.6790271309273805E-4
New Minimum: 10.18395820729429 > 10.183425582819698
WOLFE (weak): th(12.926608140191302)=10.183425582819698; dx=-8.268156690699127E-5 evalInputDelta=8.005271876854181E-4
New Minimum: 10.183425582819698 > 10.181017069184447
WOLFE (weak): th(51.70643256076521)=10.181017069184447; dx=-8.309838037753914E-5 evalInputDelta=0.00320904082293616
New Minimum: 10.181017069184447 > 10.168068363973848
WOLFE (weak): th(258.53216280382605)=10.168068363973848; dx=-8.430185063746111E-5 evalInputDelta=0.016157746033535147
New Minimum: 10.168068363973848 > 10.083722120365104
WOLFE (weak): th(1551.1929768229563)=10.083722120365104; dx=-8.960397996043762E-5 evalInputDelta=0.10050398964227902
New Minimum: 10.083722120365104 > 9.359212563479096
WOLFE (weak): th(10858.350837760694)=9.359212563479096; dx=-1.048810190014048E-4 evalInputDelta=0.8250135465282877
New Minimum: 9.359212563479096 > 5.4870806125631955
END: th(86866.80670208555)=5.4870806125631955; dx=-4.506123496184228E-5 evalInputDelta=4.697145497444188
Fitness changed from 10.184226110007383 to 5.4870806125631955
Iteration 1 complete. Error: 5.4870806125631955 Total: 9.3874; Orientation: 0.0163; Line Search: 7.2325
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3b413be6-2d06-41d3-8d95-1f3d2a72e09a.jpg)
Adding measurement 3f0e1323 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=5.4870806125631955;dx=-2.102654449334263E-4
New Minimum: 5.4870806125631955 > -0.6836262510505673
END: th(187148.86177126726)=-0.6836262510505673; dx=-2.0571891113450066E-5 evalInputDelta=6.170706863613763
Fitness changed from 5.4870806125631955 to -0.6836262510505673
Iteration 2 complete. Error: -0.6836262510505673 Total: 2.3569; Orientation: 0.0163; Line Search: 1.5772
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a46b5d59-379b-44b0-9bc9-7b4e4355add8.jpg)
Adding measurement 3125e08f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.6836262510505673;dx=-2.647760956741402E-4
New Minimum: -0.6836262510505673 > -1.800883517944719
WOLF (strong): th(403200.00000000006)=-1.800883517944719; dx=3.6069388875942405E-6 evalInputDelta=1.1172572668941516
New Minimum: -1.800883517944719 > -6.391315642110147
END: th(201600.00000000003)=-6.391315642110147; dx=-1.7925180488394008E-5 evalInputDelta=5.70768939105958
Fitness changed from -0.6836262510505673 to -6.391315642110147
Iteration 3 complete. Error: -6.391315642110147 Total: 3.2420; Orientation: 0.0167; Line Search: 2.5144
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/118f1008-6d68-4e52-bc4e-49a3c726d5d5.jpg)
Adding measurement 51f6433c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.300e+03, gradient 1.653e-02, dot -0.107; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.391315642110147, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 51f6433c to history. Total: 3
th(0)=-6.391315642110147;dx=-2.7247101272412225E-4
Armijo: th(434334.03351042786)=-4.798813445042914; dx=2.7667055162320373E-6 evalInputDelta=-1.5925021970672333
New Minimum: -6.391315642110147 > -12.330376517171192
END: th(217167.01675521393)=-12.330376517171192; dx=-2.9099096964332004E-5 evalInputDelta=5.939060875061045
Fitness changed from -6.391315642110147 to -12.330376517171192
Iteration 4 complete. Error: -12.330376517171192 Total: 3.3701; Orientation: 0.3273; Line Search: 2.3391
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/fbeb55c7-c0f0-48de-bc07-d22500e96697.jpg)
Adding measurement 788eda8f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.554e+03, gradient 1.629e-02, dot -0.105; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.330376517171192, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 788eda8f to history. Total: 3
th(0)=-12.330376517171192;dx=-2.6503049244809915E-4
Armijo: th(467872.15442816826)=-8.11041874554197; dx=4.610195541438955E-6 evalInputDelta=-4.219957771629222
New Minimum: -12.330376517171192 > -18.46656686842723
END: th(233936.07721408413)=-18.46656686842723; dx=-2.876349821883722E-5 evalInputDelta=6.136190351256037
Fitness changed from -12.330376517171192 to -18.46656686842723
Iteration 5 complete. Error: -18.46656686842723 Total: 3.5263; Orientation: 0.3123; Line Search: 2.4905
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/cf178070-004e-44aa-ab32-fe31a73e3ace.jpg)
Adding measurement 32340366 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.183e+03, gradient 1.660e-02, dot -0.102; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.46656686842723, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 32340366 to history. Total: 3
th(0)=-18.46656686842723;dx=-2.748317857342312E-4
Armijo: th(504000.0000000002)=-10.277116053816744; dx=6.876504011911315E-6 evalInputDelta=-8.189450814610485
New Minimum: -18.46656686842723 > -23.754465017758548
END: th(252000.0000000001)=-23.754465017758548; dx=-2.5620210925323027E-5 evalInputDelta=5.287898149331319
Fitness changed from -18.46656686842723 to -23.754465017758548
Iteration 6 complete. Error: -23.754465017758548 Total: 3.2825; Orientation: 0.3333; Line Search: 2.2238
Adding measurement 2cb237df to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.886e+03, gradient 1.671e-02, dot -0.104; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.754465017758548, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 2cb237df to history. Total: 3
th(0)=-23.754465017758548;dx=-2.790599163930632E-4
Armijo: th(542917.5418880349)=-14.281187708653057; dx=9.448913650052434E-6 evalInputDelta=-9.473277309105491
New Minimum: -23.754465017758548 > -30.26355520312279
END: th(271458.77094401745)=-30.26355520312279; dx=-2.4284398589684973E-5 evalInputDelta=6.5090901853642436
Fitness changed from -23.754465017758548 to -30.26355520312279
Iteration 7 complete. Error: -30.26355520312279 Total: 3.3166; Orientation: 0.3060; Line Search: 2.3220
Adding measurement 609e5661 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.279e+03, gradient 1.560e-02, dot -0.099; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -30.26355520312279, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 609e5661 to history. Total: 3
th(0)=-30.26355520312279;dx=-2.4298900951395791E-4
Armijo: th(584840.1930352104)=-19.124151674365194; dx=1.0732835043156609E-5 evalInputDelta=-11.139403528757597
New Minimum: -30.26355520312279 > -35.99789930978637
END: th(292420.0965176052)=-35.99789930978637; dx=-2.2455044053463356E-5 evalInputDelta=5.734344106663578
Fitness changed from -30.26355520312279 to -35.99789930978637
Iteration 8 complete. Error: -35.99789930978637 Total: 3.3444; Orientation: 0.2772; Line Search: 2.1727
Adding measurement 182436c7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.224e+03, gradient 1.610e-02, dot -0.095; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -35.99789930978637, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 182436c7 to history. Total: 3
th(0)=-35.99789930978637;dx=-2.587641009256836E-4
Armijo: th(630000.0000000002)=-20.762933025176608; dx=1.3641715559888332E-5 evalInputDelta=-15.234966284609762
New Minimum: -35.99789930978637 > -40.861000585696566
END: th(315000.0000000001)=-40.861000585696566; dx=-1.8132909138599562E-5 evalInputDelta=4.863101275910196
Fitness changed from -35.99789930978637 to -40.861000585696566
Iteration 9 complete. Error: -40.861000585696566 Total: 3.2203; Orientation: 0.3161; Line Search: 2.2359
Adding measurement 4bd9852b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.710e+03, gradient 1.575e-02, dot -0.094; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.861000585696566, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 4bd9852b to history. Total: 3
th(0)=-40.861000585696566;dx=-2.4793730176230497E-4
Armijo: th(678646.9273600436)=-20.7636411965008; dx=1.7692019840718403E-5 evalInputDelta=-20.097359389195766
New Minimum: -40.861000585696566 > -44.05612924539646
END: th(339323.4636800218)=-44.05612924539646; dx=-1.4748811866181191E-5 evalInputDelta=3.195128659699897
Fitness changed from -40.861000585696566 to -44.05612924539646
Iteration 10 complete. Error: -44.05612924539646 Total: 3.5623; Orientation: 0.2914; Line Search: 2.5106
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/11565ab2-2175-47a3-8645-f2829964cbca.jpg)
Adding measurement 51361ca3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.709e+03, gradient 1.596e-02, dot -0.088; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.05612924539646, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 51361ca3 to history. Total: 3
th(0)=-44.05612924539646;dx=-2.5438531200271255E-4
Armijo: th(731050.241294013)=-22.075952722408076; dx=1.9714702667999823E-5 evalInputDelta=-21.980176522988387
New Minimum: -44.05612924539646 > -47.34468497045589
END: th(365525.1206470065)=-47.34468497045589; dx=-1.2420535379239415E-5 evalInputDelta=3.2885557250594246
Fitness changed from -44.05612924539646 to -47.34468497045589
Iteration 11 complete. Error: -47.34468497045589 Total: 3.2913; Orientation: 0.2940; Line Search: 2.3100
Adding measurement 566940e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.284e+03, gradient 1.603e-02, dot -0.083; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.34468497045589, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 566940e2 to history. Total: 3
th(0)=-47.34468497045589;dx=-2.569033255399721E-4
Armijo: th(787500.0000000003)=-22.734089469685166; dx=2.015636399905528E-5 evalInputDelta=-24.61059550077072
New Minimum: -47.34468497045589 > -49.987905625502506
END: th(393750.0000000002)=-49.987905625502506; dx=-1.0122892108971228E-5 evalInputDelta=2.643220655046619
Fitness changed from -47.34468497045589 to -49.987905625502506
Iteration 12 complete. Error: -49.987905625502506 Total: 3.6997; Orientation: 0.3222; Line Search: 2.6374
Adding measurement 11540b14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.809e+03, gradient 1.552e-02, dot -0.079; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.987905625502506, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 11540b14 to history. Total: 3
th(0)=-49.987905625502506;dx=-2.406305068730655E-4
Armijo: th(848308.6592000546)=-23.168659913159708; dx=2.0371208339128734E-5 evalInputDelta=-26.8192457123428
New Minimum: -49.987905625502506 > -53.3818751201417
END: th(424154.3296000273)=-53.3818751201417; dx=-9.676414125228986E-6 evalInputDelta=3.393969494639194
Fitness changed from -49.987905625502506 to -53.3818751201417
Iteration 13 complete. Error: -53.3818751201417 Total: 3.2684; Orientation: 0.2804; Line Search: 2.3089
Adding measurement 174ae630 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.071e+03, gradient 1.543e-02, dot -0.075; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.3818751201417, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 174ae630 to history. Total: 3
th(0)=-53.3818751201417;dx=-2.3791117787165132E-4
Armijo: th(913812.8016175163)=-25.786763280219084; dx=2.0096045769977268E-5 evalInputDelta=-27.595111839922616
New Minimum: -53.3818751201417 > -56.77404902900928
END: th(456906.40080875816)=-56.77404902900928; dx=-8.060039385459464E-6 evalInputDelta=3.3921739088675764
Fitness changed from -53.3818751201417 to -56.77404902900928
Iteration 14 complete. Error: -56.77404902900928 Total: 3.5961; Orientation: 0.3145; Line Search: 2.5656
Adding measurement 2da8d953 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.066e+04, gradient 1.491e-02, dot -0.072; [4e4cc44b-5807-4cd7-8721-4d26aa9d3600 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.77404902900928, -0.6836262510505673, 5.4870806125631955, 10.184226110007383
LBFGS Accumulation History: 3 points
Removed measurement 2da8d953 to history. Total: 3
th(0)=-56.77404902900928;dx=-2.219448897052592E-4
Armijo: th(984375.0000000006)=-26.21127170039651; dx=2.020897855798056E-5 evalInputDelta=-30.562777328612768
New Minimum: -56.77404902900928 > -60.14447985297775
END: th(492187.5000000003)=-60.14447985297775; dx=-9.739425574689034E-6 evalInputDelta=3.3704308239684764
Fitness changed from -56.77404902900928 to -60.14447985297775
Iteration 15 complete. Error: -60.14447985297775 Total: 3.3154; Orientation: 0.2795; Line Search: 2.3054
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/54441c78-ee7f-4ade-9498-a3e81d0a526d.jpg)
Final threshold in iteration 16: -60.14447985297775 (> -Infinity) after 55.801s (< 5400.000s)

Returns

    -60.14447985297775