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 50.74 seconds (1.114 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: 214834385595300
Reset training subject: 214834985388100
Adding measurement 1b8a3cd4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-87.53983576703229;dx=-0.038099967765469686
New Minimum: -87.53983576703229 > -87.59571864634
WOLFE (weak): th(2.154434690031884)=-87.59571864634; dx=-0.03804671101784334 evalInputDelta=0.05588287930771685
New Minimum: -87.59571864634 > -87.65174778542081
WOLFE (weak): th(4.308869380063768)=-87.65174778542081; dx=-0.038371981294250054 evalInputDelta=0.11191201838852294
New Minimum: -87.65174778542081 > -87.87806751823308
WOLFE (weak): th(12.926608140191302)=-87.87806751823308; dx=-0.03834545735595213 evalInputDelta=0.3382317512007944
New Minimum: -87.87806751823308 > -88.94908275822864
WOLFE (weak): th(51.70643256076521)=-88.94908275822864; dx=-0.03904500901687878 evalInputDelta=1.4092469911963548
New Minimum: -88.94908275822864 > -94.83899739241664
WOLFE (weak): th(258.53216280382605)=-94.83899739241664; dx=-0.034816689064758474 evalInputDelta=7.299161625384357
New Minimum: -94.83899739241664 > -114.67678725495576
END: th(1551.1929768229563)=-114.67678725495576; dx=-0.015445091501404638 evalInputDelta=27.13695148792347
Fitness changed from -87.53983576703229 to -114.67678725495576
Iteration 1 complete. Error: -114.67678725495576 Total: 6.0682; Orientation: 0.0167; Line Search: 4.3317
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/fb7aad9e-38b2-4ee5-87d2-00397d4f8784.jpg)
Adding measurement 3e7306cb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-114.67678725495576;dx=-0.04144057410187425
New Minimum: -114.67678725495576 > -156.1350228381352
END: th(3341.943960201201)=-156.1350228381352; dx=-0.008977731909469901 evalInputDelta=41.458235583179444
Fitness changed from -114.67678725495576 to -156.1350228381352
Iteration 2 complete. Error: -156.1350228381352 Total: 1.9230; Orientation: 0.0168; Line Search: 1.2057
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c5cf637b-e643-43bf-8e37-393bf17d7510.jpg)
Adding measurement 48a785cc to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-156.1350228381352;dx=-0.042810297583917765
New Minimum: -156.1350228381352 > -204.83042441626228
END: th(7200.000000000001)=-204.83042441626228; dx=-0.004422102435867256 evalInputDelta=48.695401578127075
Fitness changed from -156.1350228381352 to -204.83042441626228
Iteration 3 complete. Error: -204.83042441626228 Total: 2.5926; Orientation: 0.0166; Line Search: 1.4061
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/db0ce18a-4e64-40be-8563-a7b68c6aa657.jpg)
Adding measurement 8094c1d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.800e+03, gradient 2.134e-01, dot -0.219; [28756f06-a7cd-4276-9bc6-014fc7b0c182 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -204.83042441626228, -156.1350228381352, -114.67678725495576, -87.53983576703229
LBFGS Accumulation History: 3 points
Removed measurement 8094c1d to history. Total: 3
th(0)=-204.83042441626228;dx=-0.044777319654058484
New Minimum: -204.83042441626228 > -231.57206062198276
END: th(15511.929768229566)=-231.57206062198276; dx=-0.0016836149837664255 evalInputDelta=26.741636205720482
Fitness changed from -204.83042441626228 to -231.57206062198276
Iteration 4 complete. Error: -231.57206062198276 Total: 2.5437; Orientation: 0.3040; Line Search: 1.2249
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/93747459-ec27-4e76-a3f6-772fea92fc79.jpg)
Adding measurement 76482da0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.644e+03, gradient 1.896e-01, dot -0.168; [28756f06-a7cd-4276-9bc6-014fc7b0c182 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -231.57206062198276, -156.1350228381352, -114.67678725495576, -87.53983576703229
LBFGS Accumulation History: 3 points
Removed measurement 76482da0 to history. Total: 3
th(0)=-231.57206062198276;dx=-0.03587028857354112
New Minimum: -231.57206062198276 > -275.6370799677541
END: th(33419.43960201202)=-275.6370799677541; dx=-6.410237093340264E-4 evalInputDelta=44.06501934577136
Fitness changed from -231.57206062198276 to -275.6370799677541
Iteration 5 complete. Error: -275.6370799677541 Total: 2.4810; Orientation: 0.3050; Line Search: 1.2577
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/4e7487ba-3107-4d3c-96b2-e674c39b5d3a.jpg)
Adding measurement 75d44876 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.122e+03, gradient 1.732e-01, dot -0.115; [28756f06-a7cd-4276-9bc6-014fc7b0c182 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -275.6370799677541, -156.1350228381352, -114.67678725495576, -87.53983576703229
LBFGS Accumulation History: 3 points
Removed measurement 75d44876 to history. Total: 3
th(0)=-275.6370799677541;dx=-0.02995846772128623
Armijo: th(72000.00000000003)=-269.2303336125968; dx=-3.611145998002128E-4 evalInputDelta=-6.406746355157338
New Minimum: -275.6370799677541 > -356.5338161133336
END: th(36000.000000000015)=-356.5338161133336; dx=-0.0019403811584457623 evalInputDelta=80.8967361455795
Fitness changed from -275.6370799677541 to -356.5338161133336
Iteration 6 complete. Error: -356.5338161133336 Total: 3.1265; Orientation: 0.3077; Line Search: 1.8731
Adding measurement 1d7f91c8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.383e+03, gradient 1.749e-01, dot -0.106; [28756f06-a7cd-4276-9bc6-014fc7b0c182 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -356.5338161133336, -156.1350228381352, -114.67678725495576, -87.53983576703229
LBFGS Accumulation History: 3 points
Removed measurement 1d7f91c8 to history. Total: 3
th(0)=-356.5338161133336;dx=-0.030533418021645557
New Minimum: -356.5338161133336 > -370.45069266716047
END: th(77559.64884114785)=-370.45069266716047; dx=-4.91853854617434E-5 evalInputDelta=13.916876553826853
Fitness changed from -356.5338161133336 to -370.45069266716047
Iteration 7 complete. Error: -370.45069266716047 Total: 2.0958; Orientation: 0.3033; Line Search: 1.2359
Adding measurement 3d4ced3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.549e+03, gradient 1.559e-01, dot -0.065; [28756f06-a7cd-4276-9bc6-014fc7b0c182 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -370.45069266716047, -156.1350228381352, -114.67678725495576, -87.53983576703229
LBFGS Accumulation History: 3 points
Removed measurement 3d4ced3 to history. Total: 3
th(0)=-370.45069266716047;dx=-0.024265779188281125
Armijo: th(167097.19801006012)=-284.3480123354506; dx=3.8083098389710373E-4 evalInputDelta=-86.10268033170985
New Minimum: -370.45069266716047 > -525.002834767351
END: th(83548.59900503006)=-525.002834767351; dx=-0.0010462140652685381 evalInputDelta=154.55214210019057
Fitness changed from -370.45069266716047 to -525.002834767351
Iteration 8 complete. Error: -525.002834767351 Total: 3.2174; Orientation: 0.3117; Line Search: 2.3515
Adding measurement 5ed9ae00 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.412e+04, gradient 1.584e-01, dot -0.069; [28756f06-a7cd-4276-9bc6-014fc7b0c182 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -525.002834767351, -156.1350228381352, -114.67678725495576, -87.53983576703229
LBFGS Accumulation History: 3 points
Removed measurement 5ed9ae00 to history. Total: 3
th(0)=-525.002834767351;dx=-0.025044844068460793
Armijo: th(180000.0000000001)=-382.9789634768744; dx=6.205281466073581E-4 evalInputDelta=-142.02387129047662
New Minimum: -525.002834767351 > -710.8055350193792
END: th(90000.00000000004)=-710.8055350193792; dx=-0.0016179371598588341 evalInputDelta=185.80270025202822
Fitness changed from -525.002834767351 to -710.8055350193792
Iteration 9 complete. Error: -710.8055350193792 Total: 2.6853; Orientation: 0.2928; Line Search: 1.8376
Adding measurement 36f849cc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.077e+04, gradient 1.603e-01, dot -0.090; [28756f06-a7cd-4276-9bc6-014fc7b0c182 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -710.8055350193792, -156.1350228381352, -114.67678725495576, -87.53983576703229
LBFGS Accumulation History: 3 points
Removed measurement 36f849cc to history. Total: 3
th(0)=-710.8055350193792;dx=-0.025636426802623884
Armijo: th(193899.12210286965)=-417.71621533555754; dx=6.211514565167986E-4 evalInputDelta=-293.0893196838217
New Minimum: -710.8055350193792 > -809.3319319882755
END: th(96949.56105143482)=-809.3319319882755; dx=-0.0013280070050711722 evalInputDelta=98.52639696889628
Fitness changed from -710.8055350193792 to -809.3319319882755
Iteration 10 complete. Error: -809.3319319882755 Total: 2.6695; Orientation: 0.3022; Line Search: 1.7994
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e6dfb017-6780-48b0-81ed-171b4b701d4b.jpg)
Adding measurement 5ed1f423 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.960e+05, gradient 1.629e-01, dot -0.095; [28756f06-a7cd-4276-9bc6-014fc7b0c182 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -809.3319319882755, -156.1350228381352, -114.67678725495576, -87.53983576703229
LBFGS Accumulation History: 3 points
Removed measurement 5ed1f423 to history. Total: 3
th(0)=-809.3319319882755;dx=-0.026444279205033023
Armijo: th(208871.49751257518)=-487.02263923695557; dx=9.120956632878275E-4 evalInputDelta=-322.30929275131996
New Minimum: -809.3319319882755 > -947.1623946546788
END: th(104435.74875628759)=-947.1623946546788; dx=-0.0013450497044023794 evalInputDelta=137.83046266640326
Fitness changed from -809.3319319882755 to -947.1623946546788
Iteration 11 complete. Error: -947.1623946546788 Total: 3.0707; Orientation: 0.3028; Line Search: 1.8492
Adding measurement 5046ef40 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.882e+04, gradient 1.614e-01, dot -0.082; [28756f06-a7cd-4276-9bc6-014fc7b0c182 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -947.1623946546788, -156.1350228381352, -114.67678725495576, -87.53983576703229
LBFGS Accumulation History: 3 points
Removed measurement 5046ef40 to history. Total: 3
th(0)=-947.1623946546788;dx=-0.025988620766447184
Armijo: th(225000.00000000015)=-547.1039774493419; dx=9.962549859764852E-4 evalInputDelta=-400.0584172053369
New Minimum: -947.1623946546788 > -1075.0770756380075
END: th(112500.00000000007)=-1075.0770756380075; dx=-0.0011943443452739366 evalInputDelta=127.91468098332871
Fitness changed from -947.1623946546788 to -1075.0770756380075
Iteration 12 complete. Error: -1075.0770756380075 Total: 2.9840; Orientation: 0.2958; Line Search: 2.1105
Adding measurement 65abd604 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 7.442e+04, gradient 1.605e-01, dot 0.107; [28756f06-a7cd-4276-9bc6-014fc7b0c182 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1075.0770756380075;dx=-1275.6119288823006
Armijo: th(242373.9026285871)=20.867891683220705; dx=0.0026059652735346056 evalInputDelta=-1095.9449673212282
Armijo: th(121186.95131429355)=20.85788381681664; dx=0.005219149265651667 evalInputDelta=-1095.9349594548241
Armijo: th(40395.65043809785)=20.82738073203575; dx=0.01560993968980045 evalInputDelta=-1095.9044563700431
Armijo: th(10098.912609524463)=20.628938573738537; dx=0.06255731892460611 evalInputDelta=-1095.7060142117462
Armijo: th(2019.7825219048925)=20.222954924025885; dx=0.3123560964839386 evalInputDelta=-1095.3000305620335
Armijo: th(336.6304203174821)=17.774350076608243; dx=1.8713105620720658 evalInputDelta=-1092.8514257146157
Armijo: th(48.09006004535458)=4.309832608217334; dx=12.866388440984059 evalInputDelta=-1079.3869082462247
Armijo: th(6.011257505669323)=-109.9606191604239; dx=93.08040459912664 evalInputDelta=-965.1164564775836
Armijo: th(0.6679175006299247)=-693.1599504486807; dx=297.529345354499 evalInputDelta=-381.91712518932684
Armijo: th(0.06679175006299247)=-1055.7195446723163; dx=-110.06325527793086 evalInputDelta=-19.35753096569124
Armijo: th(0.006071977278453861)=-1074.21900824554; dx=-276.20455106751825 evalInputDelta=-0.8580673924675466
Armijo: th(5.059981065378218E-4)=-1075.016679710079; dx=-298.46182093827747 evalInputDelta=-0.060395927928539095
Armijo: th(3.892293127214014E-5)=-1075.0725285698627; dx=-302.4339649685303 evalInputDelta=-0.004547068144802324
Armijo: th(2.7802093765814384E-6)=-1075.0767510810465; dx=-301.46781852701014 evalInputDelta=-3.2455696100441855E-4
Armijo: th(1.8534729177209588E-7)=-1075.0770692545543; dx=-300.35143872006074 evalInputDelta=-6.383453182934318E-6
Armijo: th(1.1584205735755993E-8)=-1075.0770756380075; dx=-299.9393130646634 evalInputDelta=0.0
Armijo: th(6.81423866809176E-10)=-1075.0770756380075; dx=-299.31611380348136 evalInputDelta=0.0
MIN ALPHA (3.7856881489398664E-11): th(0.0)=-1075.0770756380075
Fitness changed from -1075.0770756380075 to -1075.0770756380075
Static Iteration Total: 12.9148; Orientation: 0.2843; Line Search: 12.0807
Iteration 13 failed. Error: -1075.0770756380075
Previous Error: 0.0 -> -1075.0770756380075
Retrying iteration 13
Reset training subject: 214882758324500
Adding measurement d77a1ac to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-1075.0770756380075;dx=-0.025743305206623802
END: th(2.1544346900318838E-10)=-1075.0770756380075; dx=-0.02075485505692897 evalInputDelta=0.0
Fitness changed from -1075.0770756380075 to -1075.0770756380075
Static Iteration Total: 2.3649; Orientation: 0.0158; Line Search: 1.2095
Iteration 14 failed. Error: -1075.0770756380075
Previous Error: 0.0 -> -1075.0770756380075
Optimization terminated 14
Final threshold in iteration 14: -1075.0770756380075 (> -Infinity) after 50.738s (< 5400.000s)

Returns

    -1075.0770756380075