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 297.55 seconds (4.082 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: 584649509136700
Reset training subject: 584655421705600
Adding measurement 31d1a5f3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-41.128290018859396;dx=-1.9972624518224086E-6
New Minimum: -41.128290018859396 > -41.12829185524132
END: th(2.154434690031884)=-41.12829185524132; dx=-1.7615830145139108E-6 evalInputDelta=1.836381926523245E-6
Fitness changed from -41.128290018859396 to -41.12829185524132
Iteration 1 complete. Error: -41.12829185524132 Total: 30.2790; Orientation: 0.1446; Line Search: 12.1987
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b7ea7cf8-fcfe-4321-915f-9362399429a7.jpg)
Adding measurement 34a1f72b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-41.12829185524132;dx=-1.7605251954998328E-6
New Minimum: -41.12829185524132 > -41.12830287353116
WOLFE (weak): th(4.641588833612779)=-41.12830287353116; dx=-1.7590953661706311E-6 evalInputDelta=1.101828983962605E-5
New Minimum: -41.12830287353116 > -41.12831021905608
WOLFE (weak): th(9.283177667225559)=-41.12831021905608; dx=-1.7585223336461284E-6 evalInputDelta=1.8363814760391506E-5
New Minimum: -41.12831021905608 > -41.12834694666101
WOLFE (weak): th(27.849533001676676)=-41.12834694666101; dx=-1.7569437815436702E-6 evalInputDelta=5.509141968929043E-5
New Minimum: -41.12834694666101 > -41.128506711360785
WOLFE (weak): th(111.3981320067067)=-41.128506711360785; dx=-1.756975604749342E-6 evalInputDelta=2.1485611946303607E-4
New Minimum: -41.128506711360785 > -41.1293642882808
WOLFE (weak): th(556.9906600335335)=-41.1293642882808; dx=-1.7558564488612542E-6 evalInputDelta=0.0010724330394751291
New Minimum: -41.1293642882808 > -41.134720525799075
WOLFE (weak): th(3341.9439602012008)=-41.134720525799075; dx=-1.7564490715344927E-6 evalInputDelta=0.00642867055775298
New Minimum: -41.134720525799075 > -41.17326229845297
WOLFE (weak): th(23393.607721408407)=-41.17326229845297; dx=-1.7542728056085273E-6 evalInputDelta=0.04497044321164623
New Minimum: -41.17326229845297 > -41.48613161210259
WOLFE (weak): th(187148.86177126726)=-41.48613161210259; dx=-1.7346608875778355E-6 evalInputDelta=0.35783975686126723
New Minimum: -41.48613161210259 > -44.15671943150382
END: th(1684339.7559414054)=-44.15671943150382; dx=-1.516476246178193E-6 evalInputDelta=3.0284275762624944
Fitness changed from -41.12829185524132 to -44.15671943150382
Iteration 2 complete. Error: -44.15671943150382 Total: 68.5430; Orientation: 0.1432; Line Search: 61.2278
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/45de0e47-14ac-4201-801a-31f8a98c1d83.jpg)
Adding measurement 54381642 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-44.15671943150382;dx=-1.4530543609335632E-6
New Minimum: -44.15671943150382 > -48.95638856647978
END: th(3628800.0000000005)=-48.95638856647978; dx=-9.955805398108914E-7 evalInputDelta=4.799669134975964
Fitness changed from -44.15671943150382 to -48.95638856647978
Iteration 3 complete. Error: -48.95638856647978 Total: 19.6368; Orientation: 0.1444; Line Search: 12.3213
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/88b4514d-e84b-4f96-b56a-d9869feab07d.jpg)
Adding measurement fb451b6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.168e+04, gradient 9.770e-04, dot -0.824; [620114a8-1daf-4d04-a4d1-b25a8d57318c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.95638856647978, -44.15671943150382, -41.12829185524132, -41.128290018859396
LBFGS Accumulation History: 3 points
Removed measurement fb451b6 to history. Total: 3
th(0)=-48.95638856647978;dx=-9.518634969916261E-7
New Minimum: -48.95638856647978 > -55.177799479426895
END: th(7818012.603187701)=-55.177799479426895; dx=-5.279230817506243E-7 evalInputDelta=6.221410912947114
Fitness changed from -48.95638856647978 to -55.177799479426895
Iteration 4 complete. Error: -55.177799479426895 Total: 21.8296; Orientation: 2.5232; Line Search: 12.2246
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/39cc4960-8937-429a-871d-a3213c92cdf0.jpg)
Adding measurement 453e213e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.020e+04, gradient 8.365e-04, dot -0.617; [620114a8-1daf-4d04-a4d1-b25a8d57318c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.177799479426895, -44.15671943150382, -41.12829185524132, -41.128290018859396
LBFGS Accumulation History: 3 points
Removed measurement 453e213e to history. Total: 3
th(0)=-55.177799479426895;dx=-6.994458605541057E-7
New Minimum: -55.177799479426895 > -61.71984948664921
END: th(1.6843397559414055E7)=-61.71984948664921; dx=-1.6353344529875576E-7 evalInputDelta=6.542050007222315
Fitness changed from -55.177799479426895 to -61.71984948664921
Iteration 5 complete. Error: -61.71984948664921 Total: 22.2781; Orientation: 2.4778; Line Search: 12.4542
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d2b2bc54-72f5-439d-8a19-16bc46112019.jpg)
Adding measurement 6d66e25c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.203e+04, gradient 9.783e-04, dot -0.346; [620114a8-1daf-4d04-a4d1-b25a8d57318c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.71984948664921, -44.15671943150382, -41.12829185524132, -41.128290018859396
LBFGS Accumulation History: 3 points
Removed measurement 6d66e25c to history. Total: 3
th(0)=-61.71984948664921;dx=-9.544048992144774E-7
Armijo: th(3.628800000000001E7)=-60.03364328478897; dx=2.1793399388614236E-7 evalInputDelta=-1.6862062018602373
New Minimum: -61.71984948664921 > -65.23633869141247
WOLF (strong): th(1.8144000000000004E7)=-65.23633869141247; dx=2.2985552718203098E-7 evalInputDelta=3.5164892047632605
New Minimum: -65.23633869141247 > -66.08219810476757
END: th(6048000.000000001)=-66.08219810476757; dx=-3.4051574592276733E-7 evalInputDelta=4.362348618118361
Fitness changed from -61.71984948664921 to -66.08219810476757
Iteration 6 complete. Error: -66.08219810476757 Total: 34.3095; Orientation: 2.5191; Line Search: 24.5529
Adding measurement 42d86437 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.982e+04, gradient 7.010e-04, dot -0.621; [620114a8-1daf-4d04-a4d1-b25a8d57318c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -66.08219810476757, -44.15671943150382, -41.12829185524132, -41.128290018859396
LBFGS Accumulation History: 3 points
Removed measurement 42d86437 to history. Total: 3
th(0)=-66.08219810476757;dx=-4.900499680922692E-7
New Minimum: -66.08219810476757 > -70.34648897472599
END: th(1.3030021005312836E7)=-70.34648897472599; dx=-1.727238716624052E-7 evalInputDelta=4.264290869958415
Fitness changed from -66.08219810476757 to -70.34648897472599
Iteration 7 complete. Error: -70.34648897472599 Total: 20.0718; Orientation: 2.4520; Line Search: 11.9893
Adding measurement 66a7f263 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.496e+04, gradient 8.023e-04, dot -0.499; [620114a8-1daf-4d04-a4d1-b25a8d57318c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.34648897472599, -44.15671943150382, -41.12829185524132, -41.128290018859396
LBFGS Accumulation History: 3 points
Removed measurement 66a7f263 to history. Total: 3
th(0)=-70.34648897472599;dx=-6.429402455584073E-7
New Minimum: -70.34648897472599 > -71.48948133051294
WOLF (strong): th(2.8072329265690096E7)=-71.48948133051294; dx=1.3852197423883387E-7 evalInputDelta=1.1429923557869586
New Minimum: -71.48948133051294 > -73.50196682841924
WOLF (strong): th(1.4036164632845048E7)=-73.50196682841924; dx=5.427826873797472E-8 evalInputDelta=3.155477853693256
END: th(4678721.544281683)=-72.79468933180516; dx=-3.15217806528863E-7 evalInputDelta=2.4482003570791733
Fitness changed from -70.34648897472599 to -73.50196682841924
Iteration 8 complete. Error: -73.50196682841924 Total: 32.4191; Orientation: 2.4223; Line Search: 24.2484
Adding measurement 5f35eda2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.675e+04, gradient 9.169e-04, dot -0.378; [620114a8-1daf-4d04-a4d1-b25a8d57318c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.50196682841924, -44.15671943150382, -41.12829185524132, -41.128290018859396
LBFGS Accumulation History: 3 points
Removed measurement 5f35eda2 to history. Total: 3
th(0)=-73.50196682841924;dx=-8.392681418407562E-7
New Minimum: -73.50196682841924 > -78.15423525201994
WOLF (strong): th(1.0080000000000004E7)=-78.15423525201994; dx=1.90836669820723E-8 evalInputDelta=4.652268423600702
END: th(5040000.000000002)=-77.10685094970123; dx=-4.427608466434855E-7 evalInputDelta=3.6048841212819838
Fitness changed from -73.50196682841924 to -78.15423525201994
Iteration 9 complete. Error: -78.15423525201994 Total: 26.8596; Orientation: 2.4045; Line Search: 18.3722
Adding measurement 39c4c1aa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.697e+04, gradient 7.295e-04, dot -0.520; [620114a8-1daf-4d04-a4d1-b25a8d57318c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.15423525201994, -44.15671943150382, -41.12829185524132, -41.128290018859396
LBFGS Accumulation History: 3 points
Removed measurement 39c4c1aa to history. Total: 3
th(0)=-78.15423525201994;dx=-5.316427951748455E-7
New Minimum: -78.15423525201994 > -81.219230004891
END: th(1.0858350837760698E7)=-81.219230004891; dx=-3.6247923874524546E-8 evalInputDelta=3.0649947528710584
Fitness changed from -78.15423525201994 to -81.219230004891
Iteration 10 complete. Error: -81.219230004891 Total: 20.2510; Orientation: 2.4330; Line Search: 12.1259
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/78bab308-b468-48e0-9a1a-bdb5b0f3787a.jpg)
Final threshold in iteration 11: -81.219230004891 (> -Infinity) after 297.550s (< 5400.000s)

Returns

    -81.219230004891