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 135.77 seconds (1.743 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: 110177986347500
Reset training subject: 110180849602600
Adding measurement 52060054 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-30.148181430185254;dx=-1.1398884276642544E-6
New Minimum: -30.148181430185254 > -30.148182832668102
END: th(2.154434690031884)=-30.148182832668102; dx=-8.090959628604883E-7 evalInputDelta=1.4024828480785345E-6
Fitness changed from -30.148181430185254 to -30.148182832668102
Iteration 1 complete. Error: -30.148182832668102 Total: 13.6504; Orientation: 0.0693; Line Search: 5.3621
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/69919795-68fa-4f15-ba4c-b1daa5f8be58.jpg)
Adding measurement 6a2cc246 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-30.148182832668102;dx=-8.086936847024791E-7
New Minimum: -30.148182832668102 > -30.148185637633592
WOLFE (weak): th(4.641588833612779)=-30.148185637633592; dx=-8.077598570819371E-7 evalInputDelta=2.8049654900996757E-6
New Minimum: -30.148185637633592 > -30.148192650046177
WOLFE (weak): th(9.283177667225559)=-30.148192650046177; dx=-8.07218548478512E-7 evalInputDelta=9.817378074927774E-6
New Minimum: -30.148192650046177 > -30.148206674866454
WOLFE (weak): th(27.849533001676676)=-30.148206674866454; dx=-8.063539454808171E-7 evalInputDelta=2.3842198352497235E-5
New Minimum: -30.148206674866454 > -30.148282408783228
WOLFE (weak): th(111.3981320067067)=-30.148282408783228; dx=-8.047713792930708E-7 evalInputDelta=9.957611512589892E-5
New Minimum: -30.148282408783228 > -30.14867650257566
WOLFE (weak): th(556.9906600335335)=-30.14867650257566; dx=-8.052181396722528E-7 evalInputDelta=4.936699075592799E-4
New Minimum: -30.14867650257566 > -30.151141926179125
WOLFE (weak): th(3341.9439602012008)=-30.151141926179125; dx=-8.053483061983341E-7 evalInputDelta=0.002959093511023525
New Minimum: -30.151141926179125 > -30.16888478611381
WOLFE (weak): th(23393.607721408407)=-30.16888478611381; dx=-8.04589218947046E-7 evalInputDelta=0.02070195344570891
New Minimum: -30.16888478611381 > -30.312911611615533
WOLFE (weak): th(187148.86177126726)=-30.312911611615533; dx=-7.947818232636671E-7 evalInputDelta=0.1647287789474312
New Minimum: -30.312911611615533 > -31.547193386619035
END: th(1684339.7559414054)=-31.547193386619035; dx=-7.007861628917501E-7 evalInputDelta=1.3990105539509337
Fitness changed from -30.148182832668102 to -31.547193386619035
Iteration 2 complete. Error: -31.547193386619035 Total: 30.4416; Orientation: 0.0679; Line Search: 27.2886
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6d83c968-c2d0-4f31-b109-0ed86f724eb8.jpg)
Adding measurement 7968f4c5 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-31.547193386619035;dx=-7.36522265479088E-7
New Minimum: -31.547193386619035 > -33.89583213089892
END: th(3628800.0000000005)=-33.89583213089892; dx=-5.035149782820982E-7 evalInputDelta=2.3486387442798815
Fitness changed from -31.547193386619035 to -33.89583213089892
Iteration 3 complete. Error: -33.89583213089892 Total: 8.7219; Orientation: 0.0657; Line Search: 5.3808
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/eb33e1bb-7a46-4195-88cc-9367d94ea1dc.jpg)
Adding measurement 1a971d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.522e+04, gradient 7.113e-04, dot -0.829; [af4c9106-6927-4315-a305-9a335c0d5d46 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.89583213089892, -31.547193386619035, -30.148182832668102, -30.148181430185254
LBFGS Accumulation History: 3 points
Removed measurement 1a971d4 to history. Total: 3
th(0)=-33.89583213089892;dx=-5.054022106805548E-7
New Minimum: -33.89583213089892 > -37.301094543440726
END: th(7818012.603187701)=-37.301094543440726; dx=-3.068732379170236E-7 evalInputDelta=3.405262412541809
Fitness changed from -33.89583213089892 to -37.301094543440726
Iteration 4 complete. Error: -37.301094543440726 Total: 9.8263; Orientation: 1.1548; Line Search: 5.6008
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a4364114-5db5-4660-a11d-08f61752d260.jpg)
Adding measurement 34740187 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.338e+04, gradient 6.300e-04, dot -0.654; [af4c9106-6927-4315-a305-9a335c0d5d46 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.301094543440726, -31.547193386619035, -30.148182832668102, -30.148181430185254
LBFGS Accumulation History: 3 points
Removed measurement 34740187 to history. Total: 3
th(0)=-37.301094543440726;dx=-3.9584201352641523E-7
New Minimum: -37.301094543440726 > -41.54963212412892
END: th(1.6843397559414055E7)=-41.54963212412892; dx=-1.435037329666659E-7 evalInputDelta=4.248537580688193
Fitness changed from -37.301094543440726 to -41.54963212412892
Iteration 5 complete. Error: -41.54963212412892 Total: 9.6584; Orientation: 1.1582; Line Search: 5.4019
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/2fdeecd4-9a95-4751-bc0a-5e8fe3d99db4.jpg)
Adding measurement 71aac88 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.450e+04, gradient 6.617e-04, dot -0.423; [af4c9106-6927-4315-a305-9a335c0d5d46 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -41.54963212412892, -31.547193386619035, -30.148182832668102, -30.148181430185254
LBFGS Accumulation History: 3 points
Removed measurement 71aac88 to history. Total: 3
th(0)=-41.54963212412892;dx=-4.371380144008184E-7
New Minimum: -41.54963212412892 > -44.77780985266635
WOLF (strong): th(3.628800000000001E7)=-44.77780985266635; dx=2.443705210699974E-9 evalInputDelta=3.228177728537432
New Minimum: -44.77780985266635 > -44.81447592341547
END: th(1.8144000000000004E7)=-44.81447592341547; dx=-2.8747675139889952E-8 evalInputDelta=3.2648437992865524
Fitness changed from -41.54963212412892 to -44.81447592341547
Iteration 6 complete. Error: -44.81447592341547 Total: 12.4742; Orientation: 1.1411; Line Search: 8.2274
Adding measurement 6eca3243 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.880e+04, gradient 7.001e-04, dot -0.346; [af4c9106-6927-4315-a305-9a335c0d5d46 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.81447592341547, -31.547193386619035, -30.148182832668102, -30.148181430185254
LBFGS Accumulation History: 3 points
Removed measurement 6eca3243 to history. Total: 3
th(0)=-44.81447592341547;dx=-4.895895540919687E-7
New Minimum: -44.81447592341547 > -46.44557505079591
WOLF (strong): th(3.9090063015938506E7)=-46.44557505079591; dx=6.535688315342357E-8 evalInputDelta=1.6310991273804376
New Minimum: -46.44557505079591 > -48.1823152331211
WOLF (strong): th(1.9545031507969253E7)=-48.1823152331211; dx=5.018237872579555E-8 evalInputDelta=3.36783930970563
END: th(6515010.502656418)=-47.48078047228906; dx=-2.4769238444301034E-7 evalInputDelta=2.6663045488735904
Fitness changed from -44.81447592341547 to -48.1823152331211
Iteration 7 complete. Error: -48.1823152331211 Total: 14.7655; Orientation: 1.1288; Line Search: 10.9614
Adding measurement 19554d7c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.177e+04, gradient 7.012e-04, dot -0.306; [af4c9106-6927-4315-a305-9a335c0d5d46 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.1823152331211, -31.547193386619035, -30.148182832668102, -30.148181430185254
LBFGS Accumulation History: 3 points
Removed measurement 19554d7c to history. Total: 3
th(0)=-48.1823152331211;dx=-4.903607335530496E-7
New Minimum: -48.1823152331211 > -51.97502420101993
END: th(1.4036164632845048E7)=-51.97502420101993; dx=-1.3852526785775104E-8 evalInputDelta=3.7927089678988253
Fitness changed from -48.1823152331211 to -51.97502420101993
Iteration 8 complete. Error: -51.97502420101993 Total: 9.4116; Orientation: 1.1060; Line Search: 5.7323
Adding measurement 67f3cc5a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.282e+04, gradient 5.639e-04, dot -0.438; [af4c9106-6927-4315-a305-9a335c0d5d46 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.97502420101993, -31.547193386619035, -30.148182832668102, -30.148181430185254
LBFGS Accumulation History: 3 points
Removed measurement 67f3cc5a to history. Total: 3
th(0)=-51.97502420101993;dx=-3.172170347755916E-7
New Minimum: -51.97502420101993 > -53.641036503320976
WOLF (strong): th(3.024000000000001E7)=-53.641036503320976; dx=5.6988032913410476E-8 evalInputDelta=1.6660123023010485
New Minimum: -53.641036503320976 > -54.39065723690502
END: th(1.5120000000000006E7)=-54.39065723690502; dx=-1.6258944143860978E-8 evalInputDelta=2.4156330358850937
Fitness changed from -51.97502420101993 to -54.39065723690502
Iteration 9 complete. Error: -54.39065723690502 Total: 11.8713; Orientation: 1.1263; Line Search: 8.0575
Adding measurement 5382d5f1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.686e+04, gradient 5.661e-04, dot -0.420; [af4c9106-6927-4315-a305-9a335c0d5d46 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.39065723690502, -31.547193386619035, -30.148182832668102, -30.148181430185254
LBFGS Accumulation History: 3 points
Removed measurement 5382d5f1 to history. Total: 3
th(0)=-54.39065723690502;dx=-3.2001349101485413E-7
New Minimum: -54.39065723690502 > -55.08445484261025
WOLF (strong): th(3.2575052513282094E7)=-55.08445484261025; dx=7.02861320939165E-8 evalInputDelta=0.6937976057052282
New Minimum: -55.08445484261025 > -56.417809268284806
WOLF (strong): th(1.6287526256641047E7)=-56.417809268284806; dx=3.0690986019175114E-8 evalInputDelta=2.027152031379785
END: th(5429175.418880349)=-55.88901661864835; dx=-1.8083685260179858E-7 evalInputDelta=1.4983593817433274
Fitness changed from -54.39065723690502 to -56.417809268284806
Iteration 10 complete. Error: -56.417809268284806 Total: 14.5083; Orientation: 1.1509; Line Search: 10.6789
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3f96c5e0-1ad9-4033-b38c-d918fb2f14f2.jpg)
Final threshold in iteration 11: -56.417809268284806 (> -Infinity) after 135.771s (< 5400.000s)

Returns

    -56.417809268284806