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:88 executed in 1791.24 seconds (17.587 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: 4131785877981
Reset training subject: 4167099875529
Adding measurement 3c10b206 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=9.240938946959705;dx=-4.4318860815751585E-7
New Minimum: 9.240938946959705 > 9.240938860195499
WOLFE (weak): th(2.154434690031884)=9.240938860195499; dx=-4.385261339506677E-7 evalInputDelta=8.676420648612293E-8
New Minimum: 9.240938860195499 > 9.240938726954365
WOLFE (weak): th(4.308869380063768)=9.240938726954365; dx=-4.3852632928113904E-7 evalInputDelta=2.2000534016797246E-7
New Minimum: 9.240938726954365 > 9.240937439376761
WOLFE (weak): th(12.926608140191302)=9.240937439376761; dx=-4.3852695875091893E-7 evalInputDelta=1.5075829438160326E-6
New Minimum: 9.240937439376761 > 9.240931484005955
WOLFE (weak): th(51.70643256076521)=9.240931484005955; dx=-4.38526701345158E-7 evalInputDelta=7.462953750092538E-6
New Minimum: 9.240931484005955 > 9.240900577227666
WOLFE (weak): th(258.53216280382605)=9.240900577227666; dx=-4.385224511042952E-7 evalInputDelta=3.8369732038745497E-5
New Minimum: 9.240900577227666 > 9.240709310089265
WOLFE (weak): th(1551.1929768229563)=9.240709310089265; dx=-4.384898812389812E-7 evalInputDelta=2.2963687043997538E-4
New Minimum: 9.240709310089265 > 9.239331235174456
WOLFE (weak): th(10858.350837760694)=9.239331235174456; dx=-4.3830004654116825E-7 evalInputDelta=0.0016077117852493217
New Minimum: 9.239331235174456 > 9.228106090218613
WOLFE (weak): th(86866.80670208555)=9.228106090218613; dx=-4.367983725240248E-7 evalInputDelta=0.012832856741091803
New Minimum: 9.228106090218613 > 9.127788452958987
WOLFE (weak): th(781801.26031877)=9.127788452958987; dx=-4.212624574940682E-7 evalInputDelta=0.11315049400071864
New Minimum: 9.127788452958987 > 8.386607313229469
END: th(7818012.6031877)=8.386607313229469; dx=-2.538727747987684E-7 evalInputDelta=0.8543316337302365
Fitness changed from 9.240938946959705 to 8.386607313229469
Iteration 1 complete. Error: 8.386607313229469 Total: 511.2684; Orientation: 0.4763; Line Search: 405.5324
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/10bb232b-4ad8-40f4-96ff-9be701694af2.jpg)

    Adding measurement 2fe761a to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=8.386607313229469;dx=-2.906636174343579E-7
    New Minimum: 8.386607313229469 > 7.495765841304773
    END: th(1.684339755941405E7)=7.495765841304773; dx=-1.2048923331878743E-7 evalInputDelta=0.8908414719246958
    Fitness changed from 8.386607313229469 to 7.495765841304773
    Iteration 2 complete. Error: 7.495765841304773 Total: 109.5492; Orientation: 0.4494; Line Search: 73.5884
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/27ae98b3-8a2d-44d8-a198-2a1551a5a5e9.jpg)

    Adding measurement 18d78580 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=7.495765841304773;dx=-1.8958413171010238E-7
    New Minimum: 7.495765841304773 > 6.864158246499542
    END: th(3.6288E7)=6.864158246499542; dx=-4.780875749629081E-8 evalInputDelta=0.6316075948052307
    Fitness changed from 7.495765841304773 to 6.864158246499542
    Iteration 3 complete. Error: 6.864158246499542 Total: 109.4752; Orientation: 0.4590; Line Search: 73.6255
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/a85f4f57-6bdf-47a4-b18e-acbf730e59c6.jpg)

    Adding measurement 74d82117 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.030e+04, gradient 4.052e-04, dot -0.454; [4b801895-7fdd-4477-af28-a814fdc6f7c0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.864158246499542, 7.495765841304773, 8.386607313229469, 9.240938946959705
    LBFGS Accumulation History: 3 points
    Removed measurement 74d82117 to history. Total: 3
    th(0)=6.864158246499542;dx=-1.6419146255898933E-7
    Armijo: th(7.8180126031877E7)=8.555763857435949; dx=2.985465754931696E-8 evalInputDelta=-1.6916056109364064
    Armijo: th(3.90900630159385E7)=6.889582243910709; dx=-2.5469156076004986E-9 evalInputDelta=-0.025423997411166965
    New Minimum: 6.864158246499542 > 6.552392002203993
    END: th(1.3030021005312832E7)=6.552392002203993; dx=-5.143188693747524E-8 evalInputDelta=0.31176624429554955
    Fitness changed from 6.864158246499542 to 6.552392002203993
    Iteration 4 complete. Error: 6.552392002203993 Total: 195.3877; Orientation: 11.1235; Line Search: 148.5493
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/114b7361-42b6-44a8-8fbc-1e36695fcd74.jpg)

    Adding measurement 5c595ece to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.040e+04, gradient 2.828e-04, dot -0.465; [4b801895-7fdd-4477-af28-a814fdc6f7c0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.552392002203993, 7.495765841304773, 8.386607313229469, 9.240938946959705
    LBFGS Accumulation History: 3 points
    Removed measurement 5c595ece to history. Total: 3
    th(0)=6.552392002203993;dx=-7.998932944966342E-8
    New Minimum: 6.552392002203993 > 6.3468359160063965
    END: th(2.807232926569009E7)=6.3468359160063965; dx=-1.569937210195103E-8 evalInputDelta=0.20555608619759624
    Fitness changed from 6.552392002203993 to 6.3468359160063965
    Iteration 5 complete. Error: 6.3468359160063965 Total: 119.6340; Orientation: 10.4934; Line Search: 73.8179
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/f02cce32-f245-4953-93cb-ed358e8f8527.jpg)

    Adding measurement 2cd7d759 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.405e+04, gradient 3.205e-04, dot -0.419; [4b801895-7fdd-4477-af28-a814fdc6f7c0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.3468359160063965, 7.495765841304773, 8.386607313229469, 9.240938946959705
    LBFGS Accumulation History: 3 points
    Removed measurement 2cd7d759 to history. Total: 3
    th(0)=6.3468359160063965;dx=-1.0270591283379155E-7
    Armijo: th(6.048000000000001E7)=7.810101617696358; dx=6.876998178453818E-8 evalInputDelta=-1.463265701689961
    Armijo: th(3.0240000000000004E7)=6.649622784838488; dx=5.036308326414321E-8 evalInputDelta=-0.3027868688320918
    New Minimum: 6.3468359160063965 > 6.21350947977685
    END: th(1.0080000000000002E7)=6.21350947977685; dx=-1.6221771600260394E-8 evalInputDelta=0.1333264362295461
    Fitness changed from 6.3468359160063965 to 6.21350947977685
    Iteration 6 complete. Error: 6.21350947977685 Total: 193.4373; Orientation: 11.0923; Line Search: 146.8950
    Adding measurement 53abcfaa to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.757e+04, gradient 1.881e-04, dot -0.516; [4b801895-7fdd-4477-af28-a814fdc6f7c0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.21350947977685, 7.495765841304773, 8.386607313229469, 9.240938946959705
    LBFGS Accumulation History: 3 points
    Removed measurement 53abcfaa to history. Total: 3
    th(0)=6.21350947977685;dx=-3.537601248067315E-8
    New Minimum: 6.21350947977685 > 6.144802408243397
    END: th(2.1716701675521392E7)=6.144802408243397; dx=-1.3563697779416167E-8 evalInputDelta=0.06870707153345368
    Fitness changed from 6.21350947977685 to 6.144802408243397
    Iteration 7 complete. Error: 6.144802408243397 Total: 119.1827; Orientation: 11.0767; Line Search: 73.4031
    Adding measurement 2120cab9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.506e+04, gradient 1.991e-04, dot -0.443; [4b801895-7fdd-4477-af28-a814fdc6f7c0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.144802408243397, 7.495765841304773, 8.386607313229469, 9.240938946959705
    LBFGS Accumulation History: 3 points
    Removed measurement 2120cab9 to history. Total: 3
    th(0)=6.144802408243397;dx=-3.9639771908893344E-8
    Armijo: th(4.678721544281682E7)=6.545363935651933; dx=2.6195877811669446E-8 evalInputDelta=-0.4005615274085361
    Armijo: th(2.339360772140841E7)=6.185050052553182; dx=1.0724604342636816E-8 evalInputDelta=-0.040247644309785
    New Minimum: 6.144802408243397 > 6.097403929198912
    END: th(7797869.240469471)=6.097403929198912; dx=-1.734425974586887E-8 evalInputDelta=0.047398479044484354
    Fitness changed from 6.144802408243397 to 6.097403929198912
    Iteration 8 complete. Error: 6.097403929198912 Total: 192.9396; Orientation: 11.0744; Line Search: 146.9077
    Adding measurement 5ea9e044 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.533e+04, gradient 1.405e-04, dot -0.565; [4b801895-7fdd-4477-af28-a814fdc6f7c0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.097403929198912, 7.495765841304773, 8.386607313229469, 9.240938946959705
    LBFGS Accumulation History: 3 points
    Removed measurement 5ea9e044 to history. Total: 3
    th(0)=6.097403929198912;dx=-1.9743097573546203E-8
    New Minimum: 6.097403929198912 > 6.070631581206528
    END: th(1.6800000000000004E7)=6.070631581206528; dx=-1.537778634194088E-8 evalInputDelta=0.026772347992384482
    Fitness changed from 6.097403929198912 to 6.070631581206528
    Iteration 9 complete. Error: 6.070631581206528 Total: 119.4781; Orientation: 10.9047; Line Search: 73.8057
    Adding measurement 3fd0641b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.366e+04, gradient 1.291e-04, dot -0.552; [4b801895-7fdd-4477-af28-a814fdc6f7c0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.070631581206528, 7.495765841304773, 8.386607313229469, 9.240938946959705
    LBFGS Accumulation History: 3 points
    Removed measurement 3fd0641b to history. Total: 3
    th(0)=6.070631581206528;dx=-1.6669401773940645E-8
    New Minimum: 6.070631581206528 > 6.06197661789233
    END: th(3.6194502792535655E7)=6.06197661789233; dx=-9.25370111483881E-9 evalInputDelta=0.008654963314198127
    Fitness changed from 6.070631581206528 to 6.06197661789233
    Iteration 10 complete. Error: 6.06197661789233 Total: 120.3435; Orientation: 11.5610; Line Search: 73.7852
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/d197bf55-ea0e-43fc-bdf8-982e3b6fb157.jpg)

    Final threshold in iteration 11: 6.06197661789233 (> -Infinity) after 1791.228s (< 10800.000s)

Returns

    6.06197661789233