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 35.40 seconds (0.866 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: 447915884918200
Reset training subject: 447917036062500
Adding measurement 4f70d016 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-5.13108967722002;dx=-1.4723814457878709E-6
New Minimum: -5.13108967722002 > -5.131093656184692
WOLFE (weak): th(2.154434690031884)=-5.131093656184692; dx=-1.4763305755351806E-6 evalInputDelta=3.978964672413099E-6
New Minimum: -5.131093656184692 > -5.13109736988227
WOLFE (weak): th(4.308869380063768)=-5.13109736988227; dx=-1.4773139053786328E-6 evalInputDelta=7.692662250313731E-6
New Minimum: -5.13109736988227 > -5.131113020435387
WOLFE (weak): th(12.926608140191302)=-5.131113020435387; dx=-1.469145975325997E-6 evalInputDelta=2.3343215366899983E-5
New Minimum: -5.131113020435387 > -5.131182784184724
WOLFE (weak): th(51.70643256076521)=-5.131182784184724; dx=-1.475566616839991E-6 evalInputDelta=9.310696470432589E-5
New Minimum: -5.131182784184724 > -5.131553868948285
WOLFE (weak): th(258.53216280382605)=-5.131553868948285; dx=-1.4786349465131343E-6 evalInputDelta=4.641917282652841E-4
New Minimum: -5.131553868948285 > -5.133873932903736
WOLFE (weak): th(1551.1929768229563)=-5.133873932903736; dx=-1.4765264164922895E-6 evalInputDelta=0.002784255683716097
New Minimum: -5.133873932903736 > -5.150590670354002
WOLFE (weak): th(10858.350837760694)=-5.150590670354002; dx=-1.4742309771549408E-6 evalInputDelta=0.019500993133982014
New Minimum: -5.150590670354002 > -5.285374527562057
WOLFE (weak): th(86866.80670208555)=-5.285374527562057; dx=-1.4521550051578154E-6 evalInputDelta=0.15428485034203732
New Minimum: -5.285374527562057 > -6.216901022606226
END: th(781801.26031877)=-6.216901022606226; dx=-1.0239163719783047E-6 evalInputDelta=1.0858113453862064
Fitness changed from -5.13108967722002 to -6.216901022606226
Iteration 1 complete. Error: -6.216901022606226 Total: 10.4471; Orientation: 0.0139; Line Search: 7.7952
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7926e621-d93f-46d9-ba4e-8ac9ca8bbf59.jpg)
Adding measurement 7a8a2118 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-6.216901022606226;dx=-1.5376204264048308E-6
New Minimum: -6.216901022606226 > -7.37018138806929
END: th(1684339.7559414052)=-7.37018138806929; dx=-5.428551412127641E-7 evalInputDelta=1.153280365463064
Fitness changed from -6.216901022606226 to -7.37018138806929
Iteration 2 complete. Error: -7.37018138806929 Total: 2.5620; Orientation: 0.0152; Line Search: 1.7421
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/953d90e6-f4a0-4b4b-9c25-804183e20fb0.jpg)
Adding measurement 6f0e0b5d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-7.37018138806929;dx=-1.4444354504306906E-6
New Minimum: -7.37018138806929 > -8.442496844607064
END: th(3628800.0)=-8.442496844607064; dx=-2.6734380369333055E-7 evalInputDelta=1.0723154565377735
Fitness changed from -7.37018138806929 to -8.442496844607064
Iteration 3 complete. Error: -8.442496844607064 Total: 2.3332; Orientation: 0.0133; Line Search: 1.5062
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/49c122d8-b6ca-4d1f-aa11-c585b0145185.jpg)
Adding measurement cfad5c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.281e+03, gradient 1.033e-03, dot -0.204; [a3097e16-81a1-4c91-99df-670ccfbf1f1b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.442496844607064, -7.37018138806929, -6.216901022606226, -5.13108967722002
LBFGS Accumulation History: 3 points
Removed measurement cfad5c3 to history. Total: 3
th(0)=-8.442496844607064;dx=-1.059904264706637E-6
New Minimum: -8.442496844607064 > -10.47515711879412
END: th(7818012.6031877)=-10.47515711879412; dx=-1.4005416704866868E-7 evalInputDelta=2.032660274187057
Fitness changed from -8.442496844607064 to -10.47515711879412
Iteration 4 complete. Error: -10.47515711879412 Total: 2.5927; Orientation: 0.2618; Line Search: 1.5318
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/68b345e6-b70a-451a-84c0-f184020dcc34.jpg)
Adding measurement 234d4cc4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.590e+03, gradient 9.233e-04, dot -0.190; [a3097e16-81a1-4c91-99df-670ccfbf1f1b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -10.47515711879412, -7.37018138806929, -6.216901022606226, -5.13108967722002
LBFGS Accumulation History: 3 points
Removed measurement 234d4cc4 to history. Total: 3
th(0)=-10.47515711879412;dx=-8.479580041638771E-7
New Minimum: -10.47515711879412 > -12.592239260562364
END: th(1.684339755941405E7)=-12.592239260562364; dx=-5.2507357168923734E-8 evalInputDelta=2.1170821417682433
Fitness changed from -10.47515711879412 to -12.592239260562364
Iteration 5 complete. Error: -12.592239260562364 Total: 2.9191; Orientation: 0.2559; Line Search: 1.5153
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a9404c54-616e-4788-a31e-dd3ea982bf23.jpg)
Adding measurement 7527b4d5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.023e+03, gradient 7.959e-04, dot -0.133; [a3097e16-81a1-4c91-99df-670ccfbf1f1b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.592239260562364, -7.37018138806929, -6.216901022606226, -5.13108967722002
LBFGS Accumulation History: 3 points
Removed measurement 7527b4d5 to history. Total: 3
th(0)=-12.592239260562364;dx=-6.308565070650422E-7
New Minimum: -12.592239260562364 > -16.75889930396527
END: th(3.6288E7)=-16.75889930396527; dx=-2.323440942385602E-8 evalInputDelta=4.166660043402905
Fitness changed from -12.592239260562364 to -16.75889930396527
Iteration 6 complete. Error: -16.75889930396527 Total: 2.7320; Orientation: 0.4343; Line Search: 1.5166
Adding measurement 543a28f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.530e+03, gradient 6.713e-04, dot -0.090; [a3097e16-81a1-4c91-99df-670ccfbf1f1b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.75889930396527, -7.37018138806929, -6.216901022606226, -5.13108967722002
LBFGS Accumulation History: 3 points
Removed measurement 543a28f7 to history. Total: 3
th(0)=-16.75889930396527;dx=-4.4796011854241E-7
New Minimum: -16.75889930396527 > -22.431793877102688
END: th(7.8180126031877E7)=-22.431793877102688; dx=-7.898501685847749E-9 evalInputDelta=5.67289457313742
Fitness changed from -16.75889930396527 to -22.431793877102688
Iteration 7 complete. Error: -22.431793877102688 Total: 2.6472; Orientation: 0.2405; Line Search: 1.5445
Adding measurement 6db07c63 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.075e+04, gradient 5.412e-04, dot -0.057; [a3097e16-81a1-4c91-99df-670ccfbf1f1b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -22.431793877102688, -7.37018138806929, -6.216901022606226, -5.13108967722002
LBFGS Accumulation History: 3 points
Removed measurement 6db07c63 to history. Total: 3
th(0)=-22.431793877102688;dx=-2.9076770671229806E-7
New Minimum: -22.431793877102688 > -28.045642352145617
END: th(1.6843397559414053E8)=-28.045642352145617; dx=-1.3551135737794923E-9 evalInputDelta=5.6138484750429285
Fitness changed from -22.431793877102688 to -28.045642352145617
Iteration 8 complete. Error: -28.045642352145617 Total: 2.4640; Orientation: 0.2451; Line Search: 1.4948
Adding measurement 56bfd8cb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.713e+04, gradient 4.018e-04, dot -0.031; [a3097e16-81a1-4c91-99df-670ccfbf1f1b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.045642352145617, -7.37018138806929, -6.216901022606226, -5.13108967722002
LBFGS Accumulation History: 3 points
Removed measurement 56bfd8cb to history. Total: 3
th(0)=-28.045642352145617;dx=-1.5893916062344745E-7
New Minimum: -28.045642352145617 > -35.242741372470924
WOLF (strong): th(3.6288000000000006E8)=-35.242741372470924; dx=1.162469852579231E-10 evalInputDelta=7.197099020325307
New Minimum: -35.242741372470924 > -37.712209340305314
END: th(1.8144000000000003E8)=-37.712209340305314; dx=-7.3871140344417635E-9 evalInputDelta=9.666566988159698
Fitness changed from -28.045642352145617 to -37.712209340305314
Iteration 9 complete. Error: -37.712209340305314 Total: 3.4467; Orientation: 0.2456; Line Search: 2.4791
Adding measurement 429ccf2a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.903e+04, gradient 2.978e-04, dot -0.037; [a3097e16-81a1-4c91-99df-670ccfbf1f1b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.712209340305314, -7.37018138806929, -6.216901022606226, -5.13108967722002
LBFGS Accumulation History: 3 points
Removed measurement 429ccf2a to history. Total: 3
th(0)=-37.712209340305314;dx=-8.709831020841901E-8
New Minimum: -37.712209340305314 > -40.71694419792501
WOLF (strong): th(3.909006301593851E8)=-40.71694419792501; dx=8.13365635562951E-11 evalInputDelta=3.0047348576196953
New Minimum: -40.71694419792501 > -43.04891511496793
END: th(1.9545031507969254E8)=-43.04891511496793; dx=-5.4399734116695556E-9 evalInputDelta=5.336705774662619
Fitness changed from -37.712209340305314 to -43.04891511496793
Iteration 10 complete. Error: -43.04891511496793 Total: 3.1904; Orientation: 0.2399; Line Search: 2.2447
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6b8f6d43-490a-4e53-bdcd-16a0b7f07a68.jpg)
Final threshold in iteration 11: -43.04891511496793 (> -Infinity) after 35.397s (< 5400.000s)

Returns

    -43.04891511496793