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 55.00 seconds (0.984 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: 213199420445600
Reset training subject: 213200028216200
Adding measurement 9405163 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-18.477675660145522;dx=-0.0077363402592029494
New Minimum: -18.477675660145522 > -18.487432331190433
WOLFE (weak): th(2.154434690031884)=-18.487432331190433; dx=-0.0077433196973829 evalInputDelta=0.009756671044911513
New Minimum: -18.487432331190433 > -18.49719272070437
WOLFE (weak): th(4.308869380063768)=-18.49719272070437; dx=-0.007744010459976236 evalInputDelta=0.019517060558847277
New Minimum: -18.49719272070437 > -18.536350197524598
WOLFE (weak): th(12.926608140191302)=-18.536350197524598; dx=-0.007756793882018107 evalInputDelta=0.05867453737907624
New Minimum: -18.536350197524598 > -18.712725098002647
WOLFE (weak): th(51.70643256076521)=-18.712725098002647; dx=-0.0077249650467838184 evalInputDelta=0.23504943785712484
New Minimum: -18.712725098002647 > -19.670443898836307
WOLFE (weak): th(258.53216280382605)=-19.670443898836307; dx=-0.007923917369724667 evalInputDelta=1.1927682386907854
New Minimum: -19.670443898836307 > -26.20022454220364
WOLFE (weak): th(1551.1929768229563)=-26.20022454220364; dx=-0.007583612371684336 evalInputDelta=7.722548882058117
New Minimum: -26.20022454220364 > -49.803080064601176
END: th(10858.350837760694)=-49.803080064601176; dx=-0.0016682324235274123 evalInputDelta=31.325404404455654
Fitness changed from -18.477675660145522 to -49.803080064601176
Iteration 1 complete. Error: -49.803080064601176 Total: 6.9872; Orientation: 0.0169; Line Search: 5.1745
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8779d1c7-0044-4114-bc94-e93a32260507.jpg)
Adding measurement 6d24d173 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-49.803080064601176;dx=-0.01619754541005501
New Minimum: -49.803080064601176 > -82.55601725769314
END: th(23393.607721408407)=-82.55601725769314; dx=-2.5939824319933376E-4 evalInputDelta=32.75293719309197
Fitness changed from -49.803080064601176 to -82.55601725769314
Iteration 2 complete. Error: -82.55601725769314 Total: 1.8410; Orientation: 0.0165; Line Search: 1.2507
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/9c464502-5821-4540-aea4-afa4ebbc17b2.jpg)
Adding measurement 56cdf69b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-82.55601725769314;dx=-0.011582246696581606
Armijo: th(50400.00000000001)=-81.10755602972407; dx=-2.0709503123583284E-4 evalInputDelta=-1.4484612279690765
New Minimum: -82.55601725769314 > -114.0221612018016
END: th(25200.000000000004)=-114.0221612018016; dx=-0.001559972988380935 evalInputDelta=31.466143944108453
Fitness changed from -82.55601725769314 to -114.0221612018016
Iteration 3 complete. Error: -114.0221612018016 Total: 2.4941; Orientation: 0.0174; Line Search: 1.8912
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7b8aa2f2-f667-4f6b-82c4-3a37cb5a56d4.jpg)
Adding measurement 3c3c0916 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.056e+03, gradient 1.043e-01, dot -0.265; [0c002226-a5e7-488a-9c1d-1ff732b5c55e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -114.0221612018016, -82.55601725769314, -49.803080064601176, -18.477675660145522
LBFGS Accumulation History: 3 points
Removed measurement 3c3c0916 to history. Total: 3
th(0)=-114.0221612018016;dx=-0.010857760257857736
New Minimum: -114.0221612018016 > -115.57860191948654
END: th(54291.75418880348)=-115.57860191948654; dx=-4.898844130415542E-4 evalInputDelta=1.55644071768495
Fitness changed from -114.0221612018016 to -115.57860191948654
Iteration 4 complete. Error: -115.57860191948654 Total: 2.2915; Orientation: 0.3375; Line Search: 1.2817
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/fa966da3-7281-402c-bc03-2b73258a4c71.jpg)
Adding measurement 1f739627 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.425e+03, gradient 1.072e-01, dot -0.205; [0c002226-a5e7-488a-9c1d-1ff732b5c55e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -115.57860191948654, -82.55601725769314, -49.803080064601176, -18.477675660145522
LBFGS Accumulation History: 3 points
Removed measurement 1f739627 to history. Total: 3
th(0)=-115.57860191948654;dx=-0.011477210872966484
Armijo: th(116968.03860704206)=-2.874693831677888; dx=2.2951109100936463E-4 evalInputDelta=-112.70390808780866
New Minimum: -115.57860191948654 > -142.3161623427545
END: th(58484.01930352103)=-142.3161623427545; dx=-8.197552076506863E-4 evalInputDelta=26.73756042326795
Fitness changed from -115.57860191948654 to -142.3161623427545
Iteration 5 complete. Error: -142.3161623427545 Total: 2.7988; Orientation: 0.2968; Line Search: 1.9162
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/af89b034-060b-458f-9a6c-b960122e328d.jpg)
Adding measurement 4190f278 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.959e+03, gradient 9.608e-02, dot -0.169; [0c002226-a5e7-488a-9c1d-1ff732b5c55e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -142.3161623427545, -82.55601725769314, -49.803080064601176, -18.477675660145522
LBFGS Accumulation History: 3 points
Removed measurement 4190f278 to history. Total: 3
th(0)=-142.3161623427545;dx=-0.009207762864309266
Armijo: th(126000.00000000004)=-44.11968906214497; dx=9.541387779358598E-5 evalInputDelta=-98.19647328060952
New Minimum: -142.3161623427545 > -198.64433456811355
END: th(63000.00000000002)=-198.64433456811355; dx=-0.0015297369489271034 evalInputDelta=56.328172225359054
Fitness changed from -142.3161623427545 to -198.64433456811355
Iteration 6 complete. Error: -198.64433456811355 Total: 3.0978; Orientation: 0.2829; Line Search: 1.8895
Adding measurement 55a68cb9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.213e+03, gradient 9.598e-02, dot -0.141; [0c002226-a5e7-488a-9c1d-1ff732b5c55e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -198.64433456811355, -82.55601725769314, -49.803080064601176, -18.477675660145522
LBFGS Accumulation History: 3 points
Removed measurement 55a68cb9 to history. Total: 3
th(0)=-198.64433456811355;dx=-0.009184390363509053
Armijo: th(135729.38547200873)=-43.72050589785445; dx=1.825166715234314E-4 evalInputDelta=-154.9238286702591
New Minimum: -198.64433456811355 > -242.69715001854843
END: th(67864.69273600436)=-242.69715001854843; dx=-0.001465610470453561 evalInputDelta=44.05281545043488
Fitness changed from -198.64433456811355 to -242.69715001854843
Iteration 7 complete. Error: -242.69715001854843 Total: 2.7609; Orientation: 0.3405; Line Search: 1.8323
Adding measurement 63730298 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.253e+04, gradient 9.830e-02, dot -0.129; [0c002226-a5e7-488a-9c1d-1ff732b5c55e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -242.69715001854843, -82.55601725769314, -49.803080064601176, -18.477675660145522
LBFGS Accumulation History: 3 points
Removed measurement 63730298 to history. Total: 3
th(0)=-242.69715001854843;dx=-0.009651347547820965
Armijo: th(146210.0482588026)=-29.533891362357394; dx=1.7032419362505654E-4 evalInputDelta=-213.16325865619103
New Minimum: -242.69715001854843 > -254.62501151287302
END: th(73105.0241294013)=-254.62501151287302; dx=-0.0013216089022704857 evalInputDelta=11.927861494324588
Fitness changed from -242.69715001854843 to -254.62501151287302
Iteration 8 complete. Error: -254.62501151287302 Total: 2.7372; Orientation: 0.2940; Line Search: 1.8900
Adding measurement 2a0d2f6e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.191e+04, gradient 1.022e-01, dot -0.119; [0c002226-a5e7-488a-9c1d-1ff732b5c55e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -254.62501151287302, -82.55601725769314, -49.803080064601176, -18.477675660145522
LBFGS Accumulation History: 3 points
Removed measurement 2a0d2f6e to history. Total: 3
th(0)=-254.62501151287302;dx=-0.010415194492357178
Armijo: th(157500.00000000006)=-25.225291172817833; dx=2.5526967898154045E-4 evalInputDelta=-229.39972034005518
New Minimum: -254.62501151287302 > -280.1252376334502
END: th(78750.00000000003)=-280.1252376334502; dx=-0.0012057269852337193 evalInputDelta=25.500226120577167
Fitness changed from -254.62501151287302 to -280.1252376334502
Iteration 9 complete. Error: -280.1252376334502 Total: 2.8064; Orientation: 0.2991; Line Search: 1.9408
Adding measurement 31cc510d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.669e+04, gradient 9.847e-02, dot -0.119; [0c002226-a5e7-488a-9c1d-1ff732b5c55e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -280.1252376334502, -82.55601725769314, -49.803080064601176, -18.477675660145522
LBFGS Accumulation History: 3 points
Removed measurement 31cc510d to history. Total: 3
th(0)=-280.1252376334502;dx=-0.009689566572828302
Armijo: th(169661.7318400109)=-4.433528255210376; dx=3.471277217426698E-4 evalInputDelta=-275.6917093782398
New Minimum: -280.1252376334502 > -304.34396684613495
END: th(84830.86592000545)=-304.34396684613495; dx=-0.0012459694290887602 evalInputDelta=24.218729212684764
Fitness changed from -280.1252376334502 to -304.34396684613495
Iteration 10 complete. Error: -304.34396684613495 Total: 3.0370; Orientation: 0.2786; Line Search: 1.8446
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/305f19c5-deb5-468a-8789-c06bd483890e.jpg)
Adding measurement 145554d9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.112e+04, gradient 1.037e-01, dot -0.106; [0c002226-a5e7-488a-9c1d-1ff732b5c55e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -304.34396684613495, -82.55601725769314, -49.803080064601176, -18.477675660145522
LBFGS Accumulation History: 3 points
Removed measurement 145554d9 to history. Total: 3
th(0)=-304.34396684613495;dx=-0.010745296302281965
Armijo: th(182762.56032350325)=18.331949213120993; dx=3.927933329561263E-4 evalInputDelta=-322.67591605925594
Armijo: th(91381.28016175162)=-301.64261881932566; dx=-9.716558990636582E-4 evalInputDelta=-2.701348026809285
New Minimum: -304.34396684613495 > -398.42854000423233
END: th(30460.426720583873)=-398.42854000423233; dx=-0.0050566015019183385 evalInputDelta=94.08457315809738
Fitness changed from -304.34396684613495 to -398.42854000423233
Iteration 11 complete. Error: -398.42854000423233 Total: 3.3531; Orientation: 0.2983; Line Search: 2.4566
Adding measurement 2b080464 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.605e+06, gradient 9.004e-02, dot -0.147; [0c002226-a5e7-488a-9c1d-1ff732b5c55e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -398.42854000423233, -82.55601725769314, -49.803080064601176, -18.477675660145522
LBFGS Accumulation History: 3 points
Removed measurement 2b080464 to history. Total: 3
th(0)=-398.42854000423233;dx=-0.008093921828969598
New Minimum: -398.42854000423233 > -443.60499209005775
END: th(65625.00000000003)=-443.60499209005775; dx=-0.0025373434916610223 evalInputDelta=45.17645208582542
Fitness changed from -398.42854000423233 to -443.60499209005775
Iteration 12 complete. Error: -443.60499209005775 Total: 2.1533; Orientation: 0.2972; Line Search: 1.2494
Adding measurement 13a68fb7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.120e+04, gradient 9.455e-02, dot -0.031; [0c002226-a5e7-488a-9c1d-1ff732b5c55e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -443.60499209005775, -82.55601725769314, -49.803080064601176, -18.477675660145522
LBFGS Accumulation History: 3 points
Removed measurement 13a68fb7 to history. Total: 3
th(0)=-443.60499209005775;dx=-0.008930784972212832
Armijo: th(141384.77653334243)=-224.13184480079536; dx=-6.481584781350646E-5 evalInputDelta=-219.47314728926239
New Minimum: -443.60499209005775 > -463.95845602977647
END: th(70692.38826667122)=-463.95845602977647; dx=-0.0017937194803031877 evalInputDelta=20.353463939718722
Fitness changed from -443.60499209005775 to -463.95845602977647
Iteration 13 complete. Error: -463.95845602977647 Total: 3.1218; Orientation: 0.2964; Line Search: 2.2351
Adding measurement 2a534291 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.641e+04, gradient 9.903e-02, dot 0.183; [0c002226-a5e7-488a-9c1d-1ff732b5c55e = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-463.95845602977647;dx=-298.27030350175994
Armijo: th(152302.13360291938)=3261.7382510027137; dx=0.013249259238527381 evalInputDelta=-3725.69670703249
Armijo: th(76151.06680145969)=3216.1735439547156; dx=0.02602904940760538 evalInputDelta=-3680.131999984492
Armijo: th(25383.688933819896)=3108.544802951392; dx=0.0747199567025698 evalInputDelta=-3572.503258981168
Armijo: th(6345.922233454974)=2908.10818803567; dx=0.2745632595573003 evalInputDelta=-3372.066644065447
Armijo: th(1269.1844466909947)=2564.099076402825; dx=1.1807565717987072 evalInputDelta=-3028.057532432602
Armijo: th(211.5307411151658)=2049.0081355389975; dx=5.571987101263973 evalInputDelta=-2512.9665915687738
Armijo: th(30.218677302166544)=1315.6360147168193; dx=25.50278210363374 evalInputDelta=-1779.5944707465958
Armijo: th(3.777334662770818)=267.45878052393425; dx=76.07167252971809 evalInputDelta=-731.4172365537107
Armijo: th(0.41970385141897976)=-400.84624688145584; dx=-20.86206642389738 evalInputDelta=-63.11220914832063
Armijo: th(0.04197038514189798)=-460.9792093487764; dx=-117.44114502041776 evalInputDelta=-2.9792466810000633
Armijo: th(0.0038154895583543615)=-463.7311580139177; dx=-132.1111685179883 evalInputDelta=-0.2272980158587643
Armijo: th(3.179574631961968E-4)=-463.9398932093899; dx=-133.4864614903595 evalInputDelta=-0.01856282038659174
Armijo: th(2.4458266399707444E-5)=-463.95704157297075; dx=-133.87652689212956 evalInputDelta=-0.0014144568057190554
Armijo: th(1.7470190285505318E-6)=-463.95831815033114; dx=-133.40896968660084 evalInputDelta=-1.3787944533305563E-4
Armijo: th(1.1646793523670212E-7)=-463.95840834606065; dx=-133.74122068346318 evalInputDelta=-4.76837158203125E-5
Armijo: th(7.279245952293883E-9)=-463.95841836779823; dx=-133.47058046980345 evalInputDelta=-3.7661978240066674E-5
Armijo: th(4.2819093837022837E-10)=-463.95841836779823; dx=-133.5258712228155 evalInputDelta=-3.7661978240066674E-5
MIN ALPHA (2.3788385465012688E-11): th(0.0)=-463.95845602977647
Fitness changed from -463.95845602977647 to -463.95845602977647
Static Iteration Total: 13.0792; Orientation: 0.2988; Line Search: 12.1865
Iteration 14 failed. Error: -463.95845602977647
Previous Error: 0.0 -> -463.95845602977647
Retrying iteration 14
Reset training subject: 213251979849800
Adding measurement 63dd4d70 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-463.95845602977647;dx=-0.009767017430625167
END: th(2.1544346900318838E-10)=-463.95845602977647; dx=-0.008199480671323006 evalInputDelta=0.0
Fitness changed from -463.95845602977647 to -463.95845602977647
Static Iteration Total: 2.4382; Orientation: 0.0164; Line Search: 1.2388
Iteration 15 failed. Error: -463.95845602977647
Previous Error: 0.0 -> -463.95845602977647
Optimization terminated 15
Final threshold in iteration 15: -463.95845602977647 (> -Infinity) after 54.998s (< 5400.000s)

Returns

    -463.95845602977647