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 66.58 seconds (1.082 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: 678361964697500
Reset training subject: 678363036493100
Adding measurement 1cfa186e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-254.57867306836604;dx=-0.005519681722912603
New Minimum: -254.57867306836604 > -254.60181840964924
WOLFE (weak): th(2.154434690031884)=-254.60181840964924; dx=-0.005512183744795444 evalInputDelta=0.023145341283196785
New Minimum: -254.60181840964924 > -254.62496164702705
WOLFE (weak): th(4.308869380063768)=-254.62496164702705; dx=-0.0054894905045139546 evalInputDelta=0.046288578661005886
New Minimum: -254.62496164702705 > -254.71755190799084
WOLFE (weak): th(12.926608140191302)=-254.71755190799084; dx=-0.0055043378732568 evalInputDelta=0.13887883962479464
New Minimum: -254.71755190799084 > -255.133895606797
WOLFE (weak): th(51.70643256076521)=-255.133895606797; dx=-0.005474932073548211 evalInputDelta=0.5552225384309679
New Minimum: -255.133895606797 > -257.35051789825485
WOLFE (weak): th(258.53216280382605)=-257.35051789825485; dx=-0.005492871074049401 evalInputDelta=2.7718448298888063
New Minimum: -257.35051789825485 > -271.1368427565682
WOLFE (weak): th(1551.1929768229563)=-271.1368427565682; dx=-0.0054899210926373475 evalInputDelta=16.558169688202184
New Minimum: -271.1368427565682 > -355.34856347324666
END: th(10858.350837760694)=-355.34856347324666; dx=-0.004186346438956719 evalInputDelta=100.76989040488061
Fitness changed from -254.57867306836604 to -355.34856347324666
Iteration 1 complete. Error: -355.34856347324666 Total: 11.0005; Orientation: 0.0119; Line Search: 8.0388
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8e3c1509-f0b4-4c95-bf17-193310b81f35.jpg)
Adding measurement 6742a40e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-355.34856347324666;dx=-0.005179296764565775
New Minimum: -355.34856347324666 > -495.0317698138171
END: th(23393.607721408407)=-495.0317698138171; dx=-0.0025204036760001548 evalInputDelta=139.68320634057045
Fitness changed from -355.34856347324666 to -495.0317698138171
Iteration 2 complete. Error: -495.0317698138171 Total: 2.9555; Orientation: 0.0158; Line Search: 1.9137
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d5d0e35a-0568-4426-afd9-cec916b0087c.jpg)
Adding measurement 5fb33907 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-495.0317698138171;dx=-0.004809497359423258
New Minimum: -495.0317698138171 > -646.0150927029491
END: th(50400.00000000001)=-646.0150927029491; dx=-0.0012770993185801892 evalInputDelta=150.983322889132
Fitness changed from -495.0317698138171 to -646.0150927029491
Iteration 3 complete. Error: -646.0150927029491 Total: 3.0582; Orientation: 0.0122; Line Search: 2.0345
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f414800b-d3b6-49f4-ac12-514699744bbd.jpg)
Adding measurement 3c9489fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.337e+04, gradient 7.119e-02, dot -0.265; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -646.0150927029491, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 3c9489fb to history. Total: 3
th(0)=-646.0150927029491;dx=-0.0050460487474459255
New Minimum: -646.0150927029491 > -818.2278487683
END: th(108583.50837760697)=-818.2278487683; dx=-2.8954203807364856E-4 evalInputDelta=172.21275606535085
Fitness changed from -646.0150927029491 to -818.2278487683
Iteration 4 complete. Error: -818.2278487683 Total: 3.3049; Orientation: 0.2513; Line Search: 2.0003
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7653fda0-cafb-450f-8f11-bf496df09648.jpg)
Adding measurement 218528ae to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.847e+03, gradient 6.645e-02, dot -0.175; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -818.2278487683, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 218528ae to history. Total: 3
th(0)=-818.2278487683;dx=-0.004369601741118526
Armijo: th(233936.07721408413)=-781.7176200521516; dx=2.531297717490302E-4 evalInputDelta=-36.51022871614839
New Minimum: -818.2278487683 > -1056.070783612538
END: th(116968.03860704206)=-1056.070783612538; dx=-7.692414698835977E-6 evalInputDelta=237.84293484423802
Fitness changed from -818.2278487683 to -1056.070783612538
Iteration 5 complete. Error: -1056.070783612538 Total: 4.3039; Orientation: 0.2269; Line Search: 3.0535
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e1110294-2154-4733-933b-f0da89029fb9.jpg)
Adding measurement 375ee856 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.543e+03, gradient 5.923e-02, dot -0.154; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1056.070783612538, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 375ee856 to history. Total: 3
th(0)=-1056.070783612538;dx=-0.00347119027909408
Armijo: th(252000.0000000001)=-983.8703230101007; dx=3.268484125755141E-4 evalInputDelta=-72.20046060243726
New Minimum: -1056.070783612538 > -1318.3575482394751
WOLF (strong): th(126000.00000000004)=-1318.3575482394751; dx=6.977620068330579E-5 evalInputDelta=262.28676462693716
END: th(42000.000000000015)=-1293.1406052707493; dx=-0.0019356844238094277 evalInputDelta=237.06982165821137
Fitness changed from -1056.070783612538 to -1318.3575482394751
Iteration 6 complete. Error: -1318.3575482394751 Total: 5.2846; Orientation: 0.2219; Line Search: 4.0316
Adding measurement 4e7b9be to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.064e+04, gradient 6.035e-02, dot -0.154; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1318.3575482394751, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 4e7b9be to history. Total: 3
th(0)=-1318.3575482394751;dx=-0.0036230468742195726
New Minimum: -1318.3575482394751 > -1565.6430787379352
END: th(90486.25698133915)=-1565.6430787379352; dx=-2.1414793301970987E-4 evalInputDelta=247.28553049846005
Fitness changed from -1318.3575482394751 to -1565.6430787379352
Iteration 7 complete. Error: -1565.6430787379352 Total: 3.0685; Orientation: 0.2366; Line Search: 1.8830
Adding measurement 49bb2c7a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.445e+04, gradient 5.233e-02, dot -0.180; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1565.6430787379352, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 49bb2c7a to history. Total: 3
th(0)=-1565.6430787379352;dx=-0.002706446617912495
Armijo: th(194946.7310117368)=-1470.8899516959111; dx=3.8014133348232446E-4 evalInputDelta=-94.75312704202406
New Minimum: -1565.6430787379352 > -1722.5945547342242
END: th(97473.3655058684)=-1722.5945547342242; dx=-6.618712362234868E-5 evalInputDelta=156.951475996289
Fitness changed from -1565.6430787379352 to -1722.5945547342242
Iteration 8 complete. Error: -1722.5945547342242 Total: 4.2467; Orientation: 0.2322; Line Search: 3.0754
Adding measurement 742850c6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.285e+04, gradient 5.577e-02, dot -0.194; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1722.5945547342242, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 742850c6 to history. Total: 3
th(0)=-1722.5945547342242;dx=-0.0030870179873661798
Armijo: th(210000.0000000001)=-1490.622185531934; dx=5.038405020522646E-4 evalInputDelta=-231.9723692022901
New Minimum: -1722.5945547342242 > -1814.0886830582456
WOLF (strong): th(105000.00000000004)=-1814.0886830582456; dx=3.4176980004156285E-4 evalInputDelta=91.4941283240214
New Minimum: -1814.0886830582456 > -1873.5157458639092
END: th(35000.000000000015)=-1873.5157458639092; dx=-0.0015324298900386644 evalInputDelta=150.92119112968498
Fitness changed from -1722.5945547342242 to -1873.5157458639092
Iteration 9 complete. Error: -1873.5157458639092 Total: 5.0874; Orientation: 0.2222; Line Search: 3.9394
Adding measurement 5662e0e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.885e+04, gradient 4.221e-02, dot -0.268; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1873.5157458639092, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 5662e0e4 to history. Total: 3
th(0)=-1873.5157458639092;dx=-0.001769206101783943
New Minimum: -1873.5157458639092 > -1975.2897888664336
END: th(75405.21415111597)=-1975.2897888664336; dx=-8.565516815149955E-4 evalInputDelta=101.77404300252442
Fitness changed from -1873.5157458639092 to -1975.2897888664336
Iteration 10 complete. Error: -1975.2897888664336 Total: 3.0314; Orientation: 0.2232; Line Search: 1.8868
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/31682b79-e481-4500-8c9a-78a2b53484c9.jpg)
Adding measurement 4dd5f617 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.620e+04, gradient 4.390e-02, dot -0.267; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1975.2897888664336, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 4dd5f617 to history. Total: 3
th(0)=-1975.2897888664336;dx=-0.0019146701973066398
Armijo: th(162455.60917644735)=-1954.7217193247739; dx=-1.1539221792299667E-4 evalInputDelta=-20.568069541659725
New Minimum: -1975.2897888664336 > -2048.5640092513586
END: th(81227.80458822368)=-2048.5640092513586; dx=-4.8013199511421506E-4 evalInputDelta=73.274220384925
Fitness changed from -1975.2897888664336 to -2048.5640092513586
Iteration 11 complete. Error: -2048.5640092513586 Total: 4.3224; Orientation: 0.2193; Line Search: 3.0564
Adding measurement 6af68879 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.950e+04, gradient 4.772e-02, dot -0.242; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2048.5640092513586, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 6af68879 to history. Total: 3
th(0)=-2048.5640092513586;dx=-0.0022588739112059464
Armijo: th(175000.00000000012)=-1907.62345603109; dx=2.248887174413101E-4 evalInputDelta=-140.9405532202686
New Minimum: -2048.5640092513586 > -2101.73416492191
END: th(87500.00000000006)=-2101.73416492191; dx=-2.9380707802387373E-6 evalInputDelta=53.170155670551594
Fitness changed from -2048.5640092513586 to -2101.73416492191
Iteration 12 complete. Error: -2101.73416492191 Total: 4.0028; Orientation: 0.2199; Line Search: 2.8367
Adding measurement 4f95e581 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.018e+04, gradient 5.191e-02, dot -0.210; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2101.73416492191, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 4f95e581 to history. Total: 3
th(0)=-2101.73416492191;dx=-0.002683042960304741
Armijo: th(188513.03537778996)=-1868.5007358842543; dx=4.4863032759498E-4 evalInputDelta=-233.23342903765592
New Minimum: -2101.73416492191 > -2154.1451900928128
WOLF (strong): th(94256.51768889498)=-2154.1451900928128; dx=3.504633883620495E-4 evalInputDelta=52.411025170902576
New Minimum: -2154.1451900928128 > -2218.959891480691
END: th(31418.83922963166)=-2218.959891480691; dx=-0.0014854753286889111 evalInputDelta=117.22572655878093
Fitness changed from -2101.73416492191 to -2218.959891480691
Iteration 13 complete. Error: -2218.959891480691 Total: 5.5588; Orientation: 0.2218; Line Search: 4.3757
Adding measurement 48a44a12 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.286e+04, gradient 3.970e-02, dot -0.292; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2218.959891480691, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 48a44a12 to history. Total: 3
th(0)=-2218.959891480691;dx=-0.0015676035110646254
New Minimum: -2218.959891480691 > -2285.9901574591263
END: th(67689.83715685307)=-2285.9901574591263; dx=-6.588908703645676E-4 evalInputDelta=67.03026597843518
Fitness changed from -2218.959891480691 to -2285.9901574591263
Iteration 14 complete. Error: -2285.9901574591263 Total: 3.1177; Orientation: 0.2203; Line Search: 1.9453
Adding measurement 65f53469 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.011e+04, gradient 4.190e-02, dot -0.280; [6e289188-c05a-46ae-a276-92ae511ea602 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2285.9901574591263, -495.0317698138171, -355.34856347324666, -254.57867306836604
LBFGS Accumulation History: 3 points
Removed measurement 65f53469 to history. Total: 3
th(0)=-2285.9901574591263;dx=-0.00173928215657429
Armijo: th(145833.33333333343)=-2231.897175050858; dx=-4.397017789828934E-5 evalInputDelta=-54.0929824082682
New Minimum: -2285.9901574591263 > -2324.8792441759206
END: th(72916.66666666672)=-2324.8792441759206; dx=-3.3063677277615083E-4 evalInputDelta=38.88908671679428
Fitness changed from -2285.9901574591263 to -2324.8792441759206
Iteration 15 complete. Error: -2324.8792441759206 Total: 4.1367; Orientation: 0.2103; Line Search: 2.9078
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/627014ef-6847-4ff5-a408-461527ffc19c.jpg)
Final threshold in iteration 16: -2324.8792441759206 (> -Infinity) after 66.579s (< 5400.000s)

Returns

    -2324.8792441759206