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 209.14 seconds (1.898 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: 16723581792746
Reset training subject: 16727709488463
Adding measurement 5705aba0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.4709142744541168;dx=-7.111726342730907E-7
New Minimum: -0.4709142744541168 > -0.4709148406982422
END: th(2.154434690031884)=-0.4709148406982422; dx=-6.184265468979225E-7 evalInputDelta=5.662441253662109E-7
Fitness changed from -0.4709142744541168 to -0.4709148406982422
Iteration 1 complete. Error: -0.4709148406982422 Total: 22.4013; Orientation: 0.0449; Line Search: 9.4734
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/692ff807-12d7-44a6-ae4a-44ce075b1a42.jpg)

    Adding measurement 478f4ea2 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.4709148406982422;dx=-6.18399244266187E-7
    New Minimum: -0.4709148406982422 > -0.4709164500236511
    WOLFE (weak): th(4.641588833612779)=-0.4709164500236511; dx=-6.183868055569813E-7 evalInputDelta=1.6093254089355469E-6
    New Minimum: -0.4709164500236511 > -0.47091782093048096
    WOLFE (weak): th(9.283177667225559)=-0.47091782093048096; dx=-6.183855186816189E-7 evalInputDelta=2.9802322387695312E-6
    New Minimum: -0.47091782093048096 > -0.4709235280752182
    WOLFE (weak): th(27.849533001676676)=-0.4709235280752182; dx=-6.183726392054518E-7 evalInputDelta=8.687376976013184E-6
    New Minimum: -0.4709235280752182 > -0.47094935178756714
    WOLFE (weak): th(111.3981320067067)=-0.47094935178756714; dx=-6.183302713765871E-7 evalInputDelta=3.451108932495117E-5
    New Minimum: -0.47094935178756714 > -0.4710870385169983
    WOLFE (weak): th(556.9906600335335)=-0.4710870385169983; dx=-6.182971307583491E-7 evalInputDelta=1.7219781875610352E-4
    New Minimum: -0.4710870385169983 > -0.47194766998291016
    WOLFE (weak): th(3341.9439602012008)=-0.47194766998291016; dx=-6.177194687816749E-7 evalInputDelta=0.0010328292846679688
    New Minimum: -0.47194766998291016 > -0.4781171977519989
    WOLFE (weak): th(23393.607721408407)=-0.4781171977519989; dx=-6.133574091975269E-7 evalInputDelta=0.007202357053756714
    New Minimum: -0.4781171977519989 > -0.5269774049520493
    WOLFE (weak): th(187148.86177126726)=-0.5269774049520493; dx=-5.802368769751854E-7 evalInputDelta=0.05606256425380707
    New Minimum: -0.5269774049520493 > -0.8442812860012054
    END: th(1684339.7559414054)=-0.8442812860012054; dx=-2.8710617101585774E-7 evalInputDelta=0.37336644530296326
    Fitness changed from -0.4709148406982422 to -0.8442812860012054
    Iteration 2 complete. Error: -0.8442812860012054 Total: 48.1522; Orientation: 0.0453; Line Search: 43.8050
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/2e7e38e7-ae11-41eb-b100-3b856f087a76.jpg)

    Adding measurement 6026efca to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.8442812860012054;dx=-2.7606614380569244E-7
    New Minimum: -0.8442812860012054 > -1.1784127056598663
    END: th(3628800.0000000005)=-1.1784127056598663; dx=-1.179105410398799E-7 evalInputDelta=0.3341314196586609
    Fitness changed from -0.8442812860012054 to -1.1784127056598663
    Iteration 3 complete. Error: -1.1784127056598663 Total: 12.8459; Orientation: 0.0456; Line Search: 8.2190
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/1264f48a-d546-4c26-9a2a-4999bb20720d.jpg)

    Adding measurement 136ba9b6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.810e+03, gradient 3.864e-04, dot -0.607; [60d54373-d0ba-4838-a0a9-006ac894770e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.1784127056598663, -0.8442812860012054, -0.4709148406982422, -0.4709142744541168
    LBFGS Accumulation History: 3 points
    Removed measurement 136ba9b6 to history. Total: 3
    th(0)=-1.1784127056598663;dx=-1.4933280565254686E-7
    New Minimum: -1.1784127056598663 > -1.4825681000947952
    END: th(7818012.603187701)=-1.4825681000947952; dx=-3.478695693194787E-8 evalInputDelta=0.3041553944349289
    Fitness changed from -1.1784127056598663 to -1.4825681000947952
    Iteration 4 complete. Error: -1.4825681000947952 Total: 14.8187; Orientation: 1.3439; Line Search: 9.1980
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/f27c1275-e2ce-41b1-acc5-7bedb6cd9c50.jpg)

    Adding measurement 68d5fc98 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.634e+03, gradient 3.367e-04, dot -0.398; [60d54373-d0ba-4838-a0a9-006ac894770e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.4825681000947952, -0.8442812860012054, -0.4709148406982422, -0.4709142744541168
    LBFGS Accumulation History: 3 points
    Removed measurement 68d5fc98 to history. Total: 3
    th(0)=-1.4825681000947952;dx=-1.1338277671501522E-7
    New Minimum: -1.4825681000947952 > -1.6462176963686943
    WOLF (strong): th(1.6843397559414055E7)=-1.6462176963686943; dx=1.3840388039118637E-8 evalInputDelta=0.16364959627389908
    New Minimum: -1.6462176963686943 > -1.6759580075740814
    END: th(8421698.779707028)=-1.6759580075740814; dx=-4.956991305501077E-9 evalInputDelta=0.1933899074792862
    Fitness changed from -1.4825681000947952 to -1.6759580075740814
    Iteration 5 complete. Error: -1.6759580075740814 Total: 18.5420; Orientation: 1.0220; Line Search: 12.9196
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/3a05e346-30ff-4f0c-bd05-0dc59af0429f.jpg)

    Adding measurement 15160bfa to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.859e+03, gradient 2.881e-04, dot -0.356; [60d54373-d0ba-4838-a0a9-006ac894770e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6759580075740814, -0.8442812860012054, -0.4709148406982422, -0.4709142744541168
    LBFGS Accumulation History: 3 points
    Removed measurement 15160bfa to history. Total: 3
    th(0)=-1.6759580075740814;dx=-8.298239557644946E-8
    New Minimum: -1.6759580075740814 > -1.7451775968074799
    WOLF (strong): th(1.8144000000000004E7)=-1.7451775968074799; dx=2.7638670426268127E-8 evalInputDelta=0.06921958923339844
    New Minimum: -1.7451775968074799 > -1.8318325877189636
    WOLF (strong): th(9072000.000000002)=-1.8318325877189636; dx=1.1853606845918393E-9 evalInputDelta=0.1558745801448822
    END: th(3024000.0000000005)=-1.7718680948019028; dx=-4.452074353627164E-8 evalInputDelta=0.09591008722782135
    Fitness changed from -1.6759580075740814 to -1.8318325877189636
    Iteration 6 complete. Error: -1.8318325877189636 Total: 23.0375; Orientation: 1.0140; Line Search: 17.4564
    Adding measurement 32ee41ac to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.964e+03, gradient 2.438e-04, dot -0.358; [60d54373-d0ba-4838-a0a9-006ac894770e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.8318325877189636, -0.8442812860012054, -0.4709148406982422, -0.4709142744541168
    LBFGS Accumulation History: 3 points
    Removed measurement 32ee41ac to history. Total: 3
    th(0)=-1.8318325877189636;dx=-5.94595873052469E-8
    New Minimum: -1.8318325877189636 > -1.9364710748195648
    END: th(6515010.502656418)=-1.9364710748195648; dx=-1.1869633682191058E-8 evalInputDelta=0.1046384871006012
    Fitness changed from -1.8318325877189636 to -1.9364710748195648
    Iteration 7 complete. Error: -1.9364710748195648 Total: 13.9814; Orientation: 1.0057; Line Search: 8.6447
    Adding measurement 5ffc7df7 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.251e+03, gradient 1.784e-04, dot -0.496; [60d54373-d0ba-4838-a0a9-006ac894770e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.9364710748195648, -0.8442812860012054, -0.4709148406982422, -0.4709142744541168
    LBFGS Accumulation History: 3 points
    Removed measurement 5ffc7df7 to history. Total: 3
    th(0)=-1.9364710748195648;dx=-3.1820584394456584E-8
    New Minimum: -1.9364710748195648 > -2.0234778076410294
    WOLF (strong): th(1.4036164632845048E7)=-2.0234778076410294; dx=1.924005216588952E-9 evalInputDelta=0.08700673282146454
    END: th(7018082.316422524)=-2.009692005813122; dx=-1.0969427514458437E-8 evalInputDelta=0.07322093099355698
    Fitness changed from -1.9364710748195648 to -2.0234778076410294
    Iteration 8 complete. Error: -2.0234778076410294 Total: 18.6579; Orientation: 1.1280; Line Search: 12.5778
    Adding measurement 470decd2 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.899e+03, gradient 2.417e-04, dot -0.250; [60d54373-d0ba-4838-a0a9-006ac894770e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.0234778076410294, -0.8442812860012054, -0.4709148406982422, -0.4709142744541168
    LBFGS Accumulation History: 3 points
    Removed measurement 470decd2 to history. Total: 3
    th(0)=-2.0234778076410294;dx=-5.8423554077446384E-8
    New Minimum: -2.0234778076410294 > -2.039492040872574
    WOLF (strong): th(1.5120000000000006E7)=-2.039492040872574; dx=2.0496072943148516E-8 evalInputDelta=0.016014233231544495
    New Minimum: -2.039492040872574 > -2.0976931750774384
    WOLF (strong): th(7560000.000000003)=-2.0976931750774384; dx=6.169256516792155E-9 evalInputDelta=0.074215367436409
    END: th(2520000.000000001)=-2.0773497372865677; dx=-2.8010635021947098E-8 evalInputDelta=0.05387192964553833
    Fitness changed from -2.0234778076410294 to -2.0976931750774384
    Iteration 9 complete. Error: -2.0976931750774384 Total: 22.5991; Orientation: 1.0811; Line Search: 17.4459
    Adding measurement 2739e63 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.118e+03, gradient 1.733e-04, dot -0.363; [60d54373-d0ba-4838-a0a9-006ac894770e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.0976931750774384, -0.8442812860012054, -0.4709148406982422, -0.4709142744541168
    LBFGS Accumulation History: 3 points
    Removed measurement 2739e63 to history. Total: 3
    th(0)=-2.0976931750774384;dx=-3.002598849869731E-8
    New Minimum: -2.0976931750774384 > -2.1505941972136497
    END: th(5429175.418880349)=-2.1505941972136497; dx=-9.456270329827285E-9 evalInputDelta=0.052901022136211395
    Fitness changed from -2.0976931750774384 to -2.1505941972136497
    Iteration 10 complete. Error: -2.1505941972136497 Total: 14.0346; Orientation: 1.0047; Line Search: 8.5227
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/8f9f05d3-f369-4b9d-b6cf-5fc452fdfc8f.jpg)

    Final threshold in iteration 11: -2.1505941972136497 (> -Infinity) after 209.141s (< 5400.000s)

Returns

    -2.1505941972136497