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 65.80 seconds (1.872 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: 142845437428700
Reset training subject: 142846344146900
Adding measurement 3fdab109 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.23386224658490232;dx=-3.663311604724991E-8
New Minimum: -0.23386224658490232 > -0.23386233206309825
WOLFE (weak): th(2.154434690031884)=-0.23386233206309825; dx=-3.519032784130779E-8 evalInputDelta=8.547819593807127E-8
New Minimum: -0.23386233206309825 > -0.2338624175412629
WOLFE (weak): th(4.308869380063768)=-0.2338624175412629; dx=-3.5064583117906814E-8 evalInputDelta=1.7095636059560881E-7
New Minimum: -0.2338624175412629 > -0.23386279506944985
WOLFE (weak): th(12.926608140191302)=-0.23386279506944985; dx=-3.518843419845597E-8 evalInputDelta=5.484845475300926E-7
New Minimum: -0.23386279506944985 > -0.23386439065354658
WOLFE (weak): th(51.70643256076521)=-0.23386439065354658; dx=-3.528967260545944E-8 evalInputDelta=2.144068644266417E-6
New Minimum: -0.23386439065354658 > -0.2338729453629883
WOLFE (weak): th(258.53216280382605)=-0.2338729453629883; dx=-3.526550365277292E-8 evalInputDelta=1.0698778085987959E-5
New Minimum: -0.2338729453629883 > -0.23392649600474386
WOLFE (weak): th(1551.1929768229563)=-0.23392649600474386; dx=-3.5247572852271894E-8 evalInputDelta=6.424941984153887E-5
New Minimum: -0.23392649600474386 > -0.23431139505147347
WOLFE (weak): th(10858.350837760694)=-0.23431139505147347; dx=-3.519812710081094E-8 evalInputDelta=4.4914846657115315E-4
New Minimum: -0.23431139505147347 > -0.23746740360755048
WOLFE (weak): th(86866.80670208555)=-0.23746740360755048; dx=-3.5239934187826104E-8 evalInputDelta=0.003605157022648159
New Minimum: -0.23746740360755048 > -0.26755543227602047
WOLFE (weak): th(781801.26031877)=-0.26755543227602047; dx=-3.619314649648195E-8 evalInputDelta=0.03369318569111815
New Minimum: -0.26755543227602047 > -0.4393625552928989
END: th(7818012.6031877)=-0.4393625552928989; dx=-8.279640277453176E-9 evalInputDelta=0.2055003087079966
Fitness changed from -0.23386224658490232 to -0.4393625552928989
Iteration 1 complete. Error: -0.4393625552928989 Total: 12.1665; Orientation: 0.0152; Line Search: 9.6724
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7774f3c5-12d5-4946-b645-5eb5c1013a3d.jpg)
Adding measurement 53834329 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.4393625552928989;dx=-7.736995193494342E-8
New Minimum: -0.4393625552928989 > -0.5702048740876083
WOLF (strong): th(1.684339755941405E7)=-0.5702048740876083; dx=3.3204290761818095E-9 evalInputDelta=0.13084231879470942
New Minimum: -0.5702048740876083 > -0.6099643671388081
END: th(8421698.779707026)=-0.6099643671388081; dx=-4.526350299412967E-9 evalInputDelta=0.17060181184590917
Fitness changed from -0.4393625552928989 to -0.6099643671388081
Iteration 2 complete. Error: -0.6099643671388081 Total: 3.4764; Orientation: 0.0149; Line Search: 2.5321
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/54957f70-4828-4cef-bfc2-7df8fd6131a9.jpg)
Adding measurement 1a920b25 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.6099643671388081;dx=-8.56008375687635E-8
New Minimum: -0.6099643671388081 > -0.710848447672458
WOLF (strong): th(1.8144E7)=-0.710848447672458; dx=5.510535775842737E-9 evalInputDelta=0.10088408053364994
New Minimum: -0.710848447672458 > -0.795019550032609
WOLF (strong): th(9072000.0)=-0.795019550032609; dx=3.4102089560592436E-10 evalInputDelta=0.18505518289380096
END: th(3024000.0)=-0.7833676331291051; dx=-3.081565219787749E-8 evalInputDelta=0.17340326599029698
Fitness changed from -0.6099643671388081 to -0.795019550032609
Iteration 3 complete. Error: -0.795019550032609 Total: 4.4991; Orientation: 0.0149; Line Search: 3.6102
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/0364006d-d6e9-4614-ad67-323af776ce77.jpg)
Adding measurement 4022fce1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.581e+03, gradient 2.755e-04, dot -0.314; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.795019550032609, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 4022fce1 to history. Total: 3
th(0)=-0.795019550032609;dx=-7.547092406319655E-8
New Minimum: -0.795019550032609 > -0.996494546955919
END: th(6515010.502656417)=-0.996494546955919; dx=-9.890519653419762E-9 evalInputDelta=0.20147499692330995
Fitness changed from -0.795019550032609 to -0.996494546955919
Iteration 4 complete. Error: -0.996494546955919 Total: 3.1863; Orientation: 0.3178; Line Search: 1.7261
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b2ea8bd0-c76a-4ee1-861f-005af1c4787c.jpg)
Adding measurement 93e82ed to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.766e+03, gradient 2.299e-04, dot -0.339; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.996494546955919, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 93e82ed to history. Total: 3
th(0)=-0.996494546955919;dx=-5.269403917860557E-8
New Minimum: -0.996494546955919 > -1.1326857870598563
END: th(1.4036164632845046E7)=-1.1326857870598563; dx=-1.7324123895752334E-9 evalInputDelta=0.13619124010393735
Fitness changed from -0.996494546955919 to -1.1326857870598563
Iteration 5 complete. Error: -1.1326857870598563 Total: 2.9670; Orientation: 0.3078; Line Search: 1.6973
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/76570e24-ae8b-45b9-855d-7547603e7b28.jpg)
Adding measurement 19383291 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.200e+04, gradient 2.724e-04, dot -0.310; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1326857870598563, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 19383291 to history. Total: 3
th(0)=-1.1326857870598563;dx=-7.403813384580354E-8
Armijo: th(3.0240000000000007E7)=-0.9247821473293002; dx=9.575907615180938E-9 evalInputDelta=-0.20790363973055614
New Minimum: -1.1326857870598563 > -1.2067336899615309
WOLF (strong): th(1.5120000000000004E7)=-1.2067336899615309; dx=6.930049595892259E-9 evalInputDelta=0.07404790290167451
New Minimum: -1.2067336899615309 > -1.2957938970484852
END: th(5040000.000000001)=-1.2957938970484852; dx=-1.511339426868839E-8 evalInputDelta=0.1631081099886289
Fitness changed from -1.1326857870598563 to -1.2957938970484852
Iteration 6 complete. Error: -1.2957938970484852 Total: 5.4540; Orientation: 0.2938; Line Search: 4.2398
Adding measurement 725e9e37 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.483e+04, gradient 2.184e-04, dot -0.361; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2957938970484852, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 725e9e37 to history. Total: 3
th(0)=-1.2957938970484852;dx=-4.751757656361205E-8
New Minimum: -1.2957938970484852 > -1.3962043580649057
END: th(1.0858350837760696E7)=-1.3962043580649057; dx=-6.24221459961109E-9 evalInputDelta=0.10041046101642048
Fitness changed from -1.2957938970484852 to -1.3962043580649057
Iteration 7 complete. Error: -1.3962043580649057 Total: 2.8436; Orientation: 0.2841; Line Search: 1.7186
Adding measurement 173355d0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.239e+04, gradient 2.564e-04, dot -0.348; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3962043580649057, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 173355d0 to history. Total: 3
th(0)=-1.3962043580649057;dx=-6.547044594403076E-8
Armijo: th(2.339360772140841E7)=-1.2950993754895688; dx=5.224345036566697E-9 evalInputDelta=-0.10110498257533695
New Minimum: -1.3962043580649057 > -1.4516779784186602
WOLF (strong): th(1.1696803860704206E7)=-1.4516779784186602; dx=2.200483937759204E-10 evalInputDelta=0.05547362035375447
New Minimum: -1.4516779784186602 > -1.5007946853704406
END: th(3898934.6202347353)=-1.5007946853704406; dx=-1.514229034350914E-8 evalInputDelta=0.10459032730553486
Fitness changed from -1.3962043580649057 to -1.5007946853704406
Iteration 8 complete. Error: -1.5007946853704406 Total: 4.7446; Orientation: 0.3227; Line Search: 3.5360
Adding measurement 4e487739 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.734e+04, gradient 2.121e-04, dot -0.399; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5007946853704406, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 4e487739 to history. Total: 3
th(0)=-1.5007946853704406;dx=-4.481932473262455E-8
New Minimum: -1.5007946853704406 > -1.5799562925786108
END: th(8400000.000000002)=-1.5799562925786108; dx=-1.0127902157391966E-8 evalInputDelta=0.07916160720817023
Fitness changed from -1.5007946853704406 to -1.5799562925786108
Iteration 9 complete. Error: -1.5799562925786108 Total: 2.8297; Orientation: 0.2783; Line Search: 1.7145
Adding measurement 32954301 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.627e+04, gradient 2.247e-04, dot -0.390; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5799562925786108, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 32954301 to history. Total: 3
th(0)=-1.5799562925786108;dx=-5.0308609070010134E-8
Armijo: th(1.8097251396267828E7)=-1.5279579573853606; dx=3.638207051077257E-10 evalInputDelta=-0.051998335193250256
New Minimum: -1.5799562925786108 > -1.6171893306407403
END: th(9048625.698133914)=-1.6171893306407403; dx=-3.515897615975772E-9 evalInputDelta=0.03723303806212952
Fitness changed from -1.5799562925786108 to -1.6171893306407403
Iteration 10 complete. Error: -1.6171893306407403 Total: 3.9839; Orientation: 0.2791; Line Search: 2.6453
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/74e50da6-1513-45b3-90d6-c8dd36159aa5.jpg)
Adding measurement 6ab1d126 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.562e+04, gradient 2.505e-04, dot -0.323; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6171893306407403, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 6ab1d126 to history. Total: 3
th(0)=-1.6171893306407403;dx=-6.237671342441952E-8
Armijo: th(1.9494673101173677E7)=-1.4955301753564991; dx=6.379212993667873E-9 evalInputDelta=-0.1216591552842412
New Minimum: -1.6171893306407403 > -1.652427079167646
WOLF (strong): th(9747336.550586838)=-1.652427079167646; dx=2.555538513567655E-9 evalInputDelta=0.035237748526905754
New Minimum: -1.652427079167646 > -1.7041814641769024
END: th(3249112.1835289462)=-1.7041814641769024; dx=-1.5647352964587668E-8 evalInputDelta=0.08699213353616209
Fitness changed from -1.6171893306407403 to -1.7041814641769024
Iteration 11 complete. Error: -1.7041814641769024 Total: 4.6571; Orientation: 0.2759; Line Search: 3.4357
Adding measurement 1ab455ff to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.013e+04, gradient 2.064e-04, dot -0.403; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7041814641769024, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 1ab455ff to history. Total: 3
th(0)=-1.7041814641769024;dx=-4.2262587261025184E-8
New Minimum: -1.7041814641769024 > -1.7652402950349972
END: th(7000000.000000003)=-1.7652402950349972; dx=-9.866628920450374E-9 evalInputDelta=0.061058830858094826
Fitness changed from -1.7041814641769024 to -1.7652402950349972
Iteration 12 complete. Error: -1.7652402950349972 Total: 3.6953; Orientation: 0.2748; Line Search: 2.6343
Adding measurement 3da083fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.593e+04, gradient 2.219e-04, dot -0.387; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7652402950349972, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 3da083fb to history. Total: 3
th(0)=-1.7652402950349972;dx=-4.912093672227624E-8
Armijo: th(1.5081042830223193E7)=-1.74719397703947; dx=-1.888736750966846E-9 evalInputDelta=-0.01804631799552725
New Minimum: -1.7652402950349972 > -1.8003783613013402
END: th(7540521.415111597)=-1.8003783613013402; dx=-5.665809417874671E-9 evalInputDelta=0.03513806626634297
Fitness changed from -1.7652402950349972 to -1.8003783613013402
Iteration 13 complete. Error: -1.8003783613013402 Total: 3.6839; Orientation: 0.2744; Line Search: 2.5659
Adding measurement 6d93dd42 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.427e+04, gradient 2.192e-04, dot -0.380; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8003783613013402, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 6d93dd42 to history. Total: 3
th(0)=-1.8003783613013402;dx=-4.786809544858505E-8
Armijo: th(1.6245560917644735E7)=-1.7102946470928995; dx=5.674596244202331E-9 evalInputDelta=-0.09008371420844075
New Minimum: -1.8003783613013402 > -1.8453801151747913
WOLF (strong): th(8122780.458822368)=-1.8453801151747913; dx=3.639656102700141E-10 evalInputDelta=0.04500175387345107
New Minimum: -1.8453801151747913 > -1.8540173141163465
END: th(2707593.4862741227)=-1.8540173141163465; dx=-1.7949938401282188E-8 evalInputDelta=0.0536389528150063
Fitness changed from -1.8003783613013402 to -1.8540173141163465
Iteration 14 complete. Error: -1.8540173141163465 Total: 4.5191; Orientation: 0.2768; Line Search: 3.4404
Adding measurement 7b51cd3a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.121e+05, gradient 1.990e-04, dot -0.425; [13b4be5d-186e-4feb-a9b0-0367c28eeaea = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8540173141163465, -0.6099643671388081, -0.4393625552928989, -0.23386224658490232
LBFGS Accumulation History: 3 points
Removed measurement 7b51cd3a to history. Total: 3
th(0)=-1.8540173141163465;dx=-3.946455144972776E-8
New Minimum: -1.8540173141163465 > -1.8952409088656803
END: th(5833333.333333338)=-1.8952409088656803; dx=-1.0601044118442739E-8 evalInputDelta=0.04122359474933379
Fitness changed from -1.8540173141163465 to -1.8952409088656803
Iteration 15 complete. Error: -1.8952409088656803 Total: 2.9873; Orientation: 0.2988; Line Search: 1.8477
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/fe68dd86-ea2c-40ba-a1e0-8d2c83883ba0.jpg)
Final threshold in iteration 16: -1.8952409088656803 (> -Infinity) after 65.803s (< 5400.000s)

Returns

    -1.8952409088656803