Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 208.11 seconds (2.602 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: 12551373471398
Reset training subject: 12555520712703
Adding measurement 7ba873f6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.18831421434879303;dx=-5.830185116226368E-7
New Minimum: -0.18831421434879303 > -0.1883145421743393
WOLFE (weak): th(2.154434690031884)=-0.1883145421743393; dx=-5.256678307480585E-7 evalInputDelta=3.2782554626464844E-7
New Minimum: -0.1883145421743393 > -0.1883152723312378
WOLFE (weak): th(4.308869380063768)=-0.1883152723312378; dx=-5.256628390884771E-7 evalInputDelta=1.0579824447631836E-6
New Minimum: -0.1883152723312378 > -0.1883176565170288
WOLFE (weak): th(12.926608140191302)=-0.1883176565170288; dx=-5.256604464800249E-7 evalInputDelta=3.4421682357788086E-6
New Minimum: -0.1883176565170288 > -0.1883278340101242
WOLFE (weak): th(51.70643256076521)=-0.1883278340101242; dx=-5.256494681140345E-7 evalInputDelta=1.3619661331176758E-5
New Minimum: -0.1883278340101242 > -0.18838229775428772
WOLFE (weak): th(258.53216280382605)=-0.18838229775428772; dx=-5.256200546233079E-7 evalInputDelta=6.808340549468994E-5
New Minimum: -0.18838229775428772 > -0.18872180581092834
WOLFE (weak): th(1551.1929768229563)=-0.18872180581092834; dx=-5.253483112769822E-7 evalInputDelta=4.0759146213531494E-4
New Minimum: -0.18872180581092834 > -0.1911633312702179
END: th(10858.350837760694)=-0.1911633312702179; dx=-5.239589152169273E-7 evalInputDelta=0.0028491169214248657
Fitness changed from -0.18831421434879303 to -0.1911633312702179
Iteration 1 complete. Error: -0.1911633312702179 Total: 48.0312; Orientation: 0.0439; Line Search: 35.4949
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f5363165-a3d7-403f-81be-6e5fafc912da.jpg)

    Adding measurement 5c94bf84 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.1911633312702179;dx=-5.226630120844491E-7
    New Minimum: -0.1911633312702179 > -0.19725598394870758
    WOLFE (weak): th(23393.607721408407)=-0.19725598394870758; dx=-5.192915691457039E-7 evalInputDelta=0.006092652678489685
    New Minimum: -0.19725598394870758 > -0.20330998301506042
    WOLFE (weak): th(46787.215442816814)=-0.20330998301506042; dx=-5.15775021059072E-7 evalInputDelta=0.01214665174484253
    New Minimum: -0.20330998301506042 > -0.22709563374519348
    WOLFE (weak): th(140361.64632845044)=-0.22709563374519348; dx=-5.010481864983053E-7 evalInputDelta=0.035932302474975586
    New Minimum: -0.22709563374519348 > -0.3252272307872772
    END: th(561446.5853138018)=-0.3252272307872772; dx=-4.3102058502695916E-7 evalInputDelta=0.13406389951705933
    Fitness changed from -0.1911633312702179 to -0.3252272307872772
    Iteration 2 complete. Error: -0.3252272307872772 Total: 26.1262; Orientation: 0.0434; Line Search: 21.7956
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/3c19a3f7-ff82-4795-b34f-b15671c1927c.jpg)

    Adding measurement 24407f26 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.3252272307872772;dx=-3.8925722431136303E-7
    New Minimum: -0.3252272307872772 > -0.526293158531189
    END: th(1209600.0000000002)=-0.526293158531189; dx=-2.7800445427462744E-7 evalInputDelta=0.20106592774391174
    Fitness changed from -0.3252272307872772 to -0.526293158531189
    Iteration 3 complete. Error: -0.526293158531189 Total: 12.6532; Orientation: 0.0447; Line Search: 8.1913
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/ac4060d5-7b8f-4c75-8ada-c340343f294d.jpg)

    Adding measurement 395cacb4 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.787e+03, gradient 4.988e-04, dot -0.874; [06f8f942-4e44-4db5-8bd8-9b6cc3b08308 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.526293158531189, -0.3252272307872772, -0.1911633312702179, -0.18831421434879303
    LBFGS Accumulation History: 3 points
    Removed measurement 395cacb4 to history. Total: 3
    th(0)=-0.526293158531189;dx=-2.4881221533152224E-7
    New Minimum: -0.526293158531189 > -0.7846899479627609
    END: th(2606004.201062567)=-0.7846899479627609; dx=-1.5411075333850804E-7 evalInputDelta=0.25839678943157196
    Fitness changed from -0.526293158531189 to -0.7846899479627609
    Iteration 4 complete. Error: -0.7846899479627609 Total: 14.0831; Orientation: 1.0519; Line Search: 8.4978
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/86f1d598-2d0f-40a0-8ef2-afd4e8a5dcdb.jpg)

    Adding measurement 3d19b597 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.634e+03, gradient 3.899e-04, dot -0.775; [06f8f942-4e44-4db5-8bd8-9b6cc3b08308 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.7846899479627609, -0.3252272307872772, -0.1911633312702179, -0.18831421434879303
    LBFGS Accumulation History: 3 points
    Removed measurement 3d19b597 to history. Total: 3
    th(0)=-0.7846899479627609;dx=-1.520341537359259E-7
    New Minimum: -0.7846899479627609 > -1.0758102536201477
    END: th(5614465.853138018)=-1.0758102536201477; dx=-6.920775040174695E-8 evalInputDelta=0.2911203056573868
    Fitness changed from -0.7846899479627609 to -1.0758102536201477
    Iteration 5 complete. Error: -1.0758102536201477 Total: 14.4267; Orientation: 1.0270; Line Search: 8.8817
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/17d84d12-abbf-416f-9784-4f9119b28709.jpg)

    Adding measurement 5764c297 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.742e+03, gradient 3.276e-04, dot -0.581; [06f8f942-4e44-4db5-8bd8-9b6cc3b08308 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.0758102536201477, -0.3252272307872772, -0.1911633312702179, -0.18831421434879303
    LBFGS Accumulation History: 3 points
    Removed measurement 5764c297 to history. Total: 3
    th(0)=-1.0758102536201477;dx=-1.0729841950069684E-7
    New Minimum: -1.0758102536201477 > -1.3198288083076477
    END: th(1.2096000000000002E7)=-1.3198288083076477; dx=-1.1403969777975596E-8 evalInputDelta=0.2440185546875
    Fitness changed from -1.0758102536201477 to -1.3198288083076477
    Iteration 6 complete. Error: -1.3198288083076477 Total: 15.2170; Orientation: 1.0187; Line Search: 9.7979
    Adding measurement c0909c5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.483e+03, gradient 3.346e-04, dot -0.273; [06f8f942-4e44-4db5-8bd8-9b6cc3b08308 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.3198288083076477, -0.3252272307872772, -0.1911633312702179, -0.18831421434879303
    LBFGS Accumulation History: 3 points
    Removed measurement c0909c5 to history. Total: 3
    th(0)=-1.3198288083076477;dx=-1.1197966735749712E-7
    Armijo: th(2.606004201062567E7)=-1.267843633890152; dx=3.458998247239151E-8 evalInputDelta=-0.05198517441749573
    New Minimum: -1.3198288083076477 > -1.4675428122282028
    WOLF (strong): th(1.3030021005312836E7)=-1.4675428122282028; dx=2.260955791267917E-8 evalInputDelta=0.14771400392055511
    New Minimum: -1.4675428122282028 > -1.4698051512241364
    END: th(4343340.335104278)=-1.4698051512241364; dx=-3.416135582756927E-8 evalInputDelta=0.14997634291648865
    Fitness changed from -1.3198288083076477 to -1.4698051512241364
    Iteration 7 complete. Error: -1.4698051512241364 Total: 22.1431; Orientation: 1.0338; Line Search: 16.5624
    Adding measurement 2f47f458 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.971e+03, gradient 2.205e-04, dot -0.486; [06f8f942-4e44-4db5-8bd8-9b6cc3b08308 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.4698051512241364, -0.3252272307872772, -0.1911633312702179, -0.18831421434879303
    LBFGS Accumulation History: 3 points
    Removed measurement 2f47f458 to history. Total: 3
    th(0)=-1.4698051512241364;dx=-4.860018299910076E-8
    New Minimum: -1.4698051512241364 > -1.609677106142044
    END: th(9357443.088563364)=-1.609677106142044; dx=-1.395762176862842E-8 evalInputDelta=0.13987195491790771
    Fitness changed from -1.4698051512241364 to -1.609677106142044
    Iteration 8 complete. Error: -1.609677106142044 Total: 14.0748; Orientation: 1.0122; Line Search: 8.8434
    Adding measurement 2f9d2ac3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.129e+03, gradient 2.110e-04, dot -0.443; [06f8f942-4e44-4db5-8bd8-9b6cc3b08308 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.609677106142044, -0.3252272307872772, -0.1911633312702179, -0.18831421434879303
    LBFGS Accumulation History: 3 points
    Removed measurement 2f9d2ac3 to history. Total: 3
    th(0)=-1.609677106142044;dx=-4.4510721501380825E-8
    New Minimum: -1.609677106142044 > -1.6823522299528122
    WOLF (strong): th(2.0160000000000004E7)=-1.6823522299528122; dx=9.12406722885166E-9 evalInputDelta=0.07267512381076813
    New Minimum: -1.6823522299528122 > -1.7056425213813782
    END: th(1.0080000000000002E7)=-1.7056425213813782; dx=-1.9544506181984237E-9 evalInputDelta=0.0959654152393341
    Fitness changed from -1.609677106142044 to -1.7056425213813782
    Iteration 9 complete. Error: -1.7056425213813782 Total: 18.2771; Orientation: 1.0283; Line Search: 13.2813
    Adding measurement 52e8d68a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.082e+03, gradient 2.080e-04, dot -0.380; [06f8f942-4e44-4db5-8bd8-9b6cc3b08308 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7056425213813782, -0.3252272307872772, -0.1911633312702179, -0.18831421434879303
    LBFGS Accumulation History: 3 points
    Removed measurement 52e8d68a to history. Total: 3
    th(0)=-1.7056425213813782;dx=-4.3266939791066426E-8
    Armijo: th(2.1716701675521392E7)=-1.6885779947042465; dx=2.333455685000287E-8 evalInputDelta=-0.017064526677131653
    New Minimum: -1.7056425213813782 > -1.788094475865364
    WOLF (strong): th(1.0858350837760696E7)=-1.788094475865364; dx=8.154599976645866E-9 evalInputDelta=0.0824519544839859
    END: th(3619450.2792535652)=-1.7648907601833344; dx=-2.2803978840112453E-8 evalInputDelta=0.05924823880195618
    Fitness changed from -1.7056425213813782 to -1.788094475865364
    Iteration 10 complete. Error: -1.788094475865364 Total: 23.0074; Orientation: 1.4305; Line Search: 17.4233
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/1703f0e3-31e9-4cc0-befa-bf1b15179e48.jpg)

    Final threshold in iteration 11: -1.788094475865364 (> -Infinity) after 208.113s (< 5400.000s)

Returns

    -1.788094475865364