Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

BasicOptimizer.scala:89 executed in 54.52 seconds (0.809 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: 450066348585400
Reset training subject: 450067409973400
Adding measurement 2566428f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-27.471807147384684;dx=-1.7476729059479417E-5
New Minimum: -27.471807147384684 > -27.47184507156838
WOLFE (weak): th(2.154434690031884)=-27.47184507156838; dx=-1.7479484591234486E-5 evalInputDelta=3.792418369741313E-5
New Minimum: -27.47184507156838 > -27.471885523973288
WOLFE (weak): th(4.308869380063768)=-27.471885523973288; dx=-1.7386567789667868E-5 evalInputDelta=7.837658860410102E-5
New Minimum: -27.471885523973288 > -27.472042276479687
WOLFE (weak): th(12.926608140191302)=-27.472042276479687; dx=-1.747987617470364E-5 evalInputDelta=2.3512909500311707E-4
New Minimum: -27.472042276479687 > -27.472747651690394
WOLFE (weak): th(51.70643256076521)=-27.472747651690394; dx=-1.7473272985021232E-5 evalInputDelta=9.405043057100215E-4
New Minimum: -27.472747651690394 > -27.476511874832166
WOLFE (weak): th(258.53216280382605)=-27.476511874832166; dx=-1.7471856216257877E-5 evalInputDelta=0.004704727447482071
New Minimum: -27.476511874832166 > -27.500036067170235
WOLFE (weak): th(1551.1929768229563)=-27.500036067170235; dx=-1.7454734169938364E-5 evalInputDelta=0.0282289197855512
New Minimum: -27.500036067170235 > -27.66917755867262
WOLFE (weak): th(10858.350837760694)=-27.66917755867262; dx=-1.7296377614719053E-5 evalInputDelta=0.19737041128793464
New Minimum: -27.66917755867262 > -29.023520994396257
WOLFE (weak): th(86866.80670208555)=-29.023520994396257; dx=-1.6764232331938814E-5 evalInputDelta=1.5517138470115732
New Minimum: -29.023520994396257 > -36.48936771007095
END: th(781801.26031877)=-36.48936771007095; dx=-7.403612914435117E-6 evalInputDelta=9.017560562686267
Fitness changed from -27.471807147384684 to -36.48936771007095
Iteration 1 complete. Error: -36.48936771007095 Total: 10.3343; Orientation: 0.0164; Line Search: 7.7443
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4df7e001-a2b1-41a0-9aa2-2517b90149ba.jpg)
Adding measurement 10832790 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-36.48936771007095;dx=-1.6547675065817573E-5
New Minimum: -36.48936771007095 > -42.83145579439658
END: th(1684339.7559414052)=-42.83145579439658; dx=-3.577718906085487E-6 evalInputDelta=6.342088084325631
Fitness changed from -36.48936771007095 to -42.83145579439658
Iteration 2 complete. Error: -42.83145579439658 Total: 2.8924; Orientation: 0.0147; Line Search: 1.7649
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/57df1703-7fa1-4d70-b8f4-7c4c12d129fc.jpg)
Adding measurement 32640b6d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-42.83145579439658;dx=-1.3836130048506096E-5
New Minimum: -42.83145579439658 > -48.39194957573842
END: th(3628800.0)=-48.39194957573842; dx=-1.59525993067538E-6 evalInputDelta=5.56049378134184
Fitness changed from -42.83145579439658 to -48.39194957573842
Iteration 3 complete. Error: -48.39194957573842 Total: 2.3698; Orientation: 0.0149; Line Search: 1.5487
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1cbf0307-c4c9-49cd-8ffb-660996721031.jpg)
Adding measurement 6c26f80e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.029e+04, gradient 3.219e-03, dot -0.254; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.39194957573842, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 6c26f80e to history. Total: 3
th(0)=-48.39194957573842;dx=-1.0321975196714334E-5
New Minimum: -48.39194957573842 > -59.28644708136139
END: th(7818012.6031877)=-59.28644708136139; dx=-7.857593028567024E-7 evalInputDelta=10.894497505622965
Fitness changed from -48.39194957573842 to -59.28644708136139
Iteration 4 complete. Error: -59.28644708136139 Total: 2.8357; Orientation: 0.2638; Line Search: 1.7192
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c50be5ed-4690-42ca-bed0-4ca511fb87c6.jpg)
Adding measurement 2054183c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.225e+03, gradient 2.611e-03, dot -0.242; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.28644708136139, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 2054183c to history. Total: 3
th(0)=-59.28644708136139;dx=-6.76443815399526E-6
New Minimum: -59.28644708136139 > -78.70982469057525
END: th(1.684339755941405E7)=-78.70982469057525; dx=-3.4793787601096257E-7 evalInputDelta=19.42337760921386
Fitness changed from -59.28644708136139 to -78.70982469057525
Iteration 5 complete. Error: -78.70982469057525 Total: 2.8305; Orientation: 0.2647; Line Search: 1.6704
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/bbb08fef-8115-49d5-b4c9-2b2a01422002.jpg)
Adding measurement 4b47646a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.434e+03, gradient 2.136e-03, dot -0.200; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.70982469057525, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 4b47646a to history. Total: 3
th(0)=-78.70982469057525;dx=-4.552441293362303E-6
New Minimum: -78.70982469057525 > -100.38788806098589
END: th(3.6288E7)=-100.38788806098589; dx=-1.1700883333171592E-7 evalInputDelta=21.67806337041064
Fitness changed from -78.70982469057525 to -100.38788806098589
Iteration 6 complete. Error: -100.38788806098589 Total: 2.7905; Orientation: 0.2592; Line Search: 1.6283
Adding measurement 34b4c16f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.024e+03, gradient 1.569e-03, dot -0.127; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -100.38788806098589, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 34b4c16f to history. Total: 3
th(0)=-100.38788806098589;dx=-2.434852634534834E-6
New Minimum: -100.38788806098589 > -126.2178185948211
END: th(7.8180126031877E7)=-126.2178185948211; dx=-2.6023976014057128E-8 evalInputDelta=25.82993053383521
Fitness changed from -100.38788806098589 to -126.2178185948211
Iteration 7 complete. Error: -126.2178185948211 Total: 2.6496; Orientation: 0.2303; Line Search: 1.4995
Adding measurement 5dadf7d9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.155e+04, gradient 1.049e-03, dot -0.053; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -126.2178185948211, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 5dadf7d9 to history. Total: 3
th(0)=-126.2178185948211;dx=-1.0864835260193124E-6
New Minimum: -126.2178185948211 > -139.8610507021377
WOLF (strong): th(1.6843397559414053E8)=-139.8610507021377; dx=2.6143546557889644E-9 evalInputDelta=13.643232107316607
New Minimum: -139.8610507021377 > -148.98305516932712
END: th(8.421698779707026E7)=-148.98305516932712; dx=-3.623914919147669E-8 evalInputDelta=22.76523657450602
Fitness changed from -126.2178185948211 to -148.98305516932712
Iteration 8 complete. Error: -148.98305516932712 Total: 3.2296; Orientation: 0.2437; Line Search: 2.2680
Adding measurement 338b9bbf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.867e+04, gradient 7.152e-04, dot -0.039; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -148.98305516932712, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 338b9bbf to history. Total: 3
th(0)=-148.98305516932712;dx=-5.015362665310838E-7
New Minimum: -148.98305516932712 > -155.18670806243284
WOLF (strong): th(1.8144000000000003E8)=-155.18670806243284; dx=3.469459910374731E-9 evalInputDelta=6.203652893105726
New Minimum: -155.18670806243284 > -161.66464578094647
END: th(9.072000000000001E7)=-161.66464578094647; dx=-2.2752053722346006E-8 evalInputDelta=12.681590611619356
Fitness changed from -148.98305516932712 to -161.66464578094647
Iteration 9 complete. Error: -161.66464578094647 Total: 3.7236; Orientation: 0.2444; Line Search: 2.7649
Adding measurement 36b1af58 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.214e+04, gradient 5.085e-04, dot -0.039; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -161.66464578094647, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 36b1af58 to history. Total: 3
th(0)=-161.66464578094647;dx=-2.576019434228209E-7
New Minimum: -161.66464578094647 > -162.26207882848107
WOLF (strong): th(1.9545031507969254E8)=-162.26207882848107; dx=3.7368597957696095E-9 evalInputDelta=0.5974330475345937
New Minimum: -162.26207882848107 > -167.29391211822664
END: th(9.772515753984627E7)=-167.29391211822664; dx=-1.1415048162127405E-8 evalInputDelta=5.629266337280171
Fitness changed from -161.66464578094647 to -167.29391211822664
Iteration 10 complete. Error: -167.29391211822664 Total: 3.3313; Orientation: 0.2585; Line Search: 2.2847
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e05d175a-554e-41a3-a024-fafd3f45b857.jpg)
Adding measurement 542e3b11 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.896e+04, gradient 3.804e-04, dot -0.038; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -167.29391211822664, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 542e3b11 to history. Total: 3
th(0)=-167.29391211822664;dx=-1.437689903614297E-7
Armijo: th(2.1054246949267572E8)=-166.87726724103348; dx=2.6255558301537874E-9 evalInputDelta=-0.4166448771931641
New Minimum: -167.29391211822664 > -170.60016072651717
END: th(1.0527123474633786E8)=-170.60016072651717; dx=-6.712313610614532E-9 evalInputDelta=3.306248608290531
Fitness changed from -167.29391211822664 to -170.60016072651717
Iteration 11 complete. Error: -170.60016072651717 Total: 3.2594; Orientation: 0.2350; Line Search: 2.2276
Adding measurement 18050959 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.705e+04, gradient 2.895e-04, dot -0.038; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -170.60016072651717, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 18050959 to history. Total: 3
th(0)=-170.60016072651717;dx=-8.269404583259005E-8
Armijo: th(2.268000000000001E8)=-170.49540170530736; dx=2.2488750490734157E-9 evalInputDelta=-0.10475902120981573
New Minimum: -170.60016072651717 > -172.716763302002
END: th(1.1340000000000004E8)=-172.716763302002; dx=-3.5512625819870213E-9 evalInputDelta=2.1166025754848192
Fitness changed from -170.60016072651717 to -172.716763302002
Iteration 12 complete. Error: -172.716763302002 Total: 3.4367; Orientation: 0.2374; Line Search: 2.4624
Adding measurement 3df040b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.292e+04, gradient 2.400e-04, dot -0.035; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -172.716763302002, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 3df040b1 to history. Total: 3
th(0)=-172.716763302002;dx=-5.691230882743015E-8
Armijo: th(2.4431289384961572E8)=-172.5813206847309; dx=1.4596135656610266E-9 evalInputDelta=-0.13544261727108164
New Minimum: -172.716763302002 > -174.3835753298169
END: th(1.2215644692480786E8)=-174.3835753298169; dx=-1.7958578576819908E-9 evalInputDelta=1.666812027814899
Fitness changed from -172.716763302002 to -174.3835753298169
Iteration 13 complete. Error: -174.3835753298169 Total: 3.2125; Orientation: 0.2377; Line Search: 2.2622
Adding measurement 67968225 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.181e+04, gradient 1.979e-04, dot -0.036; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -174.3835753298169, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 67968225 to history. Total: 3
th(0)=-174.3835753298169;dx=-3.801882761625884E-8
Armijo: th(2.631780868658447E8)=-173.82697683548366; dx=1.1711368545656997E-9 evalInputDelta=-0.5565984943332296
New Minimum: -174.3835753298169 > -175.192015714908
END: th(1.3158904343292235E8)=-175.192015714908; dx=-1.366967020208635E-9 evalInputDelta=0.808440385091103
Fitness changed from -174.3835753298169 to -175.192015714908
Iteration 14 complete. Error: -175.192015714908 Total: 3.2201; Orientation: 0.2410; Line Search: 2.2527
Adding measurement 53692479 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.414e+03, gradient 1.715e-04, dot -0.034; [dea6701c-60ea-4fbb-b16a-3fd018f76993 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -175.192015714908, -42.83145579439658, -36.48936771007095, -27.471807147384684
LBFGS Accumulation History: 3 points
Removed measurement 53692479 to history. Total: 3
th(0)=-175.192015714908;dx=-2.9002405403661218E-8
Armijo: th(2.835000000000002E8)=-174.17057626175196; dx=8.232272680487406E-10 evalInputDelta=-1.0214394531560345
Armijo: th(1.417500000000001E8)=-175.1907343549683; dx=-3.4733142915142797E-10 evalInputDelta=-0.0012813599396963582
New Minimum: -175.192015714908 > -175.79104644703466
END: th(4.725000000000003E7)=-175.79104644703466; dx=-7.115373330427941E-9 evalInputDelta=0.5990307321266641
Fitness changed from -175.192015714908 to -175.79104644703466
Iteration 15 complete. Error: -175.79104644703466 Total: 4.3432; Orientation: 0.2677; Line Search: 3.3426
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/0ac38ff1-9218-4b2f-b846-aa4bd93199a5.jpg)
Final threshold in iteration 16: -175.79104644703466 (> -Infinity) after 54.522s (< 5400.000s)

Returns

    -175.79104644703466