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 827.30 seconds (3.002 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: 14727944212050
Reset training subject: 14745775029603
Adding measurement 45103048 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=7.093442291021347;dx=-3.8658023819602696E-7
New Minimum: 7.093442291021347 > 7.093438506126404
WOLFE (weak): th(2.154434690031884)=7.093438506126404; dx=-3.9079860044542316E-7 evalInputDelta=3.7848949432373047E-6
New Minimum: 7.093438506126404 > 7.093434572219849
WOLFE (weak): th(4.308869380063768)=7.093434572219849; dx=-3.914901531457956E-7 evalInputDelta=7.718801498413086E-6
New Minimum: 7.093434572219849 > 7.093421086668968
WOLFE (weak): th(12.926608140191302)=7.093421086668968; dx=-3.9195051462683776E-7 evalInputDelta=2.1204352378845215E-5
New Minimum: 7.093421086668968 > 7.0933599174022675
WOLFE (weak): th(51.70643256076521)=7.0933599174022675; dx=-3.892292433802995E-7 evalInputDelta=8.237361907958984E-5
New Minimum: 7.0933599174022675 > 7.093031898140907
WOLFE (weak): th(258.53216280382605)=7.093031898140907; dx=-3.909688636499428E-7 evalInputDelta=4.103928804397583E-4
New Minimum: 7.093031898140907 > 7.090983659029007
WOLFE (weak): th(1551.1929768229563)=7.090983659029007; dx=-3.9253086062115645E-7 evalInputDelta=0.002458631992340088
New Minimum: 7.090983659029007 > 7.073937013745308
WOLFE (weak): th(10858.350837760694)=7.073937013745308; dx=-3.8985727497556944E-7 evalInputDelta=0.019505277276039124
New Minimum: 7.073937013745308 > 6.9530580043792725
WOLFE (weak): th(86866.80670208555)=6.9530580043792725; dx=-3.848553515198025E-7 evalInputDelta=0.14038428664207458
New Minimum: 6.9530580043792725 > 5.971452534198761
END: th(781801.26031877)=5.971452534198761; dx=-2.85780879005292E-7 evalInputDelta=1.121989756822586
Fitness changed from 7.093442291021347 to 5.971452534198761
Iteration 1 complete. Error: 5.971452534198761 Total: 239.4467; Orientation: 0.0223; Line Search: 185.3187
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/01cd85a2-634d-42d1-820a-dc863f5f56f4.jpg)

    Adding measurement 653a484c to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=5.971452534198761;dx=-2.8812570748961227E-7
    New Minimum: 5.971452534198761 > 4.396218687295914
    END: th(1684339.7559414052)=4.396218687295914; dx=-1.799133165773547E-7 evalInputDelta=1.5752338469028473
    Fitness changed from 5.971452534198761 to 4.396218687295914
    Iteration 2 complete. Error: 4.396218687295914 Total: 54.4906; Orientation: 0.0121; Line Search: 36.1847
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/65596d32-1f3d-47a1-9359-9f3a714cd5ea.jpg)

    Adding measurement a343eb1 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=4.396218687295914;dx=-1.981856185083896E-7
    New Minimum: 4.396218687295914 > 2.5581823587417603
    END: th(3628800.0)=2.5581823587417603; dx=-1.0155092541495146E-7 evalInputDelta=1.8380363285541534
    Fitness changed from 4.396218687295914 to 2.5581823587417603
    Iteration 3 complete. Error: 2.5581823587417603 Total: 55.2951; Orientation: 0.0112; Line Search: 36.5659
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/a1132869-20df-4f38-a7bf-8491760e194c.jpg)

    Adding measurement 620f4a38 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.563e+03, gradient 3.657e-04, dot -0.666; [d52788ae-ee14-459e-b5aa-0cc7502b23b1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.5581823587417603, 4.396218687295914, 5.971452534198761, 7.093442291021347
    LBFGS Accumulation History: 3 points
    Removed measurement 620f4a38 to history. Total: 3
    th(0)=2.5581823587417603;dx=-1.294832568853622E-7
    New Minimum: 2.5581823587417603 > 0.8631969094276428
    END: th(7818012.6031877)=0.8631969094276428; dx=-4.4847687826531E-8 evalInputDelta=1.6949854493141174
    Fitness changed from 2.5581823587417603 to 0.8631969094276428
    Iteration 4 complete. Error: 0.8631969094276428 Total: 54.8881; Orientation: 0.3369; Line Search: 35.8890
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/146f014c-bea2-4900-a443-56e5d5de85aa.jpg)

    Adding measurement 3e95c6e3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.585e+03, gradient 3.138e-04, dot -0.490; [d52788ae-ee14-459e-b5aa-0cc7502b23b1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.8631969094276428, 4.396218687295914, 5.971452534198761, 7.093442291021347
    LBFGS Accumulation History: 3 points
    Removed measurement 3e95c6e3 to history. Total: 3
    th(0)=0.8631969094276428;dx=-9.656015373613446E-8
    New Minimum: 0.8631969094276428 > 0.08310878276824951
    END: th(1.684339755941405E7)=0.08310878276824951; dx=-8.648569982051132E-9 evalInputDelta=0.7800881266593933
    Fitness changed from 0.8631969094276428 to 0.08310878276824951
    Iteration 5 complete. Error: 0.08310878276824951 Total: 56.3005; Orientation: 0.2948; Line Search: 37.2834
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/495c4e6f-b0df-411a-ac2a-26b07a9b1fac.jpg)

    Adding measurement 22b32379 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.072e+03, gradient 3.110e-04, dot -0.288; [d52788ae-ee14-459e-b5aa-0cc7502b23b1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.08310878276824951, 4.396218687295914, 5.971452534198761, 7.093442291021347
    LBFGS Accumulation History: 3 points
    Removed measurement 22b32379 to history. Total: 3
    th(0)=0.08310878276824951;dx=-9.457803600832177E-8
    Armijo: th(3.6288E7)=1.475700430572033; dx=1.6805806148939113E-8 evalInputDelta=-1.3925916478037834
    New Minimum: 0.08310878276824951 > -0.19071878492832184
    WOLF (strong): th(1.8144E7)=-0.19071878492832184; dx=1.0908828251638409E-8 evalInputDelta=0.27382756769657135
    New Minimum: -0.19071878492832184 > -0.8926801085472107
    END: th(6048000.0)=-0.8926801085472107; dx=-1.6029508927540928E-8 evalInputDelta=0.9757888913154602
    Fitness changed from 0.08310878276824951 to -0.8926801085472107
    Iteration 6 complete. Error: -0.8926801085472107 Total: 91.0256; Orientation: 0.2831; Line Search: 72.4815
    Adding measurement 58d85774 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.749e+03, gradient 2.099e-04, dot -0.334; [d52788ae-ee14-459e-b5aa-0cc7502b23b1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.8926801085472107, 4.396218687295914, 5.971452534198761, 7.093442291021347
    LBFGS Accumulation History: 3 points
    Removed measurement 58d85774 to history. Total: 3
    th(0)=-0.8926801085472107;dx=-4.269751790913613E-8
    New Minimum: -0.8926801085472107 > -1.2236470431089401
    END: th(1.3030021005312834E7)=-1.2236470431089401; dx=-3.956652772771599E-9 evalInputDelta=0.33096693456172943
    Fitness changed from -0.8926801085472107 to -1.2236470431089401
    Iteration 7 complete. Error: -1.2236470431089401 Total: 55.1094; Orientation: 0.3150; Line Search: 36.9712
    Adding measurement 65c7036d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.656e+03, gradient 2.380e-04, dot -0.277; [d52788ae-ee14-459e-b5aa-0cc7502b23b1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.2236470431089401, 4.396218687295914, 5.971452534198761, 7.093442291021347
    LBFGS Accumulation History: 3 points
    Removed measurement 65c7036d to history. Total: 3
    th(0)=-1.2236470431089401;dx=-5.455083892603736E-8
    Armijo: th(2.8072329265690092E7)=-0.45669618248939514; dx=9.765541673980654E-9 evalInputDelta=-0.766950860619545
    New Minimum: -1.2236470431089401 > -1.4098786190152168
    WOLF (strong): th(1.4036164632845046E7)=-1.4098786190152168; dx=2.3912981413348377E-9 evalInputDelta=0.1862315759062767
    New Minimum: -1.4098786190152168 > -1.6881716847419739
    END: th(4678721.544281682)=-1.6881716847419739; dx=-1.645310857533276E-8 evalInputDelta=0.46452464163303375
    Fitness changed from -1.2236470431089401 to -1.6881716847419739
    Iteration 8 complete. Error: -1.6881716847419739 Total: 91.8384; Orientation: 0.3779; Line Search: 73.6361
    Adding measurement 45a05ef6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.942e+03, gradient 1.626e-04, dot -0.373; [d52788ae-ee14-459e-b5aa-0cc7502b23b1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6881716847419739, 4.396218687295914, 5.971452534198761, 7.093442291021347
    LBFGS Accumulation History: 3 points
    Removed measurement 45a05ef6 to history. Total: 3
    th(0)=-1.6881716847419739;dx=-2.526617821165323E-8
    New Minimum: -1.6881716847419739 > -1.909085400402546
    END: th(1.0080000000000002E7)=-1.909085400402546; dx=-9.410784902864164E-9 evalInputDelta=0.22091371566057205
    Fitness changed from -1.6881716847419739 to -1.909085400402546
    Iteration 9 complete. Error: -1.909085400402546 Total: 55.5320; Orientation: 0.2909; Line Search: 36.7788
    Adding measurement 4d80f31 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.610e+03, gradient 1.552e-04, dot -0.341; [d52788ae-ee14-459e-b5aa-0cc7502b23b1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.909085400402546, 4.396218687295914, 5.971452534198761, 7.093442291021347
    LBFGS Accumulation History: 3 points
    Removed measurement 4d80f31 to history. Total: 3
    th(0)=-1.909085400402546;dx=-2.3102258110460938E-8
    Armijo: th(2.1716701675521392E7)=-1.760219119489193; dx=-6.128374265836029E-10 evalInputDelta=-0.14886628091335297
    New Minimum: -1.909085400402546 > -2.0364024192094803
    END: th(1.0858350837760696E7)=-2.0364024192094803; dx=-5.066992096074201E-9 evalInputDelta=0.12731701880693436
    Fitness changed from -1.909085400402546 to -2.0364024192094803
    Iteration 10 complete. Error: -2.0364024192094803 Total: 73.2036; Orientation: 0.2833; Line Search: 54.4364
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/833a38f4-c28f-42f0-be11-823994855287.jpg)

    Final threshold in iteration 11: -2.0364024192094803 (> -Infinity) after 827.295s (< 5400.000s)

Returns

    -2.0364024192094803