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 133.72 seconds (1.732 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: 334510886466500
Reset training subject: 334513559062800
Adding measurement 7c9ba32f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-129.11090861783063;dx=-3.0496457789077243E-5
New Minimum: -129.11090861783063 > -129.11096837991047
END: th(2.154434690031884)=-129.11096837991047; dx=-2.2214048689336262E-5 evalInputDelta=5.976207984303983E-5
Fitness changed from -129.11090861783063 to -129.11096837991047
Iteration 1 complete. Error: -129.11096837991047 Total: 12.9950; Orientation: 0.0596; Line Search: 5.2565
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/15e1312c-31b6-4479-95f5-ae08a00f1afa.jpg)
Adding measurement b8b30a2 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-129.11096837991047;dx=-2.2099620445708936E-5
New Minimum: -129.11096837991047 > -129.1110879039871
WOLFE (weak): th(4.641588833612779)=-129.1110879039871; dx=-2.208804567714317E-5 evalInputDelta=1.195240766378447E-4
New Minimum: -129.1110879039871 > -129.1111999577085
WOLFE (weak): th(9.283177667225559)=-129.1111999577085; dx=-2.2077527689414136E-5 evalInputDelta=2.3157779801863398E-4
New Minimum: -129.1111999577085 > -129.1116556418402
WOLFE (weak): th(27.849533001676676)=-129.1116556418402; dx=-2.206732597279843E-5 evalInputDelta=6.872619297269011E-4
New Minimum: -129.1116556418402 > -129.11373234587745
WOLFE (weak): th(111.3981320067067)=-129.11373234587745; dx=-2.2055636278059407E-5 evalInputDelta=0.0027639659669773664
New Minimum: -129.11373234587745 > -129.1247876181079
WOLFE (weak): th(556.9906600335335)=-129.1247876181079; dx=-2.2052799791639866E-5 evalInputDelta=0.013819238197413597
New Minimum: -129.1247876181079 > -129.19387656737726
WOLFE (weak): th(3341.9439602012008)=-129.19387656737726; dx=-2.2030170667520237E-5 evalInputDelta=0.08290818746678497
New Minimum: -129.19387656737726 > -129.68911943886513
WOLFE (weak): th(23393.607721408407)=-129.68911943886513; dx=-2.1861066076119477E-5 evalInputDelta=0.5781510589546599
New Minimum: -129.68911943886513 > -133.5630093529091
WOLFE (weak): th(187148.86177126726)=-133.5630093529091; dx=-2.0160619531881556E-5 evalInputDelta=4.452040972998617
New Minimum: -133.5630093529091 > -153.72983334732194
END: th(1684339.7559414054)=-153.72983334732194; dx=-5.466374095469635E-6 evalInputDelta=24.61886496741147
Fitness changed from -129.11096837991047 to -153.72983334732194
Iteration 2 complete. Error: -153.72983334732194 Total: 28.3395; Orientation: 0.0598; Line Search: 25.4469
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2c72af39-0b9c-443b-8de7-ed857e693a54.jpg)
Adding measurement 34109a8a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-153.72983334732194;dx=-9.86409762273712E-6
New Minimum: -153.72983334732194 > -170.64187844121474
END: th(3628800.0000000005)=-170.64187844121474; dx=-7.034279572684366E-7 evalInputDelta=16.9120450938928
Fitness changed from -153.72983334732194 to -170.64187844121474
Iteration 3 complete. Error: -170.64187844121474 Total: 8.0111; Orientation: 0.0571; Line Search: 5.0107
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/bb2faedf-5476-4c08-b824-b2fa200df929.jpg)
Adding measurement 415d35d2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.309e+03, gradient 3.133e-03, dot -0.314; [de9e343d-53aa-40b8-ae5b-6a6c245d06af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -170.64187844121474, -153.72983334732194, -129.11096837991047, -129.11090861783063
LBFGS Accumulation History: 3 points
Removed measurement 415d35d2 to history. Total: 3
th(0)=-170.64187844121474;dx=-9.81084655354123E-6
Armijo: th(7818012.603187701)=-166.1744162992039; dx=3.4072319439383428E-6 evalInputDelta=-4.467462142010845
New Minimum: -170.64187844121474 > -180.36442352626852
WOLF (strong): th(3909006.3015938504)=-180.36442352626852; dx=1.995329492870042E-6 evalInputDelta=9.722545085053781
END: th(1303002.1005312835)=-180.13529958172998; dx=-3.6664345373284493E-6 evalInputDelta=9.493421140515238
Fitness changed from -170.64187844121474 to -180.36442352626852
Iteration 4 complete. Error: -180.36442352626852 Total: 14.2988; Orientation: 1.0629; Line Search: 10.1675
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1b74d506-d41c-470a-ba85-9dd412a2b513.jpg)
Adding measurement 6267a8f2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.134e+03, gradient 3.263e-03, dot -0.198; [de9e343d-53aa-40b8-ae5b-6a6c245d06af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -180.36442352626852, -153.72983334732194, -129.11096837991047, -129.11090861783063
LBFGS Accumulation History: 3 points
Removed measurement 6267a8f2 to history. Total: 3
th(0)=-180.36442352626852;dx=-1.0638821472109156E-5
New Minimum: -180.36442352626852 > -194.40571895111873
WOLF (strong): th(2807232.926569009)=-194.40571895111873; dx=8.271172782471542E-7 evalInputDelta=14.041295424850205
END: th(1403616.4632845046)=-192.12422389875968; dx=-4.330531037945241E-6 evalInputDelta=11.759800372491156
Fitness changed from -180.36442352626852 to -194.40571895111873
Iteration 5 complete. Error: -194.40571895111873 Total: 11.8384; Orientation: 1.0564; Line Search: 7.8477
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d2b01621-8d61-4811-82c5-9b67ae9ce609.jpg)
Adding measurement 1e31c38f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.119e+04, gradient 2.522e-03, dot -0.341; [de9e343d-53aa-40b8-ae5b-6a6c245d06af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -194.40571895111873, -153.72983334732194, -129.11096837991047, -129.11090861783063
LBFGS Accumulation History: 3 points
Removed measurement 1e31c38f to history. Total: 3
th(0)=-194.40571895111873;dx=-6.340697848849286E-6
New Minimum: -194.40571895111873 > -202.89473666189974
WOLF (strong): th(3024000.0000000005)=-202.89473666189974; dx=5.420277031423662E-7 evalInputDelta=8.489017710781013
END: th(1512000.0000000002)=-201.6672895429454; dx=-2.474980743298991E-6 evalInputDelta=7.261570591826683
Fitness changed from -194.40571895111873 to -202.89473666189974
Iteration 6 complete. Error: -202.89473666189974 Total: 12.6542; Orientation: 1.0506; Line Search: 8.4739
Adding measurement 7bb18851 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.662e+04, gradient 2.415e-03, dot -0.394; [de9e343d-53aa-40b8-ae5b-6a6c245d06af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -202.89473666189974, -153.72983334732194, -129.11096837991047, -129.11090861783063
LBFGS Accumulation History: 3 points
Removed measurement 7bb18851 to history. Total: 3
th(0)=-202.89473666189974;dx=-5.820645227985234E-6
New Minimum: -202.89473666189974 > -209.11133156993066
WOLF (strong): th(3257505.251328209)=-209.11133156993066; dx=1.4565236532627281E-6 evalInputDelta=6.216594908030913
New Minimum: -209.11133156993066 > -209.50333578938867
END: th(1628752.6256641045)=-209.50333578938867; dx=-1.6446229614100324E-6 evalInputDelta=6.6085991274889295
Fitness changed from -202.89473666189974 to -209.50333578938867
Iteration 7 complete. Error: -209.50333578938867 Total: 11.3525; Orientation: 1.0779; Line Search: 7.8655
Adding measurement 3158b288 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.176e+04, gradient 1.653e-03, dot -0.638; [de9e343d-53aa-40b8-ae5b-6a6c245d06af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -209.50333578938867, -153.72983334732194, -129.11096837991047, -129.11090861783063
LBFGS Accumulation History: 3 points
Removed measurement 3158b288 to history. Total: 3
th(0)=-209.50333578938867;dx=-2.7295740686546417E-6
New Minimum: -209.50333578938867 > -216.20189142508616
END: th(3509041.158211262)=-216.20189142508616; dx=-1.0835068017923297E-6 evalInputDelta=6.698555635697488
Fitness changed from -209.50333578938867 to -216.20189142508616
Iteration 8 complete. Error: -216.20189142508616 Total: 8.5715; Orientation: 0.9652; Line Search: 5.0902
Adding measurement 60fa83bf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.261e+04, gradient 1.889e-03, dot -0.501; [de9e343d-53aa-40b8-ae5b-6a6c245d06af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -216.20189142508616, -153.72983334732194, -129.11096837991047, -129.11090861783063
LBFGS Accumulation History: 3 points
Removed measurement 60fa83bf to history. Total: 3
th(0)=-216.20189142508616;dx=-3.560921498886614E-6
Armijo: th(7560000.000000003)=-215.1417593950485; dx=1.4591119012157685E-6 evalInputDelta=-1.0601320300376642
New Minimum: -216.20189142508616 > -220.38178521506924
WOLF (strong): th(3780000.0000000014)=-220.38178521506924; dx=4.7311153484547307E-7 evalInputDelta=4.179893789983083
END: th(1260000.0000000005)=-219.67770459856308; dx=-1.6340079427337477E-6 evalInputDelta=3.475813173476922
Fitness changed from -216.20189142508616 to -220.38178521506924
Iteration 9 complete. Error: -220.38178521506924 Total: 14.0068; Orientation: 0.9736; Line Search: 10.4103
Adding measurement 1cd4ee3d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.057e+04, gradient 2.351e-03, dot -0.337; [de9e343d-53aa-40b8-ae5b-6a6c245d06af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -220.38178521506924, -153.72983334732194, -129.11096837991047, -129.11090861783063
LBFGS Accumulation History: 3 points
Removed measurement 1cd4ee3d to history. Total: 3
th(0)=-220.38178521506924;dx=-5.521446616278106E-6
New Minimum: -220.38178521506924 > -226.40702524332204
WOLF (strong): th(2714587.7094401745)=-226.40702524332204; dx=1.0429867795342048E-6 evalInputDelta=6.025240028252796
END: th(1357293.8547200873)=-226.033951465695; dx=-2.02506993432642E-6 evalInputDelta=5.652166250625754
Fitness changed from -220.38178521506924 to -226.40702524332204
Iteration 10 complete. Error: -226.40702524332204 Total: 11.2029; Orientation: 1.0128; Line Search: 7.7023
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/19459143-0a39-4398-bdcd-c5b47f5d7698.jpg)
Final threshold in iteration 11: -226.40702524332204 (> -Infinity) after 133.720s (< 5400.000s)

Returns

    -226.40702524332204