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 8.37 seconds (0.361 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: 140321856738300
Reset training subject: 140321991633500
Adding measurement 1d9270c9 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.5534259476992694;dx=-7.475100237040283E-5
New Minimum: -0.5534259476992694 > -0.5536928949597905
WOLFE (weak): th(2.154434690031884)=-0.5536928949597905; dx=-7.557995362358849E-5 evalInputDelta=2.6694726052101103E-4
New Minimum: -0.5536928949597905 > -0.5539603059128158
WOLFE (weak): th(4.308869380063768)=-0.5539603059128158; dx=-7.569418779420828E-5 evalInputDelta=5.343582135463043E-4
New Minimum: -0.5539603059128158 > -0.5550312762266894
WOLFE (weak): th(12.926608140191302)=-0.5550312762266894; dx=-7.433289507973161E-5 evalInputDelta=0.0016053285274199025
New Minimum: -0.5550312762266894 > -0.5598942561136961
WOLFE (weak): th(51.70643256076521)=-0.5598942561136961; dx=-7.5043741972351E-5 evalInputDelta=0.006468308414426693
New Minimum: -0.5598942561136961 > -0.5860811182631818
WOLFE (weak): th(258.53216280382605)=-0.5860811182631818; dx=-7.668841123618852E-5 evalInputDelta=0.03265517056391232
New Minimum: -0.5860811182631818 > -0.7442288541744241
WOLFE (weak): th(1551.1929768229563)=-0.7442288541744241; dx=-7.698590915544224E-5 evalInputDelta=0.19080290647515463
New Minimum: -0.7442288541744241 > -1.2891103667991108
END: th(10858.350837760694)=-1.2891103667991108; dx=-1.958356773072897E-5 evalInputDelta=0.7356844190998414
Fitness changed from -0.5534259476992694 to -1.2891103667991108
Iteration 1 complete. Error: -1.2891103667991108 Total: 1.2656; Orientation: 0.0016; Line Search: 0.9091
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/83ac14a4-7993-4f35-bc0a-088131cfba4b.jpg)
Adding measurement 690768d2 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1.2891103667991108;dx=-5.7216061390741776E-5
New Minimum: -1.2891103667991108 > -1.8125049141288576
END: th(23393.607721408407)=-1.8125049141288576; dx=-1.2459633154469321E-5 evalInputDelta=0.5233945473297468
Fitness changed from -1.2891103667991108 to -1.8125049141288576
Iteration 2 complete. Error: -1.8125049141288576 Total: 0.3531; Orientation: 0.0014; Line Search: 0.2283
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/74d9f120-bad8-4853-9a25-7ec90384174c.jpg)
Adding measurement 14588db1 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.8125049141288576;dx=-5.192411276284034E-5
New Minimum: -1.8125049141288576 > -2.066320584052672
END: th(50400.00000000001)=-2.066320584052672; dx=-1.007565767979785E-7 evalInputDelta=0.25381566992381455
Fitness changed from -1.8125049141288576 to -2.066320584052672
Iteration 3 complete. Error: -2.066320584052672 Total: 0.3504; Orientation: 0.0016; Line Search: 0.2283
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/2fde8a63-505d-4fb2-b331-83e94ebd05ac.jpg)
Adding measurement 51fda7e7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.112e+02, gradient 9.784e-03, dot -0.328; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.066320584052672, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 51fda7e7 to history. Total: 3
th(0)=-2.066320584052672;dx=-9.104923207976329E-5
New Minimum: -2.066320584052672 > -2.26357697213511
WOLF (strong): th(108583.50837760697)=-2.26357697213511; dx=3.1477200175061137E-6 evalInputDelta=0.19725638808243806
New Minimum: -2.26357697213511 > -2.791576480516886
END: th(54291.75418880348)=-2.791576480516886; dx=-1.7029262273973823E-6 evalInputDelta=0.7252558964642137
Fitness changed from -2.066320584052672 to -2.791576480516886
Iteration 4 complete. Error: -2.791576480516886 Total: 0.4992; Orientation: 0.0277; Line Search: 0.3506
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1c9553d6-4f22-4388-a95e-61eebb1c8f00.jpg)
Adding measurement 61712dc9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.333e+02, gradient 7.057e-03, dot -0.273; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.791576480516886, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 61712dc9 to history. Total: 3
th(0)=-2.791576480516886;dx=-4.8748503884331085E-5
New Minimum: -2.791576480516886 > -3.6463029227443755
WOLF (strong): th(116968.03860704206)=-3.6463029227443755; dx=1.5894471958797998E-6 evalInputDelta=0.8547264422274896
New Minimum: -3.6463029227443755 > -4.424235964534083
END: th(58484.01930352103)=-4.424235964534083; dx=-8.286761776518329E-6 evalInputDelta=1.6326594840171973
Fitness changed from -2.791576480516886 to -4.424235964534083
Iteration 5 complete. Error: -4.424235964534083 Total: 0.4962; Orientation: 0.0290; Line Search: 0.3464
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/3a9d6b66-d170-4b98-b8da-94221dc0f040.jpg)
Adding measurement 172d6d28 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.256e+03, gradient 6.300e-03, dot -0.333; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.424235964534083, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 172d6d28 to history. Total: 3
th(0)=-4.424235964534083;dx=-3.8295821121455876E-5
New Minimum: -4.424235964534083 > -4.96788901100994
END: th(126000.00000000004)=-4.96788901100994; dx=-3.257155905544894E-6 evalInputDelta=0.5436530464758569
Fitness changed from -4.424235964534083 to -4.96788901100994
Iteration 6 complete. Error: -4.96788901100994 Total: 0.3982; Orientation: 0.0433; Line Search: 0.2292
Adding measurement 50a1a82c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.194e+03, gradient 7.515e-03, dot -0.222; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.96788901100994, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 50a1a82c to history. Total: 3
th(0)=-4.96788901100994;dx=-5.469961968634912E-5
Armijo: th(271458.77094401745)=-2.295282771166385; dx=5.279528440114434E-8 evalInputDelta=-2.6726062398435553
Armijo: th(135729.38547200873)=-3.8561997844026448; dx=-2.288183233744358E-7 evalInputDelta=-1.1116892266072953
New Minimum: -4.96788901100994 > -6.028938972532051
END: th(45243.12849066957)=-6.028938972532051; dx=-2.3018104671300987E-5 evalInputDelta=1.0610499615221105
Fitness changed from -4.96788901100994 to -6.028938972532051
Iteration 7 complete. Error: -6.028938972532051 Total: 0.9952; Orientation: 0.0278; Line Search: 0.8566
Adding measurement 1e6dad61 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.437e+03, gradient 8.111e-03, dot -0.199; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.028938972532051, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 1e6dad61 to history. Total: 3
th(0)=-6.028938972532051;dx=-6.463898485502647E-5
Armijo: th(97473.3655058684)=-5.860268085656714; dx=5.471826343872947E-7 evalInputDelta=-0.16867088687533638
New Minimum: -6.028938972532051 > -7.1002325638695405
END: th(48736.6827529342)=-7.1002325638695405; dx=-9.80724216160194E-6 evalInputDelta=1.07129359133749
Fitness changed from -6.028938972532051 to -7.1002325638695405
Iteration 8 complete. Error: -7.1002325638695405 Total: 0.4905; Orientation: 0.0278; Line Search: 0.3526
Adding measurement 3b95fb77 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.213e+03, gradient 6.862e-03, dot -0.253; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.1002325638695405, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 3b95fb77 to history. Total: 3
th(0)=-7.1002325638695405;dx=-4.639017798325885E-5
New Minimum: -7.1002325638695405 > -7.333252097731213
WOLF (strong): th(105000.00000000004)=-7.333252097731213; dx=4.305185849750871E-6 evalInputDelta=0.23301953386167273
New Minimum: -7.333252097731213 > -8.46225562531657
END: th(52500.00000000002)=-8.46225562531657; dx=-9.749813943875029E-6 evalInputDelta=1.3620230614470303
Fitness changed from -7.1002325638695405 to -8.46225562531657
Iteration 9 complete. Error: -8.46225562531657 Total: 0.5009; Orientation: 0.0292; Line Search: 0.3584
Adding measurement 3a86da86 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.519e+03, gradient 6.379e-03, dot -0.313; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.46225562531657, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 3a86da86 to history. Total: 3
th(0)=-8.46225562531657;dx=-4.0130717172730094E-5
New Minimum: -8.46225562531657 > -8.707384105054938
END: th(113107.82122667394)=-8.707384105054938; dx=-1.0123857268199126E-7 evalInputDelta=0.2451284797383675
Fitness changed from -8.46225562531657 to -8.707384105054938
Iteration 10 complete. Error: -8.707384105054938 Total: 0.3996; Orientation: 0.0367; Line Search: 0.2435
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/dc52774e-3968-48bb-b99e-78bebc1574f0.jpg)
Adding measurement 1296586 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.417e+03, gradient 8.073e-03, dot -0.255; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.707384105054938, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 1296586 to history. Total: 3
th(0)=-8.707384105054938;dx=-6.428322074644191E-5
Armijo: th(243683.41376467102)=-5.096637334949539; dx=5.00307555605882E-6 evalInputDelta=-3.6107467701053997
Armijo: th(121841.70688233551)=-8.452616064203854; dx=3.300938716718214E-6 evalInputDelta=-0.2547680408510846
New Minimum: -8.707384105054938 > -10.304739819275126
END: th(40613.90229411184)=-10.304739819275126; dx=-1.9628511310868742E-5 evalInputDelta=1.5973557142201873
Fitness changed from -8.707384105054938 to -10.304739819275126
Iteration 11 complete. Error: -10.304739819275126 Total: 0.6493; Orientation: 0.0319; Line Search: 0.4799
Adding measurement 768f15de to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.831e+03, gradient 6.739e-03, dot -0.296; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -10.304739819275126, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 768f15de to history. Total: 3
th(0)=-10.304739819275126;dx=-4.485564249904168E-5
New Minimum: -10.304739819275126 > -10.946977945549962
WOLF (strong): th(87500.00000000006)=-10.946977945549962; dx=1.3910057669107303E-6 evalInputDelta=0.6422381262748367
New Minimum: -10.946977945549962 > -11.666774142876328
END: th(43750.00000000003)=-11.666774142876328; dx=-1.231775496614263E-5 evalInputDelta=1.3620343236012022
Fitness changed from -10.304739819275126 to -11.666774142876328
Iteration 12 complete. Error: -11.666774142876328 Total: 0.5007; Orientation: 0.0276; Line Search: 0.3623
Adding measurement 62ca2b1a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.102e+04, gradient 5.804e-03, dot -0.352; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.666774142876328, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 62ca2b1a to history. Total: 3
th(0)=-11.666774142876328;dx=-3.288833976529725E-5
New Minimum: -11.666774142876328 > -12.169303984491421
WOLF (strong): th(94256.51768889498)=-12.169303984491421; dx=2.3872519337867016E-7 evalInputDelta=0.5025298416150932
New Minimum: -12.169303984491421 > -12.559209165210085
END: th(47128.25884444749)=-12.559209165210085; dx=-5.648596791494579E-6 evalInputDelta=0.8924350223337569
Fitness changed from -11.666774142876328 to -12.559209165210085
Iteration 13 complete. Error: -12.559209165210085 Total: 0.4881; Orientation: 0.0314; Line Search: 0.3443
Adding measurement 2e20391b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.122e+04, gradient 5.367e-03, dot -0.394; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.559209165210085, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 2e20391b to history. Total: 3
th(0)=-12.559209165210085;dx=-2.77046454051436E-5
Armijo: th(101534.75573527961)=-12.312062992992667; dx=5.875063255873721E-6 evalInputDelta=-0.24714617221741797
New Minimum: -12.559209165210085 > -13.30587603176898
END: th(50767.37786763981)=-13.30587603176898; dx=-3.2145649583736413E-6 evalInputDelta=0.7466668665588951
Fitness changed from -12.559209165210085 to -13.30587603176898
Iteration 14 complete. Error: -13.30587603176898 Total: 0.4787; Orientation: 0.0276; Line Search: 0.3418
Adding measurement 35677518 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.898e+04, gradient 5.176e-03, dot -0.416; [54c424f6-4a29-4123-a373-4c196a505cdf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.30587603176898, -1.8125049141288576, -1.2891103667991108, -0.5534259476992694
LBFGS Accumulation History: 3 points
Removed measurement 35677518 to history. Total: 3
th(0)=-13.30587603176898;dx=-2.642013870702546E-5
Armijo: th(109375.00000000009)=-13.043610514799383; dx=4.779454204914702E-6 evalInputDelta=-0.2622655169695971
New Minimum: -13.30587603176898 > -13.99239761937978
END: th(54687.500000000044)=-13.99239761937978; dx=-1.9829515912049428E-6 evalInputDelta=0.6865215876108
Fitness changed from -13.30587603176898 to -13.99239761937978
Iteration 15 complete. Error: -13.99239761937978 Total: 0.4958; Orientation: 0.0276; Line Search: 0.3587
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/a59f8305-6e28-485b-a6f8-5ce41f38d2f6.jpg)
Final threshold in iteration 16: -13.99239761937978 (> -Infinity) after 8.374s (< 5400.000s)

Returns

    -13.99239761937978