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 138.71 seconds (1.959 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: 111439460732500
Reset training subject: 111443221621200
Adding measurement 36455a08 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-30.919434744383754;dx=-1.2563730991870256E-6
New Minimum: -30.919434744383754 > -30.919436111883115
WOLFE (weak): th(2.154434690031884)=-30.919436111883115; dx=-1.1508713365769227E-6 evalInputDelta=1.3674993617485143E-6
New Minimum: -30.919436111883115 > -30.91944021438084
WOLFE (weak): th(4.308869380063768)=-30.91944021438084; dx=-1.1509763390134178E-6 evalInputDelta=5.469997084617262E-6
New Minimum: -30.91944021438084 > -30.919451154372098
WOLFE (weak): th(12.926608140191302)=-30.919451154372098; dx=-1.150818398234572E-6 evalInputDelta=1.6409988344179283E-5
New Minimum: -30.919451154372098 > -30.919500384284877
WOLFE (weak): th(51.70643256076521)=-30.919500384284877; dx=-1.1509856020939948E-6 evalInputDelta=6.563990112340434E-5
New Minimum: -30.919500384284877 > -30.91976430998074
WOLFE (weak): th(258.53216280382605)=-30.91976430998074; dx=-1.1511224528535367E-6 evalInputDelta=3.295655969850486E-4
New Minimum: -30.91976430998074 > -30.921406615628925
WOLFE (weak): th(1551.1929768229563)=-30.921406615628925; dx=-1.1508795214309803E-6 evalInputDelta=0.001971871245171286
New Minimum: -30.921406615628925 > -30.93323657031069
WOLFE (weak): th(10858.350837760694)=-30.93323657031069; dx=-1.15015008070072E-6 evalInputDelta=0.013801825926936573
New Minimum: -30.93323657031069 > -31.029512580999903
WOLFE (weak): th(86866.80670208555)=-31.029512580999903; dx=-1.1417631041432098E-6 evalInputDelta=0.11007783661614923
New Minimum: -31.029512580999903 > -31.870987018777956
END: th(781801.26031877)=-31.870987018777956; dx=-1.0528588321887664E-6 evalInputDelta=0.9515522743942029
Fitness changed from -30.919434744383754 to -31.870987018777956
Iteration 1 complete. Error: -31.870987018777956 Total: 39.7503; Orientation: 0.0632; Line Search: 30.6341
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7d7afd52-3190-4c31-9388-b9aa35330a5b.jpg)
Adding measurement 72f1e368 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-31.870987018777956;dx=-1.0233726617601871E-6
New Minimum: -31.870987018777956 > -33.62403123493476
END: th(1684339.7559414052)=-33.62403123493476; dx=-8.698014614424935E-7 evalInputDelta=1.7530442161568054
Fitness changed from -31.870987018777956 to -33.62403123493476
Iteration 2 complete. Error: -33.62403123493476 Total: 8.4425; Orientation: 0.0635; Line Search: 5.2276
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3add8495-f7e7-4d2d-a9ff-825e22f79c13.jpg)
Adding measurement 646a98ad to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-33.62403123493476;dx=-8.28969163476494E-7
New Minimum: -33.62403123493476 > -36.48972676546526
END: th(3628800.0)=-36.48972676546526; dx=-6.099990092805264E-7 evalInputDelta=2.8656955305304948
Fitness changed from -33.62403123493476 to -36.48972676546526
Iteration 3 complete. Error: -36.48972676546526 Total: 8.3365; Orientation: 0.0606; Line Search: 5.2072
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/6b05541e-f3b0-4ab6-9630-60a3253a1180.jpg)
Adding measurement 3d9f1ee8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.765e+04, gradient 7.741e-04, dot -0.877; [214fefb4-a9c9-417c-bd2c-aef4a26e5ebc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -36.48972676546526, -33.62403123493476, -31.870987018777956, -30.919434744383754
LBFGS Accumulation History: 3 points
Removed measurement 3d9f1ee8 to history. Total: 3
th(0)=-36.48972676546526;dx=-5.986271380880323E-7
New Minimum: -36.48972676546526 > -40.53405755770596
END: th(7818012.6031877)=-40.53405755770596; dx=-3.6397140437145694E-7 evalInputDelta=4.0443307922407
Fitness changed from -36.48972676546526 to -40.53405755770596
Iteration 4 complete. Error: -40.53405755770596 Total: 9.7848; Orientation: 1.1569; Line Search: 5.3529
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/29d41a2a-1642-4755-9eae-656de9a349f1.jpg)
Adding measurement 32a94a90 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.611e+04, gradient 6.770e-04, dot -0.708; [214fefb4-a9c9-417c-bd2c-aef4a26e5ebc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.53405755770596, -33.62403123493476, -31.870987018777956, -30.919434744383754
LBFGS Accumulation History: 3 points
Removed measurement 32a94a90 to history. Total: 3
th(0)=-40.53405755770596;dx=-4.579687132754515E-7
New Minimum: -40.53405755770596 > -45.351703920265166
END: th(1.684339755941405E7)=-45.351703920265166; dx=-1.5654970869494962E-7 evalInputDelta=4.817646362559209
Fitness changed from -40.53405755770596 to -45.351703920265166
Iteration 5 complete. Error: -45.351703920265166 Total: 9.6618; Orientation: 1.0908; Line Search: 5.4905
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e74eeec9-d72c-4cc1-be8c-1d5fb6383c13.jpg)
Adding measurement 3a7ce806 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.602e+04, gradient 7.241e-04, dot -0.466; [214fefb4-a9c9-417c-bd2c-aef4a26e5ebc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.351703920265166, -33.62403123493476, -31.870987018777956, -30.919434744383754
LBFGS Accumulation History: 3 points
Removed measurement 3a7ce806 to history. Total: 3
th(0)=-45.351703920265166;dx=-5.235966285723026E-7
New Minimum: -45.351703920265166 > -47.70891112111689
WOLF (strong): th(3.6288E7)=-47.70891112111689; dx=4.178391287755698E-8 evalInputDelta=2.3572072008517253
New Minimum: -47.70891112111689 > -48.53035752121985
WOLF (strong): th(1.8144E7)=-48.53035752121985; dx=1.0529778234874515E-8 evalInputDelta=3.178653600954682
END: th(6048000.0)=-47.81595002989387; dx=-2.192687746265417E-7 evalInputDelta=2.4642461096287036
Fitness changed from -45.351703920265166 to -48.53035752121985
Iteration 6 complete. Error: -48.53035752121985 Total: 15.9647; Orientation: 1.0472; Line Search: 11.7011
Adding measurement 23e2d8f5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.680e+04, gradient 7.716e-04, dot -0.354; [214fefb4-a9c9-417c-bd2c-aef4a26e5ebc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.53035752121985, -33.62403123493476, -31.870987018777956, -30.919434744383754
LBFGS Accumulation History: 3 points
Removed measurement 23e2d8f5 to history. Total: 3
th(0)=-48.53035752121985;dx=-5.951400852352905E-7
New Minimum: -48.53035752121985 > -52.74312706037142
END: th(1.3030021005312834E7)=-52.74312706037142; dx=-1.020228986141704E-8 evalInputDelta=4.212769539151573
Fitness changed from -48.53035752121985 to -52.74312706037142
Iteration 7 complete. Error: -52.74312706037142 Total: 9.1516; Orientation: 1.0454; Line Search: 5.4692
Adding measurement 33a6e43f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.402e+04, gradient 6.413e-04, dot -0.446; [214fefb4-a9c9-417c-bd2c-aef4a26e5ebc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -52.74312706037142, -33.62403123493476, -31.870987018777956, -30.919434744383754
LBFGS Accumulation History: 3 points
Removed measurement 33a6e43f to history. Total: 3
th(0)=-52.74312706037142;dx=-4.109686435043319E-7
New Minimum: -52.74312706037142 > -54.08202545951311
WOLF (strong): th(2.8072329265690092E7)=-54.08202545951311; dx=9.882782642107577E-8 evalInputDelta=1.3388983991416907
New Minimum: -54.08202545951311 > -55.378214472594635
WOLF (strong): th(1.4036164632845046E7)=-55.378214472594635; dx=1.2016267037980468E-8 evalInputDelta=2.635087412223214
END: th(4678721.544281682)=-54.43443109497678; dx=-2.496643465107885E-7 evalInputDelta=1.6913040346053592
Fitness changed from -52.74312706037142 to -55.378214472594635
Iteration 8 complete. Error: -55.378214472594635 Total: 14.6295; Orientation: 1.5242; Line Search: 10.5271
Adding measurement 1c07f5fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.760e+04, gradient 6.541e-04, dot -0.422; [214fefb4-a9c9-417c-bd2c-aef4a26e5ebc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.378214472594635, -33.62403123493476, -31.870987018777956, -30.919434744383754
LBFGS Accumulation History: 3 points
Removed measurement 1c07f5fb to history. Total: 3
th(0)=-55.378214472594635;dx=-4.2725120987174805E-7
New Minimum: -55.378214472594635 > -57.782216833853504
END: th(1.0080000000000002E7)=-57.782216833853504; dx=-2.297060578228101E-8 evalInputDelta=2.4040023612588683
Fitness changed from -55.378214472594635 to -57.782216833853504
Iteration 9 complete. Error: -57.782216833853504 Total: 8.9597; Orientation: 1.0230; Line Search: 5.3512
Adding measurement 3af70337 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.344e+04, gradient 5.485e-04, dot -0.511; [214fefb4-a9c9-417c-bd2c-aef4a26e5ebc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -57.782216833853504, -33.62403123493476, -31.870987018777956, -30.919434744383754
LBFGS Accumulation History: 3 points
Removed measurement 3af70337 to history. Total: 3
th(0)=-57.782216833853504;dx=-3.00610462122001E-7
New Minimum: -57.782216833853504 > -59.24868589204872
WOLF (strong): th(2.1716701675521392E7)=-59.24868589204872; dx=4.195202652889117E-8 evalInputDelta=1.4664690581952158
New Minimum: -59.24868589204872 > -59.56801621261196
END: th(1.0858350837760696E7)=-59.56801621261196; dx=-3.332015950130007E-8 evalInputDelta=1.7857993787584547
Fitness changed from -57.782216833853504 to -59.56801621261196
Iteration 10 complete. Error: -59.56801621261196 Total: 13.5531; Orientation: 1.0465; Line Search: 9.8757
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6571aeb9-99fd-48c7-952b-3f13b2135dd6.jpg)
Final threshold in iteration 11: -59.56801621261196 (> -Infinity) after 138.705s (< 5400.000s)

Returns

    -59.56801621261196