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 343.02 seconds (4.614 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: 571218627433500
Reset training subject: 571225167067000
Adding measurement a2aa756 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-66.06131349463585;dx=-1.8575154379022072E-6
New Minimum: -66.06131349463585 > -66.06131806779636
WOLFE (weak): th(2.154434690031884)=-66.06131806779636; dx=-1.854108051926089E-6 evalInputDelta=4.573160509835361E-6
New Minimum: -66.06131806779636 > -66.0613203543765
WOLFE (weak): th(4.308869380063768)=-66.0613203543765; dx=-1.854452572919479E-6 evalInputDelta=6.859740651066204E-6
New Minimum: -66.0613203543765 > -66.06134093359418
WOLFE (weak): th(12.926608140191302)=-66.06134093359418; dx=-1.8541541047108164E-6 evalInputDelta=2.7438958326797547E-5
New Minimum: -66.06134093359418 > -66.06142096382419
WOLFE (weak): th(51.70643256076521)=-66.06142096382419; dx=-1.8547170588302766E-6 evalInputDelta=1.0746918833604013E-4
New Minimum: -66.06142096382419 > -66.06184626570555
WOLFE (weak): th(258.53216280382605)=-66.06184626570555; dx=-1.8548448353286108E-6 evalInputDelta=5.327710697002885E-4
New Minimum: -66.06184626570555 > -66.0645306348309
WOLFE (weak): th(1551.1929768229563)=-66.0645306348309; dx=-1.8549569906131295E-6 evalInputDelta=0.0032171401950478185
New Minimum: -66.0645306348309 > -66.08381647219102
WOLFE (weak): th(10858.350837760694)=-66.08381647219102; dx=-1.8539205502969396E-6 evalInputDelta=0.022502977555163284
New Minimum: -66.08381647219102 > -66.24087470667055
WOLFE (weak): th(86866.80670208555)=-66.24087470667055; dx=-1.844446495606223E-6 evalInputDelta=0.17956121203469877
New Minimum: -66.24087470667055 > -67.63858354719156
WOLFE (weak): th(781801.26031877)=-67.63858354719156; dx=-1.7570994860575766E-6 evalInputDelta=1.5772700525557042
New Minimum: -67.63858354719156 > -77.68912847838845
END: th(7818012.6031877)=-77.68912847838845; dx=-8.21130467608851E-7 evalInputDelta=11.6278149837526
Fitness changed from -66.06131349463585 to -77.68912847838845
Iteration 1 complete. Error: -77.68912847838845 Total: 93.0766; Orientation: 0.1703; Line Search: 72.7742
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cde0dc7c-fe33-4cea-b951-495d866c6754.jpg)
Adding measurement 2adc0a77 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-77.68912847838845;dx=-9.705090521505428E-7
New Minimum: -77.68912847838845 > -89.34505648051908
END: th(1.684339755941405E7)=-89.34505648051908; dx=-3.765134694336809E-7 evalInputDelta=11.655928002130622
Fitness changed from -77.68912847838845 to -89.34505648051908
Iteration 2 complete. Error: -89.34505648051908 Total: 24.9295; Orientation: 0.1760; Line Search: 14.0794
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/81fc6a2e-32da-403d-9c4c-284af1e5fad1.jpg)
Adding measurement 7030c0d2 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-89.34505648051908;dx=-9.190502781001362E-7
New Minimum: -89.34505648051908 > -95.65622966465479
WOLF (strong): th(3.6288E7)=-95.65622966465479; dx=1.2686413558863443E-7 evalInputDelta=6.311173184135711
New Minimum: -95.65622966465479 > -97.24589126742978
END: th(1.8144E7)=-97.24589126742978; dx=-4.856068567990275E-8 evalInputDelta=7.900834786910707
Fitness changed from -89.34505648051908 to -97.24589126742978
Iteration 3 complete. Error: -97.24589126742978 Total: 25.8309; Orientation: 0.1443; Line Search: 18.2225
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/faf16fe8-dbed-436f-b1e6-70e1b71850f1.jpg)
Adding measurement 12bc8d9c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.957e+04, gradient 9.777e-04, dot -0.629; [a72f6684-956a-44d8-80b6-0b2f8f53b8cb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.24589126742978, -89.34505648051908, -77.68912847838845, -66.06131349463585
LBFGS Accumulation History: 3 points
Removed measurement 12bc8d9c to history. Total: 3
th(0)=-97.24589126742978;dx=-9.535015961791353E-7
New Minimum: -97.24589126742978 > -97.30847014070294
WOLF (strong): th(3.90900630159385E7)=-97.30847014070294; dx=3.479236679130707E-7 evalInputDelta=0.06257887327315359
New Minimum: -97.30847014070294 > -104.16849890105561
WOLF (strong): th(1.954503150796925E7)=-104.16849890105561; dx=1.6129076055290405E-7 evalInputDelta=6.92260763362583
END: th(6515010.502656416)=-102.62291049608055; dx=-5.290988001080881E-7 evalInputDelta=5.3770192286507665
Fitness changed from -97.24589126742978 to -104.16849890105561
Iteration 4 complete. Error: -104.16849890105561 Total: 34.6624; Orientation: 2.6573; Line Search: 24.9320
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/82469927-744e-4885-9b60-84b28f064e0e.jpg)
Adding measurement 1ccb21af to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.600e+04, gradient 9.552e-04, dot -0.520; [a72f6684-956a-44d8-80b6-0b2f8f53b8cb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -104.16849890105561, -89.34505648051908, -77.68912847838845, -66.06131349463585
LBFGS Accumulation History: 3 points
Removed measurement 1ccb21af to history. Total: 3
th(0)=-104.16849890105561;dx=-9.117534828040692E-7
New Minimum: -104.16849890105561 > -111.34640396510306
END: th(1.4036164632845044E7)=-111.34640396510306; dx=-1.7267465305652062E-8 evalInputDelta=7.177905064047451
Fitness changed from -104.16849890105561 to -111.34640396510306
Iteration 5 complete. Error: -111.34640396510306 Total: 22.5740; Orientation: 2.5176; Line Search: 12.6226
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d1047d16-db7b-4365-9eb3-4d234a3c00b4.jpg)
Adding measurement 14322543 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.145e+04, gradient 6.697e-04, dot -0.661; [a72f6684-956a-44d8-80b6-0b2f8f53b8cb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.34640396510306, -89.34505648051908, -77.68912847838845, -66.06131349463585
LBFGS Accumulation History: 3 points
Removed measurement 14322543 to history. Total: 3
th(0)=-111.34640396510306;dx=-4.472379221700145E-7
New Minimum: -111.34640396510306 > -115.31508726969324
WOLF (strong): th(3.0240000000000004E7)=-115.31508726969324; dx=7.662602940132588E-8 evalInputDelta=3.968683304590172
New Minimum: -115.31508726969324 > -115.62413584876214
END: th(1.5120000000000002E7)=-115.62413584876214; dx=-1.0322939339812057E-7 evalInputDelta=4.277731883659072
Fitness changed from -111.34640396510306 to -115.62413584876214
Iteration 6 complete. Error: -115.62413584876214 Total: 28.7703; Orientation: 2.5845; Line Search: 18.4507
Adding measurement b1c2646 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.656e+04, gradient 6.125e-04, dot -0.665; [a72f6684-956a-44d8-80b6-0b2f8f53b8cb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -115.62413584876214, -89.34505648051908, -77.68912847838845, -66.06131349463585
LBFGS Accumulation History: 3 points
Removed measurement b1c2646 to history. Total: 3
th(0)=-115.62413584876214;dx=-3.7455042974927407E-7
New Minimum: -115.62413584876214 > -118.87778576297522
WOLF (strong): th(3.2575052513282087E7)=-118.87778576297522; dx=5.2649840784649944E-8 evalInputDelta=3.253649914213085
New Minimum: -118.87778576297522 > -119.1986747559013
END: th(1.6287526256641043E7)=-119.1986747559013; dx=-7.222608760832781E-8 evalInputDelta=3.574538907139157
Fitness changed from -115.62413584876214 to -119.1986747559013
Iteration 7 complete. Error: -119.1986747559013 Total: 28.1828; Orientation: 2.6371; Line Search: 19.3049
Adding measurement 5faa8f8a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.576e+04, gradient 6.043e-04, dot -0.632; [a72f6684-956a-44d8-80b6-0b2f8f53b8cb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -119.1986747559013, -89.34505648051908, -77.68912847838845, -66.06131349463585
LBFGS Accumulation History: 3 points
Removed measurement 5faa8f8a to history. Total: 3
th(0)=-119.1986747559013;dx=-3.642429389248155E-7
New Minimum: -119.1986747559013 > -121.09510341772267
WOLF (strong): th(3.509041158211262E7)=-121.09510341772267; dx=1.0114716000819901E-7 evalInputDelta=1.8964286618213748
New Minimum: -121.09510341772267 > -122.42104447149991
END: th(1.754520579105631E7)=-122.42104447149991; dx=-2.3050655861860072E-8 evalInputDelta=3.2223697155986173
Fitness changed from -119.1986747559013 to -122.42104447149991
Iteration 8 complete. Error: -122.42104447149991 Total: 28.0470; Orientation: 2.6616; Line Search: 18.9514
Adding measurement 3f98dbe2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.676e+04, gradient 6.106e-04, dot -0.581; [a72f6684-956a-44d8-80b6-0b2f8f53b8cb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -122.42104447149991, -89.34505648051908, -77.68912847838845, -66.06131349463585
LBFGS Accumulation History: 3 points
Removed measurement 3f98dbe2 to history. Total: 3
th(0)=-122.42104447149991;dx=-3.7173834525045255E-7
New Minimum: -122.42104447149991 > -122.84243411225903
WOLF (strong): th(3.7800000000000015E7)=-122.84243411225903; dx=1.5369349147950075E-7 evalInputDelta=0.42138964075911645
New Minimum: -122.84243411225903 > -125.39768310085724
WOLF (strong): th(1.8900000000000007E7)=-125.39768310085724; dx=2.5011062626510326E-8 evalInputDelta=2.976638629357325
END: th(6300000.000000003)=-124.42950615536759; dx=-2.2085638856261382E-7 evalInputDelta=2.0084616838676794
Fitness changed from -122.42104447149991 to -125.39768310085724
Iteration 9 complete. Error: -125.39768310085724 Total: 34.0705; Orientation: 2.5997; Line Search: 25.6957
Adding measurement 6ab5e4d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.573e+04, gradient 6.189e-04, dot -0.543; [a72f6684-956a-44d8-80b6-0b2f8f53b8cb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -125.39768310085724, -89.34505648051908, -77.68912847838845, -66.06131349463585
LBFGS Accumulation History: 3 points
Removed measurement 6ab5e4d1 to history. Total: 3
th(0)=-125.39768310085724;dx=-3.8192597087256186E-7
New Minimum: -125.39768310085724 > -128.47321256401182
END: th(1.3572938547200873E7)=-128.47321256401182; dx=-4.841047832773146E-8 evalInputDelta=3.075529463154581
Fitness changed from -125.39768310085724 to -128.47321256401182
Iteration 10 complete. Error: -128.47321256401182 Total: 21.7187; Orientation: 2.5816; Line Search: 12.8723
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d8de6f86-e1b7-4b5e-b96f-8ab1b06002b6.jpg)
Final threshold in iteration 11: -128.47321256401182 (> -Infinity) after 343.017s (< 5400.000s)

Returns

    -128.47321256401182