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 14.33 seconds (0.840 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: 675431953720100
Reset training subject: 675432398322100
Adding measurement 67c6f4d8 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.5497571821138187;dx=-7.194649568238655E-6
New Minimum: -0.5497571821138187 > -0.5497982979334752
WOLFE (weak): th(2.154434690031884)=-0.5497982979334752; dx=-7.151581391674057E-6 evalInputDelta=4.1115819656489805E-5
New Minimum: -0.5497982979334752 > -0.5498396994545488
WOLFE (weak): th(4.308869380063768)=-0.5498396994545488; dx=-7.231062014304299E-6 evalInputDelta=8.251734073005945E-5
New Minimum: -0.5498396994545488 > -0.5500048282180963
WOLFE (weak): th(12.926608140191302)=-0.5500048282180963; dx=-7.156647595202033E-6 evalInputDelta=2.476461042775213E-4
New Minimum: -0.5500048282180963 > -0.550747832254048
WOLFE (weak): th(51.70643256076521)=-0.550747832254048; dx=-7.1292801759178045E-6 evalInputDelta=9.906501402292545E-4
New Minimum: -0.550747832254048 > -0.5547141829070706
WOLFE (weak): th(258.53216280382605)=-0.5547141829070706; dx=-6.9011575608037295E-6 evalInputDelta=0.004957000793251898
New Minimum: -0.5547141829070706 > -0.579683124693155
WOLFE (weak): th(1551.1929768229563)=-0.579683124693155; dx=-7.2509318893499325E-6 evalInputDelta=0.02992594257933623
New Minimum: -0.579683124693155 > -0.7605677361627534
WOLFE (weak): th(10858.350837760694)=-0.7605677361627534; dx=-7.200405111804656E-6 evalInputDelta=0.21081055404893467
New Minimum: -0.7605677361627534 > -1.8158449958482865
END: th(86866.80670208555)=-1.8158449958482865; dx=-2.666040386641736E-6 evalInputDelta=1.2660878137344678
Fitness changed from -0.5497571821138187 to -1.8158449958482865
Iteration 1 complete. Error: -1.8158449958482865 Total: 2.7653; Orientation: 0.0268; Line Search: 1.7419
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/38507244-2056-4589-b5fe-cec555899a5e.jpg)
Adding measurement 37142579 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1.8158449958482865;dx=-8.725816393742599E-6
New Minimum: -1.8158449958482865 > -3.205436216078491
END: th(187148.86177126726)=-3.205436216078491; dx=-2.0627606675100378E-7 evalInputDelta=1.3895912202302043
Fitness changed from -1.8158449958482865 to -3.205436216078491
Iteration 2 complete. Error: -3.205436216078491 Total: 0.5883; Orientation: 0.0026; Line Search: 0.3832
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/0ce4895c-bff0-416e-a973-a4200f3b0fcd.jpg)
Adding measurement 423762ae to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-3.205436216078491;dx=-1.3641083043474892E-5
Armijo: th(403200.00000000006)=-2.6433561176409253; dx=6.510372341298618E-7 evalInputDelta=-0.5620800984375656
New Minimum: -3.205436216078491 > -3.6435107961253843
WOLF (strong): th(201600.00000000003)=-3.6435107961253843; dx=1.7087891448485744E-6 evalInputDelta=0.4380745800468935
New Minimum: -3.6435107961253843 > -4.547102221225966
END: th(67200.00000000001)=-4.547102221225966; dx=-2.075088656940856E-6 evalInputDelta=1.3416660051474754
Fitness changed from -3.205436216078491 to -4.547102221225966
Iteration 3 complete. Error: -4.547102221225966 Total: 1.1608; Orientation: 0.0019; Line Search: 0.9601
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/2c13799b-263f-4f1a-b043-eee46e7571f9.jpg)
Adding measurement 2dd46693 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.049e+03, gradient 2.602e-03, dot -0.415; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.547102221225966, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement 2dd46693 to history. Total: 3
th(0)=-4.547102221225966;dx=-6.700259195266726E-6
New Minimum: -4.547102221225966 > -5.100714327702789
WOLF (strong): th(144778.01117014262)=-5.100714327702789; dx=1.0881077744872992E-7 evalInputDelta=0.5536121064768231
New Minimum: -5.100714327702789 > -5.19419823155136
END: th(72389.00558507131)=-5.19419823155136; dx=-1.6380950356620205E-6 evalInputDelta=0.6470960103253942
Fitness changed from -4.547102221225966 to -5.19419823155136
Iteration 4 complete. Error: -5.19419823155136 Total: 0.8861; Orientation: 0.0938; Line Search: 0.5791
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b1dec07b-96d8-4e02-ba9d-818e3f04b34a.jpg)
Adding measurement e356940 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.552e+03, gradient 2.388e-03, dot -0.480; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.19419823155136, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement e356940 to history. Total: 3
th(0)=-5.19419823155136;dx=-5.627154025951855E-6
New Minimum: -5.19419823155136 > -5.448918339909876
WOLF (strong): th(155957.38480938942)=-5.448918339909876; dx=7.29909670039514E-7 evalInputDelta=0.2547201083585158
New Minimum: -5.448918339909876 > -5.736592706580863
END: th(77978.69240469471)=-5.736592706580863; dx=-1.283607570748819E-6 evalInputDelta=0.5423944750295027
Fitness changed from -5.19419823155136 to -5.736592706580863
Iteration 5 complete. Error: -5.736592706580863 Total: 0.7879; Orientation: 0.0469; Line Search: 0.5414
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f258e166-7abf-4230-b262-d8faec81775e.jpg)
Adding measurement fdeec12 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.914e+03, gradient 2.429e-03, dot -0.479; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.736592706580863, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement fdeec12 to history. Total: 3
th(0)=-5.736592706580863;dx=-5.8277048185166685E-6
New Minimum: -5.736592706580863 > -6.018538549207803
END: th(168000.00000000006)=-6.018538549207803; dx=-2.7098641920714027E-7 evalInputDelta=0.2819458426269401
Fitness changed from -5.736592706580863 to -6.018538549207803
Iteration 6 complete. Error: -6.018538549207803 Total: 0.5836; Orientation: 0.0459; Line Search: 0.3424
Adding measurement 258ff54a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.123e+03, gradient 3.299e-03, dot -0.369; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.018538549207803, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement 258ff54a to history. Total: 3
th(0)=-6.018538549207803;dx=-1.0797040221449227E-5
Armijo: th(361945.0279253566)=-5.331477327481035; dx=5.206327707931621E-7 evalInputDelta=-0.6870612217267684
New Minimum: -6.018538549207803 > -6.451944833145862
WOLF (strong): th(180972.5139626783)=-6.451944833145862; dx=2.0550004952387096E-6 evalInputDelta=0.4334062839380586
New Minimum: -6.451944833145862 > -7.052683022991976
END: th(60324.17132089276)=-7.052683022991976; dx=-3.442003947857355E-6 evalInputDelta=1.0341444737841732
Fitness changed from -6.018538549207803 to -7.052683022991976
Iteration 7 complete. Error: -7.052683022991976 Total: 1.3934; Orientation: 0.0719; Line Search: 0.8262
Adding measurement 3e5e7f4c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.641e+03, gradient 2.253e-03, dot -0.509; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.052683022991976, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement 3e5e7f4c to history. Total: 3
th(0)=-7.052683022991976;dx=-4.831947561822919E-6
New Minimum: -7.052683022991976 > -7.8674744906509275
END: th(129964.48734115784)=-7.8674744906509275; dx=-1.8556283736467147E-6 evalInputDelta=0.8147914676589512
Fitness changed from -7.052683022991976 to -7.8674744906509275
Iteration 8 complete. Error: -7.8674744906509275 Total: 0.5798; Orientation: 0.0481; Line Search: 0.3504
Adding measurement 7e84be9b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.046e+03, gradient 2.444e-03, dot -0.518; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.8674744906509275, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement 7e84be9b to history. Total: 3
th(0)=-7.8674744906509275;dx=-5.9218601843227394E-6
New Minimum: -7.8674744906509275 > -8.018107858425177
END: th(280000.0000000001)=-8.018107858425177; dx=-3.763429324485557E-8 evalInputDelta=0.1506333677742493
Fitness changed from -7.8674744906509275 to -8.018107858425177
Iteration 9 complete. Error: -8.018107858425177 Total: 0.5787; Orientation: 0.0391; Line Search: 0.3754
Adding measurement 5f571d96 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.120e+03, gradient 3.956e-03, dot -0.321; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.018107858425177, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement 5f571d96 to history. Total: 3
th(0)=-8.018107858425177;dx=-1.5467351175111075E-5
Armijo: th(603241.7132089278)=-6.041281553717679; dx=9.36821743332737E-7 evalInputDelta=-1.9768263047074974
Armijo: th(301620.8566044639)=-7.85078358529585; dx=2.1247329219177683E-6 evalInputDelta=-0.16732427312932696
New Minimum: -8.018107858425177 > -9.806702074863718
END: th(100540.28553482129)=-9.806702074863718; dx=-1.3123244805975002E-6 evalInputDelta=1.7885942164385416
Fitness changed from -8.018107858425177 to -9.806702074863718
Iteration 10 complete. Error: -9.806702074863718 Total: 1.0632; Orientation: 0.0395; Line Search: 0.8495
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/bdc7b2db-9d99-4fbc-bf72-c6afa9dee659.jpg)
Adding measurement 160c47b4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.837e+04, gradient 2.801e-03, dot -0.456; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.806702074863718, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement 160c47b4 to history. Total: 3
th(0)=-9.806702074863718;dx=-7.808643203544532E-6
New Minimum: -9.806702074863718 > -10.757699320455316
WOLF (strong): th(216607.4789019298)=-10.757699320455316; dx=5.817055474882421E-8 evalInputDelta=0.9509972455915978
New Minimum: -10.757699320455316 > -10.800279632479537
END: th(108303.7394509649)=-10.800279632479537; dx=-2.1115070389020142E-6 evalInputDelta=0.9935775576158186
Fitness changed from -9.806702074863718 to -10.800279632479537
Iteration 11 complete. Error: -10.800279632479537 Total: 0.8332; Orientation: 0.0446; Line Search: 0.6013
Adding measurement 4c8c3285 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.464e+04, gradient 2.460e-03, dot -0.541; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -10.800279632479537, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement 4c8c3285 to history. Total: 3
th(0)=-10.800279632479537;dx=-6.009080005284432E-6
New Minimum: -10.800279632479537 > -11.648719813591153
END: th(233333.3333333335)=-11.648719813591153; dx=-4.227213313606972E-7 evalInputDelta=0.8484401811116165
Fitness changed from -10.800279632479537 to -11.648719813591153
Iteration 12 complete. Error: -11.648719813591153 Total: 0.5389; Orientation: 0.0401; Line Search: 0.3299
Adding measurement 4a05902b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.183e+04, gradient 3.659e-03, dot -0.354; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.648719813591153, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement 4a05902b to history. Total: 3
th(0)=-11.648719813591153;dx=-1.336735586467182E-5
Armijo: th(502701.42767410656)=-10.213794182030682; dx=7.740144625726579E-7 evalInputDelta=-1.4349256315604713
Armijo: th(251350.71383705328)=-11.56664395807502; dx=1.5360431491787196E-6 evalInputDelta=-0.08207585551613406
New Minimum: -11.648719813591153 > -12.818735104454948
END: th(83783.57127901776)=-12.818735104454948; dx=-1.029311871142759E-6 evalInputDelta=1.1700152908637946
Fitness changed from -11.648719813591153 to -12.818735104454948
Iteration 13 complete. Error: -12.818735104454948 Total: 1.1396; Orientation: 0.0433; Line Search: 0.9372
Adding measurement 4a26a54b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.718e+04, gradient 2.269e-03, dot -0.576; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.818735104454948, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement 4a26a54b to history. Total: 3
th(0)=-12.818735104454948;dx=-5.097400314979786E-6
New Minimum: -12.818735104454948 > -13.761711953509618
END: th(180506.23241827489)=-13.761711953509618; dx=-1.6384110047221396E-6 evalInputDelta=0.9429768490546699
Fitness changed from -12.818735104454948 to -13.761711953509618
Iteration 14 complete. Error: -13.761711953509618 Total: 0.5475; Orientation: 0.0397; Line Search: 0.3209
Adding measurement 69724abb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.082e+05, gradient 2.748e-03, dot -0.497; [a067832a-55e2-493b-9c58-a8c4bdf1df59 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.761711953509618, -3.205436216078491, -1.8158449958482865, -0.5497571821138187
LBFGS Accumulation History: 3 points
Removed measurement 69724abb to history. Total: 3
th(0)=-13.761711953509618;dx=-7.479802853310916E-6
Armijo: th(388888.8888888892)=-13.197330659966687; dx=3.273603045332421E-7 evalInputDelta=-0.5643812935429313
New Minimum: -13.761711953509618 > -14.405272941619156
WOLF (strong): th(194444.4444444446)=-14.405272941619156; dx=1.084475466664841E-6 evalInputDelta=0.6435609881095381
New Minimum: -14.405272941619156 > -14.469994510375361
END: th(64814.81481481487)=-14.469994510375361; dx=-3.270722774407176E-6 evalInputDelta=0.7082825568657434
Fitness changed from -13.761711953509618 to -14.469994510375361
Iteration 15 complete. Error: -14.469994510375361 Total: 0.8523; Orientation: 0.0377; Line Search: 0.6547
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/4ae84909-65d7-4f40-8918-1ce13e377d0d.jpg)
Final threshold in iteration 16: -14.469994510375361 (> -Infinity) after 14.315s (< 5400.000s)

Returns

    -14.469994510375361