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 93.67 seconds (1.121 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: 282409417481800
Reset training subject: 282411389328200
Adding measurement 2a02453c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-51.85522959493179;dx=-5.259649012971839E-6
New Minimum: -51.85522959493179 > -51.85523501637056
END: th(2.154434690031884)=-51.85523501637056; dx=-3.3497793295143213E-6 evalInputDelta=5.421438764585673E-6
Fitness changed from -51.85522959493179 to -51.85523501637056
Iteration 1 complete. Error: -51.85523501637056 Total: 9.2517; Orientation: 0.0692; Line Search: 3.6728
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/196ac825-5695-45f8-bfff-d241bdb40a5d.jpg)
Adding measurement 51d760f2 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-51.85523501637056;dx=-3.3497806724251697E-6
New Minimum: -51.85523501637056 > -51.85525308782901
WOLFE (weak): th(4.641588833612779)=-51.85525308782901; dx=-3.349796763362139E-6 evalInputDelta=1.8071458455892753E-5
New Minimum: -51.85525308782901 > -51.85526935213624
WOLFE (weak): th(9.283177667225559)=-51.85526935213624; dx=-3.349798138098291E-6 evalInputDelta=3.4335765683124464E-5
New Minimum: -51.85526935213624 > -51.85532898788575
WOLFE (weak): th(27.849533001676676)=-51.85532898788575; dx=-3.3498027960342316E-6 evalInputDelta=9.397151519152658E-5
New Minimum: -51.85532898788575 > -51.85560728714334
WOLFE (weak): th(111.3981320067067)=-51.85560728714334; dx=-3.349790300303274E-6 evalInputDelta=3.7227077278600973E-4
New Minimum: -51.85560728714334 > -51.857099957672446
WOLFE (weak): th(556.9906600335335)=-51.857099957672446; dx=-3.3495961777389813E-6 evalInputDelta=0.0018649413018891892
New Minimum: -51.857099957672446 > -51.86642907859579
WOLFE (weak): th(3341.9439602012008)=-51.86642907859579; dx=-3.3487825440026726E-6 evalInputDelta=0.011194062225236223
New Minimum: -51.86642907859579 > -51.93350669401555
WOLFE (weak): th(23393.607721408407)=-51.93350669401555; dx=-3.342323766170238E-6 evalInputDelta=0.07827167764499166
New Minimum: -51.93350669401555 > -52.47673615970424
WOLFE (weak): th(187148.86177126726)=-52.47673615970424; dx=-3.2909884538149713E-6 evalInputDelta=0.6215011433336812
New Minimum: -52.47673615970424 > -56.978560224721896
END: th(1684339.7559414054)=-56.978560224721896; dx=-2.69898877888778E-6 evalInputDelta=5.123325208351339
Fitness changed from -51.85523501637056 to -56.978560224721896
Iteration 2 complete. Error: -56.978560224721896 Total: 21.2338; Orientation: 0.0609; Line Search: 18.8274
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c34b7097-0d22-4760-9331-7cc806b06098.jpg)
Adding measurement 44f0208a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-56.978560224721896;dx=-2.4400814950341588E-6
New Minimum: -56.978560224721896 > -64.16973178066935
END: th(3628800.0000000005)=-64.16973178066935; dx=-1.500893209258009E-6 evalInputDelta=7.191171555947456
Fitness changed from -56.978560224721896 to -64.16973178066935
Iteration 3 complete. Error: -64.16973178066935 Total: 5.9558; Orientation: 0.0606; Line Search: 3.6786
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/da0cc7da-8671-43f5-8231-5538276d177f.jpg)
Adding measurement 35b022b5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.979e+03, gradient 1.203e-03, dot -0.761; [0256c374-5ec9-44b5-8506-df8d7ab12517 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.16973178066935, -56.978560224721896, -51.85523501637056, -51.85522959493179
LBFGS Accumulation History: 3 points
Removed measurement 35b022b5 to history. Total: 3
th(0)=-64.16973178066935;dx=-1.4465940296497248E-6
New Minimum: -64.16973178066935 > -72.1088727236362
END: th(7818012.603187701)=-72.1088727236362; dx=-6.212247739903262E-7 evalInputDelta=7.939140942966844
Fitness changed from -64.16973178066935 to -72.1088727236362
Iteration 4 complete. Error: -72.1088727236362 Total: 7.0495; Orientation: 1.0740; Line Search: 3.6706
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ef157de0-9ca5-4907-a1b6-8cdea9b95a15.jpg)
Adding measurement 3e102f05 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.332e+03, gradient 1.019e-03, dot -0.497; [0256c374-5ec9-44b5-8506-df8d7ab12517 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.1088727236362, -56.978560224721896, -51.85523501637056, -51.85522959493179
LBFGS Accumulation History: 3 points
Removed measurement 3e102f05 to history. Total: 3
th(0)=-72.1088727236362;dx=-1.0382024945648081E-6
New Minimum: -72.1088727236362 > -78.58089775857478
END: th(1.6843397559414055E7)=-78.58089775857478; dx=-4.714102362311099E-8 evalInputDelta=6.472025034938582
Fitness changed from -72.1088727236362 to -78.58089775857478
Iteration 5 complete. Error: -78.58089775857478 Total: 7.2717; Orientation: 1.0634; Line Search: 3.9521
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d28538c9-b4c1-411b-a6d8-b3fe9dc5c148.jpg)
Adding measurement 1717fb6e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.043e+03, gradient 1.242e-03, dot -0.225; [0256c374-5ec9-44b5-8506-df8d7ab12517 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.58089775857478, -56.978560224721896, -51.85523501637056, -51.85522959493179
LBFGS Accumulation History: 3 points
Removed measurement 1717fb6e to history. Total: 3
th(0)=-78.58089775857478;dx=-1.5413311935364329E-6
Armijo: th(3.628800000000001E7)=-73.49873803608656; dx=3.558417211966332E-7 evalInputDelta=-5.082159722488214
New Minimum: -78.58089775857478 > -81.6286883424031
WOLF (strong): th(1.8144000000000004E7)=-81.6286883424031; dx=5.102688431126979E-7 evalInputDelta=3.0477905838283164
New Minimum: -81.6286883424031 > -84.60747209294817
END: th(6048000.000000001)=-84.60747209294817; dx=-3.9474285713958916E-7 evalInputDelta=6.026574334373393
Fitness changed from -78.58089775857478 to -84.60747209294817
Iteration 6 complete. Error: -84.60747209294817 Total: 10.8739; Orientation: 1.0624; Line Search: 7.7389
Adding measurement 77c17dad to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.550e+04, gradient 8.295e-04, dot -0.499; [0256c374-5ec9-44b5-8506-df8d7ab12517 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.60747209294817, -56.978560224721896, -51.85523501637056, -51.85522959493179
LBFGS Accumulation History: 3 points
Removed measurement 77c17dad to history. Total: 3
th(0)=-84.60747209294817;dx=-6.8803599584323E-7
New Minimum: -84.60747209294817 > -88.95494175336674
END: th(1.3030021005312836E7)=-88.95494175336674; dx=-7.804743930383494E-8 evalInputDelta=4.347469660418568
Fitness changed from -84.60747209294817 to -88.95494175336674
Iteration 7 complete. Error: -88.95494175336674 Total: 6.5895; Orientation: 1.0862; Line Search: 3.6977
Adding measurement 3c61b68f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.802e+04, gradient 9.830e-04, dot -0.369; [0256c374-5ec9-44b5-8506-df8d7ab12517 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -88.95494175336674, -56.978560224721896, -51.85523501637056, -51.85522959493179
LBFGS Accumulation History: 3 points
Removed measurement 3c61b68f to history. Total: 3
th(0)=-88.95494175336674;dx=-9.66207807688548E-7
Armijo: th(2.8072329265690096E7)=-87.52592239607193; dx=2.712966979439931E-7 evalInputDelta=-1.4290193572948056
New Minimum: -88.95494175336674 > -91.63732499174233
WOLF (strong): th(1.4036164632845048E7)=-91.63732499174233; dx=2.7404129460724604E-7 evalInputDelta=2.682383238375593
New Minimum: -91.63732499174233 > -92.15459830926055
END: th(4678721.544281683)=-92.15459830926055; dx=-3.7071841168631944E-7 evalInputDelta=3.19965655589381
Fitness changed from -88.95494175336674 to -92.15459830926055
Iteration 8 complete. Error: -92.15459830926055 Total: 10.1309; Orientation: 1.0023; Line Search: 7.3519
Adding measurement 7584d005 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.323e+04, gradient 6.646e-04, dot -0.616; [0256c374-5ec9-44b5-8506-df8d7ab12517 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.15459830926055, -56.978560224721896, -51.85523501637056, -51.85522959493179
LBFGS Accumulation History: 3 points
Removed measurement 7584d005 to history. Total: 3
th(0)=-92.15459830926055;dx=-4.416814985352944E-7
New Minimum: -92.15459830926055 > -95.37613848446257
END: th(1.0080000000000004E7)=-95.37613848446257; dx=-2.1982386545683617E-7 evalInputDelta=3.2215401752020227
Fitness changed from -92.15459830926055 to -95.37613848446257
Iteration 9 complete. Error: -95.37613848446257 Total: 6.6126; Orientation: 1.0080; Line Search: 3.6436
Adding measurement 3ac4f463 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.539e+04, gradient 7.098e-04, dot -0.541; [0256c374-5ec9-44b5-8506-df8d7ab12517 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.37613848446257, -56.978560224721896, -51.85523501637056, -51.85522959493179
LBFGS Accumulation History: 3 points
Removed measurement 3ac4f463 to history. Total: 3
th(0)=-95.37613848446257;dx=-5.038008822729871E-7
New Minimum: -95.37613848446257 > -98.0321475914132
WOLF (strong): th(2.1716701675521396E7)=-98.0321475914132; dx=3.825525130814902E-8 evalInputDelta=2.656009106950634
END: th(1.0858350837760698E7)=-98.0239417096449; dx=-6.443648805597141E-8 evalInputDelta=2.6478032251823294
Fitness changed from -95.37613848446257 to -98.0321475914132
Iteration 10 complete. Error: -98.0321475914132 Total: 8.3928; Orientation: 1.0719; Line Search: 5.5649
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3638b558-2dc2-42c4-8e3d-3268d8ac7a5d.jpg)
Final threshold in iteration 11: -98.0321475914132 (> -Infinity) after 93.668s (< 5400.000s)

Returns

    -98.0321475914132