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 43.47 seconds (1.204 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: 215541417271100
Reset training subject: 215542064860100
Adding measurement c82dab to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.612010109880744;dx=-9.390941642799042E-5
New Minimum: -2.612010109880744 > -2.612109130130842
WOLFE (weak): th(2.154434690031884)=-2.612109130130842; dx=-9.386891961199044E-5 evalInputDelta=9.90202500981141E-5
New Minimum: -2.612109130130842 > -2.6122080075175433
WOLFE (weak): th(4.308869380063768)=-2.6122080075175433; dx=-9.387409648858568E-5 evalInputDelta=1.9789763679955996E-4
New Minimum: -2.6122080075175433 > -2.612604581059694
WOLFE (weak): th(12.926608140191302)=-2.612604581059694; dx=-9.386154867821198E-5 evalInputDelta=5.944711789500623E-4
New Minimum: -2.612604581059694 > -2.6143881552254675
WOLFE (weak): th(51.70643256076521)=-2.6143881552254675; dx=-9.36996386326079E-5 evalInputDelta=0.002378045344723745
New Minimum: -2.6143881552254675 > -2.623847688446585
WOLFE (weak): th(258.53216280382605)=-2.623847688446585; dx=-9.311149749167719E-5 evalInputDelta=0.011837578565841333
New Minimum: -2.623847688446585 > -2.6827737781890977
WOLFE (weak): th(1551.1929768229563)=-2.6827737781890977; dx=-9.051377478915274E-5 evalInputDelta=0.0707636683083539
New Minimum: -2.6827737781890977 > -3.017707216070333
END: th(10858.350837760694)=-3.017707216070333; dx=-7.054403078523866E-5 evalInputDelta=0.4056971061895891
Fitness changed from -2.612010109880744 to -3.017707216070333
Iteration 1 complete. Error: -3.017707216070333 Total: 6.8477; Orientation: 0.0158; Line Search: 5.0520
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8763df44-ef4b-4aa4-a231-c72fe6708c8d.jpg)
Adding measurement 48260955 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-3.017707216070333;dx=-1.5325654733352618E-4
New Minimum: -3.017707216070333 > -4.063968818282843
END: th(23393.607721408407)=-4.063968818282843; dx=-6.105864086655658E-5 evalInputDelta=1.0462616022125104
Fitness changed from -3.017707216070333 to -4.063968818282843
Iteration 2 complete. Error: -4.063968818282843 Total: 1.8292; Orientation: 0.0160; Line Search: 1.2097
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c056fc2a-4f92-4dd3-80ef-28b4172e121d.jpg)
Adding measurement 1b08efbc to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-4.063968818282843;dx=-1.446166817901627E-4
New Minimum: -4.063968818282843 > -5.75215070850413
END: th(50400.00000000001)=-5.75215070850413; dx=-4.007717712096425E-5 evalInputDelta=1.688181890221287
Fitness changed from -4.063968818282843 to -5.75215070850413
Iteration 3 complete. Error: -5.75215070850413 Total: 1.8484; Orientation: 0.0159; Line Search: 1.2380
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/518a4626-80ee-4577-8838-6939b9db31a6.jpg)
Adding measurement fb6b7d9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.633e+03, gradient 1.237e-02, dot -0.253; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.75215070850413, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement fb6b7d9 to history. Total: 3
th(0)=-5.75215070850413;dx=-1.5301202470456194E-4
New Minimum: -5.75215070850413 > -7.162064301411046
END: th(108583.50837760697)=-7.162064301411046; dx=-1.970163548374952E-5 evalInputDelta=1.409913592906916
Fitness changed from -5.75215070850413 to -7.162064301411046
Iteration 4 complete. Error: -7.162064301411046 Total: 2.1161; Orientation: 0.2892; Line Search: 1.2486
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e9f74522-9f57-4208-95fb-ac8eb025046b.jpg)
Adding measurement 20c59730 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.325e+03, gradient 9.778e-03, dot -0.201; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.162064301411046, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement 20c59730 to history. Total: 3
th(0)=-7.162064301411046;dx=-9.560624684380349E-5
New Minimum: -7.162064301411046 > -8.450056735561501
END: th(233936.07721408413)=-8.450056735561501; dx=-9.778374197820374E-6 evalInputDelta=1.2879924341504552
Fitness changed from -7.162064301411046 to -8.450056735561501
Iteration 5 complete. Error: -8.450056735561501 Total: 2.0387; Orientation: 0.2927; Line Search: 1.1731
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/6a61c1d8-a40a-40b6-84d2-fa3e49e9202f.jpg)
Adding measurement 70e653ca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.346e+03, gradient 1.002e-02, dot -0.101; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.450056735561501, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement 70e653ca to history. Total: 3
th(0)=-8.450056735561501;dx=-1.0042170228899976E-4
Armijo: th(504000.0000000002)=-5.124445960464675; dx=3.5242362463650187E-6 evalInputDelta=-3.325610775096827
New Minimum: -8.450056735561501 > -11.121837439057682
END: th(252000.0000000001)=-11.121837439057682; dx=-1.1754842292507542E-5 evalInputDelta=2.6717807034961805
Fitness changed from -8.450056735561501 to -11.121837439057682
Iteration 6 complete. Error: -11.121837439057682 Total: 2.9993; Orientation: 0.2957; Line Search: 2.1090
Adding measurement 77795dc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.422e+03, gradient 9.943e-03, dot -0.107; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.121837439057682, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement 77795dc to history. Total: 3
th(0)=-11.121837439057682;dx=-9.88436317205926E-5
Armijo: th(542917.5418880349)=-7.790465914340015; dx=3.899145359096834E-6 evalInputDelta=-3.3313715247176674
New Minimum: -11.121837439057682 > -14.775150323667603
END: th(271458.77094401745)=-14.775150323667603; dx=-1.4163259816380046E-5 evalInputDelta=3.653312884609921
Fitness changed from -11.121837439057682 to -14.775150323667603
Iteration 7 complete. Error: -14.775150323667603 Total: 2.6106; Orientation: 0.2776; Line Search: 1.7844
Adding measurement 7b013a2a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.291e+03, gradient 9.446e-03, dot -0.111; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.775150323667603, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement 7b013a2a to history. Total: 3
th(0)=-14.775150323667603;dx=-8.921651982043917E-5
Armijo: th(584840.1930352104)=-9.555936511752527; dx=4.001378845421854E-6 evalInputDelta=-5.2192138119150755
New Minimum: -14.775150323667603 > -17.134598719877605
END: th(292420.0965176052)=-17.134598719877605; dx=-1.3340625776509225E-5 evalInputDelta=2.359448396210002
Fitness changed from -14.775150323667603 to -17.134598719877605
Iteration 8 complete. Error: -17.134598719877605 Total: 2.6351; Orientation: 0.2870; Line Search: 1.7887
Adding measurement 7ce66e30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.455e+03, gradient 9.370e-03, dot -0.128; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.134598719877605, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement 7ce66e30 to history. Total: 3
th(0)=-17.134598719877605;dx=-8.7787879474096E-5
Armijo: th(630000.0000000002)=-10.88889502986661; dx=3.7477367299221998E-6 evalInputDelta=-6.245703690010995
New Minimum: -17.134598719877605 > -19.340887849623332
END: th(315000.0000000001)=-19.340887849623332; dx=-1.4778768036071092E-5 evalInputDelta=2.206289129745727
Fitness changed from -17.134598719877605 to -19.340887849623332
Iteration 9 complete. Error: -19.340887849623332 Total: 2.7143; Orientation: 0.2896; Line Search: 1.8496
Adding measurement 3bc5ed95 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.371e+04, gradient 9.476e-03, dot -0.141; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.340887849623332, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement 3bc5ed95 to history. Total: 3
th(0)=-19.340887849623332;dx=-8.977013289316116E-5
Armijo: th(678646.9273600436)=-11.642679187910854; dx=4.531797169346158E-6 evalInputDelta=-7.698208661712478
New Minimum: -19.340887849623332 > -21.49884793452248
END: th(339323.4636800218)=-21.49884793452248; dx=-1.1871639173351518E-5 evalInputDelta=2.1579600848991483
Fitness changed from -19.340887849623332 to -21.49884793452248
Iteration 10 complete. Error: -21.49884793452248 Total: 3.4461; Orientation: 0.2969; Line Search: 2.5729
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/fbbdc898-6493-430f-84bb-637c7f2d4eba.jpg)
Adding measurement 53068164 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.660e+04, gradient 9.609e-03, dot -0.130; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.49884793452248, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement 53068164 to history. Total: 3
th(0)=-21.49884793452248;dx=-9.232076118185845E-5
Armijo: th(731050.241294013)=-10.871610676344279; dx=7.970312221569196E-6 evalInputDelta=-10.627237258178202
New Minimum: -21.49884793452248 > -22.76235851015994
END: th(365525.1206470065)=-22.76235851015994; dx=-9.241394252297904E-6 evalInputDelta=1.2635105756374614
Fitness changed from -21.49884793452248 to -22.76235851015994
Iteration 11 complete. Error: -22.76235851015994 Total: 2.8236; Orientation: 0.3341; Line Search: 1.8737
Adding measurement 4c825a77 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.302e+04, gradient 1.036e-02, dot -0.115; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -22.76235851015994, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement 4c825a77 to history. Total: 3
th(0)=-22.76235851015994;dx=-1.0732487720254391E-4
Armijo: th(787500.0000000003)=-10.338480555880544; dx=1.0479358742620538E-5 evalInputDelta=-12.423877954279398
New Minimum: -22.76235851015994 > -24.19271584736763
END: th(393750.0000000002)=-24.19271584736763; dx=-5.729883154141844E-6 evalInputDelta=1.4303573372076883
Fitness changed from -22.76235851015994 to -24.19271584736763
Iteration 12 complete. Error: -24.19271584736763 Total: 2.6198; Orientation: 0.2888; Line Search: 1.7791
Adding measurement 7904a67f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.554e+04, gradient 9.384e-03, dot -0.124; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.19271584736763, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement 7904a67f to history. Total: 3
th(0)=-24.19271584736763;dx=-8.80441637880597E-5
Armijo: th(848308.6592000546)=-11.251053075893488; dx=9.4832277694851E-6 evalInputDelta=-12.941662771474142
New Minimum: -24.19271584736763 > -25.94185239770973
END: th(424154.3296000273)=-25.94185239770973; dx=-9.411348801957615E-6 evalInputDelta=1.7491365503421008
Fitness changed from -24.19271584736763 to -25.94185239770973
Iteration 13 complete. Error: -25.94185239770973 Total: 2.6439; Orientation: 0.2857; Line Search: 1.7917
Adding measurement 15c444f5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.773e+04, gradient 9.244e-03, dot -0.131; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.94185239770973, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement 15c444f5 to history. Total: 3
th(0)=-25.94185239770973;dx=-8.544618309305925E-5
Armijo: th(913812.8016175163)=-9.92357125341006; dx=1.1622799462326609E-5 evalInputDelta=-16.01828114429967
New Minimum: -25.94185239770973 > -26.87682748293271
END: th(456906.40080875816)=-26.87682748293271; dx=-7.984430015866279E-6 evalInputDelta=0.9349750852229803
Fitness changed from -25.94185239770973 to -26.87682748293271
Iteration 14 complete. Error: -26.87682748293271 Total: 2.9670; Orientation: 0.2853; Line Search: 2.1258
Adding measurement 34bb15e8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.326e+05, gradient 9.412e-03, dot -0.127; [5b7a7aee-4f00-4a2e-bb37-160f2956a893 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.87682748293271, -4.063968818282843, -3.017707216070333, -2.612010109880744
LBFGS Accumulation History: 3 points
Removed measurement 34bb15e8 to history. Total: 3
th(0)=-26.87682748293271;dx=-8.857674350144348E-5
Armijo: th(984375.0000000006)=-7.124717600767518; dx=1.2113376722888792E-5 evalInputDelta=-19.752109882165193
Armijo: th(492187.5000000003)=-26.67439600000013; dx=-4.554054470607062E-6 evalInputDelta=-0.20243148293258173
New Minimum: -26.87682748293271 > -31.084425084553878
END: th(164062.5000000001)=-31.084425084553878; dx=-4.033877624357322E-5 evalInputDelta=4.207597601621167
Fitness changed from -26.87682748293271 to -31.084425084553878
Iteration 15 complete. Error: -31.084425084553878 Total: 3.3095; Orientation: 0.2728; Line Search: 2.4590
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/ab0874c2-4b7d-4781-a48c-d8ae0035928e.jpg)
Final threshold in iteration 16: -31.084425084553878 (> -Infinity) after 43.471s (< 5400.000s)

Returns

    -31.084425084553878