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 85.66 seconds (1.437 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: 309190154825400
Reset training subject: 309191876163200
Adding measurement 5a4219c8 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-148.30337388750536;dx=-2.7214546962178553E-5
New Minimum: -148.30337388750536 > -148.30340858259194
END: th(2.154434690031884)=-148.30340858259194; dx=-1.7306086000373272E-5 evalInputDelta=3.4695086583269585E-5
Fitness changed from -148.30337388750536 to -148.30340858259194
Iteration 1 complete. Error: -148.30340858259194 Total: 8.4500; Orientation: 0.0620; Line Search: 3.2653
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7ed1e6b4-6686-4cbb-8ab8-786188b22830.jpg)
Adding measurement 3299c098 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-148.30340858259194;dx=-1.7133913184669053E-5
New Minimum: -148.30340858259194 > -148.30349878977904
WOLFE (weak): th(4.641588833612779)=-148.30349878977904; dx=-1.7136776264072936E-5 evalInputDelta=9.020718709962239E-5
New Minimum: -148.30349878977904 > -148.30359593591922
WOLFE (weak): th(9.283177667225559)=-148.30359593591922; dx=-1.713539039801271E-5 evalInputDelta=1.8735332727715104E-4
New Minimum: -148.30359593591922 > -148.30394288590028
WOLFE (weak): th(27.849533001676676)=-148.30394288590028; dx=-1.7122862486142493E-5 evalInputDelta=5.343033083420323E-4
New Minimum: -148.30394288590028 > -148.305531906442
WOLFE (weak): th(111.3981320067067)=-148.305531906442; dx=-1.7099999753347657E-5 evalInputDelta=0.0021233238500713014
New Minimum: -148.305531906442 > -148.31398326673394
WOLFE (weak): th(556.9906600335335)=-148.31398326673394; dx=-1.7092573318100776E-5 evalInputDelta=0.010574684142000024
New Minimum: -148.31398326673394 > -148.36685231800865
WOLFE (weak): th(3341.9439602012008)=-148.36685231800865; dx=-1.710185431376969E-5 evalInputDelta=0.06344373541671189
New Minimum: -148.36685231800865 > -148.74680810287438
WOLFE (weak): th(23393.607721408407)=-148.74680810287438; dx=-1.7044005501635363E-5 evalInputDelta=0.44339952028244056
New Minimum: -148.74680810287438 > -151.79015387774396
WOLFE (weak): th(187148.86177126726)=-151.79015387774396; dx=-1.643390945343263E-5 evalInputDelta=3.4867452951520193
New Minimum: -151.79015387774396 > -173.63620980170953
END: th(1684339.7559414054)=-173.63620980170953; dx=-9.655466296202549E-6 evalInputDelta=25.332801219117584
Fitness changed from -148.30340858259194 to -173.63620980170953
Iteration 2 complete. Error: -173.63620980170953 Total: 18.4060; Orientation: 0.0736; Line Search: 16.4930
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/21768b39-bdf0-4141-8962-e50414e33d42.jpg)
Adding measurement 6b410fc2 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-173.63620980170953;dx=-1.1787848689201878E-5
New Minimum: -173.63620980170953 > -202.3607369683124
END: th(3628800.0000000005)=-202.3607369683124; dx=-4.084739491367987E-6 evalInputDelta=28.724527166602883
Fitness changed from -173.63620980170953 to -202.3607369683124
Iteration 3 complete. Error: -202.3607369683124 Total: 5.3056; Orientation: 0.0618; Line Search: 3.4109
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/471761d6-8a01-490a-a554-b3159327c430.jpg)
Adding measurement 4507ee6c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.279e+04, gradient 3.043e-03, dot -0.419; [34faef12-7add-4c16-9cb8-698a6e716f7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -202.3607369683124, -173.63620980170953, -148.30340858259194, -148.30337388750536
LBFGS Accumulation History: 3 points
Removed measurement 4507ee6c to history. Total: 3
th(0)=-202.3607369683124;dx=-9.258892843031205E-6
New Minimum: -202.3607369683124 > -224.65443111001886
WOLF (strong): th(7818012.603187701)=-224.65443111001886; dx=7.1537735249931E-8 evalInputDelta=22.293694141706453
END: th(3909006.3015938504)=-222.231788805771; dx=-1.8365025377468327E-6 evalInputDelta=19.871051837458594
Fitness changed from -202.3607369683124 to -224.65443111001886
Iteration 4 complete. Error: -224.65443111001886 Total: 7.8565; Orientation: 1.0649; Line Search: 4.8673
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/440e3189-1036-4abb-be7e-aa33ab14863b.jpg)
Adding measurement 6f188845 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.734e+03, gradient 3.681e-03, dot -0.155; [34faef12-7add-4c16-9cb8-698a6e716f7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -224.65443111001886, -173.63620980170953, -148.30340858259194, -148.30337388750536
LBFGS Accumulation History: 3 points
Removed measurement 6f188845 to history. Total: 3
th(0)=-224.65443111001886;dx=-1.3552394230055512E-5
New Minimum: -224.65443111001886 > -233.33189112668427
WOLF (strong): th(8421698.779707028)=-233.33189112668427; dx=4.344563075591801E-6 evalInputDelta=8.677460016665407
New Minimum: -233.33189112668427 > -250.6689717215624
WOLF (strong): th(4210849.389853514)=-250.6689717215624; dx=1.0344281245625664E-6 evalInputDelta=26.014540611543538
END: th(1403616.4632845046)=-241.5816216401522; dx=-8.181911457514449E-6 evalInputDelta=16.927190530133345
Fitness changed from -224.65443111001886 to -250.6689717215624
Iteration 5 complete. Error: -250.6689717215624 Total: 9.7295; Orientation: 1.0566; Line Search: 6.6586
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b51dff65-2bd3-451c-ae7c-7656f8a9f2e4.jpg)
Adding measurement 63736be1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.763e+04, gradient 2.984e-03, dot -0.256; [34faef12-7add-4c16-9cb8-698a6e716f7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -250.6689717215624, -173.63620980170953, -148.30340858259194, -148.30337388750536
LBFGS Accumulation History: 3 points
Removed measurement 63736be1 to history. Total: 3
th(0)=-250.6689717215624;dx=-8.885030129118656E-6
New Minimum: -250.6689717215624 > -266.95140318961984
END: th(3024000.0000000005)=-266.95140318961984; dx=-1.212280757894874E-6 evalInputDelta=16.28243146805744
Fitness changed from -250.6689717215624 to -266.95140318961984
Iteration 6 complete. Error: -266.95140318961984 Total: 6.1288; Orientation: 1.0531; Line Search: 3.2337
Adding measurement 316a90b7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.886e+04, gradient 2.247e-03, dot -0.432; [34faef12-7add-4c16-9cb8-698a6e716f7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -266.95140318961984, -173.63620980170953, -148.30340858259194, -148.30337388750536
LBFGS Accumulation History: 3 points
Removed measurement 316a90b7 to history. Total: 3
th(0)=-266.95140318961984;dx=-5.039159248442641E-6
New Minimum: -266.95140318961984 > -278.3821108553805
WOLF (strong): th(6515010.502656418)=-278.3821108553805; dx=5.05671176377828E-7 evalInputDelta=11.430707665760679
END: th(3257505.251328209)=-277.8379800510596; dx=-1.435189289170873E-6 evalInputDelta=10.886576861439778
Fitness changed from -266.95140318961984 to -278.3821108553805
Iteration 7 complete. Error: -278.3821108553805 Total: 7.4992; Orientation: 1.0235; Line Search: 4.9270
Adding measurement 631e766f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.182e+04, gradient 3.006e-03, dot -0.220; [34faef12-7add-4c16-9cb8-698a6e716f7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -278.3821108553805, -173.63620980170953, -148.30340858259194, -148.30337388750536
LBFGS Accumulation History: 3 points
Removed measurement 631e766f to history. Total: 3
th(0)=-278.3821108553805;dx=-9.030735118507896E-6
New Minimum: -278.3821108553805 > -279.0311799853138
WOLF (strong): th(7018082.316422524)=-279.0311799853138; dx=4.343217335010605E-6 evalInputDelta=0.6490691299333093
New Minimum: -279.0311799853138 > -292.9682729171962
WOLF (strong): th(3509041.158211262)=-292.9682729171962; dx=1.1067395119456079E-6 evalInputDelta=14.586162061815685
END: th(1169680.3860704207)=-287.9076764154785; dx=-5.6605378496052455E-6 evalInputDelta=9.52556556009796
Fitness changed from -278.3821108553805 to -292.9682729171962
Iteration 8 complete. Error: -292.9682729171962 Total: 9.3601; Orientation: 1.0401; Line Search: 6.7737
Adding measurement 350a81b4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.043e+04, gradient 2.255e-03, dot -0.342; [34faef12-7add-4c16-9cb8-698a6e716f7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -292.9682729171962, -173.63620980170953, -148.30340858259194, -148.30337388750536
LBFGS Accumulation History: 3 points
Removed measurement 350a81b4 to history. Total: 3
th(0)=-292.9682729171962;dx=-5.086010559263603E-6
New Minimum: -292.9682729171962 > -301.46822711773183
END: th(2520000.000000001)=-301.46822711773183; dx=-1.3054289600336901E-6 evalInputDelta=8.499954200535626
Fitness changed from -292.9682729171962 to -301.46822711773183
Iteration 9 complete. Error: -301.46822711773183 Total: 6.4500; Orientation: 1.0502; Line Search: 3.7475
Adding measurement 3549b572 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.524e+04, gradient 1.666e-03, dot -0.487; [34faef12-7add-4c16-9cb8-698a6e716f7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -301.46822711773183, -173.63620980170953, -148.30340858259194, -148.30337388750536
LBFGS Accumulation History: 3 points
Removed measurement 3549b572 to history. Total: 3
th(0)=-301.46822711773183;dx=-2.7730445779186138E-6
New Minimum: -301.46822711773183 > -310.0908505620028
END: th(5429175.418880349)=-310.0908505620028; dx=-6.391975485019618E-7 evalInputDelta=8.622623444270971
Fitness changed from -301.46822711773183 to -310.0908505620028
Iteration 10 complete. Error: -310.0908505620028 Total: 6.1397; Orientation: 1.0332; Line Search: 3.5453
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/80b01f9c-dbb2-486a-96bb-234786855168.jpg)
Final threshold in iteration 11: -310.0908505620028 (> -Infinity) after 85.663s (< 5400.000s)

Returns

    -310.0908505620028