Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

Iteration 20 Iteration 20

BasicOptimizer.scala:89 executed in 171.88 seconds (2.014 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: 7591863309584
Reset training subject: 7593176729289
Adding measurement 65ee506a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-372.39296554524327;dx=-6.897952227593822
New Minimum: -372.39296554524327 > -373.4833810506976
WOLFE (weak): th(2.154434690031884)=-373.4833810506976; dx=-6.95193350191868 evalInputDelta=1.0904155054543025
New Minimum: -373.4833810506976 > -374.58313076267484
WOLFE (weak): th(4.308869380063768)=-374.58313076267484; dx=-6.869783442411481 evalInputDelta=2.19016521743157
New Minimum: -374.58313076267484 > -378.82379335266484
WOLFE (weak): th(12.926608140191302)=-378.82379335266484; dx=-6.780771094350317 evalInputDelta=6.430827807421565
New Minimum: -378.82379335266484 > -389.09911165302674
END: th(51.70643256076521)=-389.09911165302674; dx=-5.796689186186157 evalInputDelta=16.706146107783468
Fitness changed from -372.39296554524327 to -389.09911165302674
Iteration 1 complete. Error: -389.09911165302674 Total: 11.4313; Orientation: 0.0178; Line Search: 7.4988
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/986ea075-1bf4-4c73-ab51-29d4a843761f.jpg)
Adding measurement 46c24fa9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-389.09911165302674;dx=-7.974207808365501
New Minimum: -389.09911165302674 > -411.72174800812553
END: th(111.39813200670669)=-411.72174800812553; dx=-4.338849810788527 evalInputDelta=22.62263635509879
Fitness changed from -389.09911165302674 to -411.72174800812553
Iteration 2 complete. Error: -411.72174800812553 Total: 6.1285; Orientation: 0.0216; Line Search: 3.6568
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/89a12acd-b8d0-460e-b949-6828bd5944c4.jpg)
Adding measurement 3a52e8bf to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-411.72174800812553;dx=-6.768484885333287
New Minimum: -411.72174800812553 > -512.0663830436229
END: th(240.0)=-512.0663830436229; dx=-2.894539188199958 evalInputDelta=100.34463503549733
Fitness changed from -411.72174800812553 to -512.0663830436229
Iteration 3 complete. Error: -512.0663830436229 Total: 6.1964; Orientation: 0.0255; Line Search: 3.2260
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5d2a6584-1561-481c-919c-9c9270493b35.jpg)
Adding measurement 28fe2a8e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.439e+03, gradient 3.131e+00, dot -0.293; [f484f3fd-147c-40fa-938d-b582e0ae2622 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -512.0663830436229, -411.72174800812553, -389.09911165302674, -372.39296554524327
LBFGS Accumulation History: 3 points
Removed measurement 28fe2a8e to history. Total: 3
th(0)=-512.0663830436229;dx=-9.578921997085875
New Minimum: -512.0663830436229 > -885.0786468393837
END: th(517.0643256076521)=-885.0786468393837; dx=-1.4732987856136015 evalInputDelta=373.0122637957609
Fitness changed from -512.0663830436229 to -885.0786468393837
Iteration 4 complete. Error: -885.0786468393837 Total: 4.2189; Orientation: 0.4800; Line Search: 2.3325
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0322ec57-304e-4a99-a806-8e8e53e1fa90.jpg)
Adding measurement 79b8fb9a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.144e+03, gradient 3.462e+00, dot -0.130; [f484f3fd-147c-40fa-938d-b582e0ae2622 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -885.0786468393837, -411.72174800812553, -389.09911165302674, -372.39296554524327
LBFGS Accumulation History: 3 points
Removed measurement 79b8fb9a to history. Total: 3
th(0)=-885.0786468393837;dx=-11.677399609439513
New Minimum: -885.0786468393837 > -1207.2636776677093
END: th(1113.981320067067)=-1207.2636776677093; dx=-0.5037764927450618 evalInputDelta=322.1850308283256
Fitness changed from -885.0786468393837 to -1207.2636776677093
Iteration 5 complete. Error: -1207.2636776677093 Total: 4.6180; Orientation: 0.5188; Line Search: 2.5428
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/557c5ccf-d3e1-44f5-b3ab-1c34490270d5.jpg)
Adding measurement 64b1238 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.520e+03, gradient 2.722e+00, dot -0.088; [f484f3fd-147c-40fa-938d-b582e0ae2622 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1207.2636776677093, -411.72174800812553, -389.09911165302674, -372.39296554524327
LBFGS Accumulation History: 3 points
Removed measurement 64b1238 to history. Total: 3
th(0)=-1207.2636776677093;dx=-7.253950012203344
Armijo: th(2400.0)=-1153.2102561160814; dx=-0.14692127022889087 evalInputDelta=-54.053421551627935
Armijo: th(1200.0)=-1187.7786269825326; dx=-0.6565382402134745 evalInputDelta=-19.485050685176702
New Minimum: -1207.2636776677093 > -1265.6843338659849
END: th(400.0)=-1265.6843338659849; dx=-3.2068083707987 evalInputDelta=58.42065619827554
Fitness changed from -1207.2636776677093 to -1265.6843338659849
Iteration 6 complete. Error: -1265.6843338659849 Total: 7.3439; Orientation: 0.9276; Line Search: 4.9201
Adding measurement 7dfac2e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.437e+03, gradient 2.699e+00, dot -0.137; [f484f3fd-147c-40fa-938d-b582e0ae2622 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1265.6843338659849, -411.72174800812553, -389.09911165302674, -372.39296554524327
LBFGS Accumulation History: 3 points
Removed measurement 7dfac2e to history. Total: 3
th(0)=-1265.6843338659849;dx=-7.087650993175231
New Minimum: -1265.6843338659849 > -1420.387110414732
END: th(861.7738760127535)=-1420.387110414732; dx=-1.092679852622505 evalInputDelta=154.70277654874712
Fitness changed from -1265.6843338659849 to -1420.387110414732
Iteration 7 complete. Error: -1420.387110414732 Total: 4.2998; Orientation: 0.5775; Line Search: 2.5709
Adding measurement 7d069ca3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.177e+03, gradient 2.375e+00, dot -0.125; [f484f3fd-147c-40fa-938d-b582e0ae2622 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1420.387110414732, -411.72174800812553, -389.09911165302674, -372.39296554524327
LBFGS Accumulation History: 3 points
Removed measurement 7d069ca3 to history. Total: 3
th(0)=-1420.387110414732;dx=-5.506179188581767
Armijo: th(1856.6355334451116)=-1335.4189682323015; dx=-0.3861270846055922 evalInputDelta=-84.96814218243048
Armijo: th(928.3177667225558)=-1344.5784452432588; dx=-1.1159616268880221 evalInputDelta=-75.8086651714732
Armijo: th(309.43925557418527)=-1415.7637615141987; dx=-3.066455352395572 evalInputDelta=-4.623348900533301
New Minimum: -1420.387110414732 > -1426.5986933975103
END: th(77.35981389354632)=-1426.5986933975103; dx=-4.640976653604064 evalInputDelta=6.211582982778282
Fitness changed from -1420.387110414732 to -1426.5986933975103
Iteration 8 complete. Error: -1426.5986933975103 Total: 7.9353; Orientation: 0.5040; Line Search: 6.3057
Adding measurement 2b9149bb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.430e+03, gradient 2.285e+00, dot -0.140; [f484f3fd-147c-40fa-938d-b582e0ae2622 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1426.5986933975103, -411.72174800812553, -389.09911165302674, -372.39296554524327
LBFGS Accumulation History: 3 points
Removed measurement 2b9149bb to history. Total: 3
th(0)=-1426.5986933975103;dx=-5.099618664476742
New Minimum: -1426.5986933975103 > -1454.8719192495855
END: th(166.66666666666669)=-1454.8719192495855; dx=-3.831158797632977 evalInputDelta=28.273225852075257
Fitness changed from -1426.5986933975103 to -1454.8719192495855
Iteration 9 complete. Error: -1454.8719192495855 Total: 3.9802; Orientation: 0.4939; Line Search: 2.3581
Adding measurement 6a2b63e7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.060e+04, gradient 2.272e+00, dot -0.159; [f484f3fd-147c-40fa-938d-b582e0ae2622 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1454.8719192495855, -411.72174800812553, -389.09911165302674, -372.39296554524327
LBFGS Accumulation History: 3 points
Removed measurement 6a2b63e7 to history. Total: 3
th(0)=-1454.8719192495855;dx=-5.073359401592194
New Minimum: -1454.87191

...skipping 7452 bytes...

271e+00, dot -0.140; [f484f3fd-147c-40fa-938d-b582e0ae2622 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2594.8161966055486, -411.72174800812553, -389.09911165302674, -372.39296554524327
LBFGS Accumulation History: 3 points
Removed measurement 34043920 to history. Total: 3
th(0)=-2594.8161966055486;dx=-1.5729101826339462
Armijo: th(11221.014010582736)=-2180.638646577496; dx=-0.06772606480340186 evalInputDelta=-414.1775500280528
Armijo: th(5610.507005291368)=-2591.0548054830274; dx=-0.2682915309916642 evalInputDelta=-3.7613911225212178
New Minimum: -2594.8161966055486 > -2719.859824949994
END: th(1870.1690017637893)=-2719.859824949994; dx=-0.8164742237972255 evalInputDelta=125.04362834444555
Fitness changed from -2594.8161966055486 to -2719.859824949994
Iteration 19 complete. Error: -2719.859824949994 Total: 6.3771; Orientation: 0.4925; Line Search: 4.7642
Adding measurement 715614ec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.643e+05, gradient 1.269e+00, dot -0.191; [f484f3fd-147c-40fa-938d-b582e0ae2622 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2719.859824949994, -411.72174800812553, -389.09911165302674, -372.39296554524327
LBFGS Accumulation History: 3 points
Removed measurement 715614ec to history. Total: 3
th(0)=-2719.859824949994;dx=-1.5698796703776108
New Minimum: -2719.859824949994 > -2931.4739456572943
END: th(4029.156973622207)=-2931.4739456572943; dx=-0.4103038412701562 evalInputDelta=211.61412070730012
Fitness changed from -2719.859824949994 to -2931.4739456572943
Iteration 20 complete. Error: -2931.4739456572943 Total: 4.0762; Orientation: 0.4880; Line Search: 2.3578
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>![Iteration 20](etc/7a46c2eb-61c9-4cd1-8cd8-c94d7066004b.jpg)
Adding measurement 50c9171a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.497e+05, gradient 1.139e+00, dot -0.187; [f484f3fd-147c-40fa-938d-b582e0ae2622 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2931.4739456572943, -411.72174800812553, -389.09911165302674, -372.39296554524327
LBFGS Accumulation History: 3 points
Removed measurement 50c9171a to history. Total: 3
th(0)=-2931.4739456572943;dx=-1.2733753583235505
Armijo: th(8680.555555555562)=-2786.259870994788; dx=-0.18827585907456493 evalInputDelta=-145.2140746625064
New Minimum: -2931.4739456572943 > -3019.619563860904
END: th(4340.277777777781)=-3019.619563860904; dx=-0.4459979336830431 evalInputDelta=88.1456182036095
Fitness changed from -2931.4739456572943 to -3019.619563860904
Iteration 21 complete. Error: -3019.619563860904 Total: 5.5238; Orientation: 0.4805; Line Search: 3.6397
Adding measurement 5fbd889c to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.517e+05, gradient 1.209e+00, dot 0.202; [f484f3fd-147c-40fa-938d-b582e0ae2622 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-3019.619563860904;dx=-37828.44376946686
Armijo: th(9350.845008818947)=-2132.1433817155353; dx=0.047639916549058185 evalInputDelta=-887.4761821453685
Armijo: th(4675.422504409474)=-2131.931477492932; dx=0.0997239650872891 evalInputDelta=-887.6880863679717
Armijo: th(1558.4741681364912)=-2133.4013096906197; dx=0.2966193640902663 evalInputDelta=-886.2182541702841
Armijo: th(389.6185420341228)=-2126.1424509357726; dx=1.1619291805205438 evalInputDelta=-893.4771129251312
Armijo: th(77.92370840682456)=-2129.736631264006; dx=5.887606136880308 evalInputDelta=-889.8829325968977
Armijo: th(12.98728473447076)=-2120.4410825219757; dx=33.35504471694627 evalInputDelta=-899.1784813389281
Armijo: th(1.85532639063868)=-2143.785683094195; dx=66.26827236555553 evalInputDelta=-875.8338807667087
Armijo: th(0.231915798829835)=-2657.8633622669595; dx=-5260.856945580044 evalInputDelta=-361.7562015939443
Armijo: th(0.02576842209220389)=-2985.1695199330566; dx=-22298.830065015998 evalInputDelta=-34.45004392784722
Armijo: th(0.002576842209220389)=-3015.761665348677; dx=-28810.37819891284 evalInputDelta=-3.8578985122267113
Armijo: th(2.34258382656399E-4)=-3019.2309408071646; dx=-29732.171993716045 evalInputDelta=-0.3886230537391384
Armijo: th(1.952153188803325E-5)=-3019.5879391934086; dx=-30021.539785199275 evalInputDelta=-0.03162466749517989
Armijo: th(1.5016562990794806E-6)=-3019.6170482744783; dx=-30022.722149884474 evalInputDelta=-0.0025155864254884364
Armijo: th(1.072611642199629E-7)=-3019.619204491543; dx=-22972.370938123986 evalInputDelta=-3.5936936092184624E-4
Armijo: th(7.15074428133086E-9)=-3019.6194440711215; dx=-29947.191038774108 evalInputDelta=-1.1978978227489279E-4
Armijo: th(4.4692151758317873E-10)=-3019.619204491543; dx=-29941.271035267768 evalInputDelta=-3.5936936092184624E-4
MIN ALPHA (2.628950103430463E-11): th(0.0)=-3019.619563860904
Fitness changed from -3019.619563860904 to -3019.619563860904
Static Iteration Total: 23.4461; Orientation: 0.4653; Line Search: 21.8658
Iteration 22 failed. Error: -3019.619563860904
Previous Error: 0.0 -> -3019.619563860904
Retrying iteration 22
Reset training subject: 7730350668942
Adding measurement acd08d1 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-3019.619563860904;dx=-1.51819664837299
WOLFE (weak): th(2.1544346900318838E-10)=-3019.619563860904; dx=-1.4186884415655947 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-3019.619563860904; dx=-1.4205921400124932 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-3019.619563860904; dx=-1.423407907934573 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-3019.619563860904; dx=-1.417648775605455 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-3019.619563860904; dx=-1.4246405329648444 evalInputDelta=0.0
Armijo: th(1.5511929768229565E-7)=-3019.619204491543; dx=-1.41877392494197 evalInputDelta=-3.5936936092184624E-4
Armijo: th(9.048625698133912E-8)=-3019.619204491543; dx=-1.4161154012372918 evalInputDelta=-3.5936936092184624E-4
WOLFE (weak): th(5.816973663086087E-8)=-3019.619563860904; dx=-1.4027010424790924 evalInputDelta=0.0
Armijo: th(7.432799680609999E-8)=-3019.619204491543; dx=-1.4023842192228382 evalInputDelta=-3.5936936092184624E-4
WOLFE (weak): th(6.624886671848043E-8)=-3019.619563860904; dx=-1.4195383825958243 evalInputDelta=0.0
Armijo: th(7.028843176229021E-8)=-3019.619204491543; dx=-1.4222210653172676 evalInputDelta=-3.5936936092184624E-4
Armijo: th(6.826864924038531E-8)=-3019.619204491543; dx=-1.4277459427317678 evalInputDelta=-3.5936936092184624E-4
Armijo: th(6.725875797943288E-8)=-3019.619204491543; dx=-1.4245746500496037 evalInputDelta=-3.5936936092184624E-4
WOLFE (weak): th(6.675381234895666E-8)=-3019.619563860904; dx=-1.412471645102643 evalInputDelta=0.0
WOLFE (weak): th(6.700628516419477E-8)=-3019.619563860904; dx=-1.4283118386544218 evalInputDelta=0.0
Armijo: th(6.713252157181382E-8)=-3019.619204491543; dx=-1.4185984277272263 evalInputDelta=-3.5936936092184624E-4
Armijo: th(6.70694033680043E-8)=-3019.619204491543; dx=-1.4203944911951822 evalInputDelta=-3.5936936092184624E-4
WOLFE (weak): th(6.703784426609954E-8)=-3019.619563860904; dx=-1.41398086330246 evalInputDelta=0.0
WOLFE (weak): th(6.705362381705192E-8)=-3019.619563860904; dx=-1.4240927190012567 evalInputDelta=0.0
Armijo: th(6.706151359252811E-8)=-3019.619204491543; dx=-1.4161537110807747 evalInputDelta=-3.5936936092184624E-4
Armijo: th(6.705756870479001E-8)=-3019.619204491543; dx=-1.4171942292750597 evalInputDelta=-3.5936936092184624E-4
Armijo: th(6.705559626092096E-8)=-3019.619204491543; dx=-1.4214287246580106 evalInputDelta=-3.5936936092184624E-4
Armijo: th(6.705461003898644E-8)=-3019.619204491543; dx=-1.423255534164303 evalInputDelta=-3.5936936092184624E-4
Armijo: th(6.705411692801918E-8)=-3019.619204491543; dx=-1.411196564784771 evalInputDelta=-3.5936936092184624E-4
mu ~= nu (6.705362381705192E-8): th(0.0)=-3019.619563860904
Fitness changed from -3019.619563860904 to -3019.619563860904
Static Iteration Total: 33.3965; Orientation: 0.0185; Line Search: 31.1421
Iteration 23 failed. Error: -3019.619563860904
Previous Error: 0.0 -> -3019.619563860904
Optimization terminated 23
Final threshold in iteration 23: -3019.619563860904 (> -Infinity) after 171.884s (< 3600.000s)

Returns

    -3019.619563860904