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 46.40 seconds (0.778 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: 224223940094700
Reset training subject: 224224567451200
Adding measurement 617e6561 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.8145118867856382;dx=-1.5577687874007477E-6
New Minimum: -0.8145118867856382 > -0.8145139830106254
WOLFE (weak): th(2.154434690031884)=-0.8145139830106254; dx=-1.557409346798665E-6 evalInputDelta=2.0962249871470107E-6
New Minimum: -0.8145139830106254 > -0.8145164395099908
WOLFE (weak): th(4.308869380063768)=-0.8145164395099908; dx=-1.5549682753693002E-6 evalInputDelta=4.552724352513415E-6
New Minimum: -0.8145164395099908 > -0.8145256102901978
WOLFE (weak): th(12.926608140191302)=-0.8145256102901978; dx=-1.5579468748505102E-6 evalInputDelta=1.3723504559526312E-5
New Minimum: -0.8145256102901978 > -0.8145670068953396
WOLFE (weak): th(51.70643256076521)=-0.8145670068953396; dx=-1.558103302329585E-6 evalInputDelta=5.5120109701323194E-5
New Minimum: -0.8145670068953396 > -0.8147874679919669
WOLFE (weak): th(258.53216280382605)=-0.8147874679919669; dx=-1.5569994061816715E-6 evalInputDelta=2.755812063286456E-4
New Minimum: -0.8147874679919669 > -0.8161571387153779
WOLFE (weak): th(1551.1929768229563)=-0.8161571387153779; dx=-1.5505330895169437E-6 evalInputDelta=0.0016452519297396329
New Minimum: -0.8161571387153779 > -0.8258751046925673
WOLFE (weak): th(10858.350837760694)=-0.8258751046925673; dx=-1.5235380122362779E-6 evalInputDelta=0.011363217906929068
New Minimum: -0.8258751046925673 > -0.8944594913002348
END: th(86866.80670208555)=-0.8944594913002348; dx=-1.3513709941039213E-6 evalInputDelta=0.07994760451459659
Fitness changed from -0.8145118867856382 to -0.8944594913002348
Iteration 1 complete. Error: -0.8944594913002348 Total: 7.7453; Orientation: 0.0169; Line Search: 6.0199
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0133eb1d-45f0-4b7a-a7a8-9fd0def8c1d7.jpg)
Adding measurement 6049c85e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.8944594913002348;dx=-1.5479195526875737E-6
New Minimum: -0.8944594913002348 > -1.0199223060408378
END: th(187148.86177126726)=-1.0199223060408378; dx=-1.061974760600005E-6 evalInputDelta=0.12546281474060295
Fitness changed from -0.8944594913002348 to -1.0199223060408378
Iteration 2 complete. Error: -1.0199223060408378 Total: 1.8076; Orientation: 0.0162; Line Search: 1.2154
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/db70addd-c475-4d44-a4ec-193a17bd1605.jpg)
Adding measurement 65724144 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.0199223060408378;dx=-1.4174128710697713E-6
New Minimum: -1.0199223060408378 > -1.1227765867737312
END: th(403200.00000000006)=-1.1227765867737312; dx=-6.277156016602128E-7 evalInputDelta=0.10285428073289338
Fitness changed from -1.0199223060408378 to -1.1227765867737312
Iteration 3 complete. Error: -1.1227765867737312 Total: 1.9112; Orientation: 0.0175; Line Search: 1.2961
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c7e4e189-4ef2-49e2-a455-418179f19d21.jpg)
Adding measurement 7bde0edc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.191e+03, gradient 1.300e-03, dot -0.358; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1227765867737312, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 7bde0edc to history. Total: 3
th(0)=-1.1227765867737312;dx=-1.6904022057980795E-6
Armijo: th(868668.0670208557)=-0.766936338258114; dx=-1.1653778337648289E-7 evalInputDelta=-0.35584024851561713
New Minimum: -1.1227765867737312 > -1.157284427451603
END: th(434334.03351042786)=-1.157284427451603; dx=-5.406302046882742E-7 evalInputDelta=0.034507840677871826
Fitness changed from -1.1227765867737312 to -1.157284427451603
Iteration 4 complete. Error: -1.157284427451603 Total: 2.6669; Orientation: 0.3115; Line Search: 1.7825
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/3c14422f-d8e8-4bd1-8b35-4db084973c2e.jpg)
Adding measurement 1dfaee4f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.036e+03, gradient 1.430e-03, dot -0.314; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.157284427451603, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 1dfaee4f to history. Total: 3
th(0)=-1.157284427451603;dx=-2.044475698124054E-6
Armijo: th(935744.3088563365)=-0.511779903477219; dx=5.781934211332638E-8 evalInputDelta=-0.645504523974384
Armijo: th(467872.15442816826)=-1.1183208899457913; dx=-4.4383735051918303E-7 evalInputDelta=-0.03896353750581172
New Minimum: -1.157284427451603 > -1.2617146195624496
END: th(155957.38480938942)=-1.2617146195624496; dx=-1.3579389492606408E-6 evalInputDelta=0.10443019211084659
Fitness changed from -1.157284427451603 to -1.2617146195624496
Iteration 5 complete. Error: -1.2617146195624496 Total: 3.7318; Orientation: 0.3105; Line Search: 2.8435
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b7516708-0935-4b45-a8c6-c98726e598d9.jpg)
Adding measurement 15559a88 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.758e+03, gradient 1.259e-03, dot -0.341; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2617146195624496, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 15559a88 to history. Total: 3
th(0)=-1.2617146195624496;dx=-1.585260581541455E-6
New Minimum: -1.2617146195624496 > -1.3161624761178046
END: th(336000.0000000001)=-1.3161624761178046; dx=-8.417666683012694E-7 evalInputDelta=0.054447856555355
Fitness changed from -1.2617146195624496 to -1.3161624761178046
Iteration 6 complete. Error: -1.3161624761178046 Total: 2.2361; Orientation: 0.3244; Line Search: 1.3015
Adding measurement 69ba86c9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.998e+03, gradient 1.295e-03, dot -0.303; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3161624761178046, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 69ba86c9 to history. Total: 3
th(0)=-1.3161624761178046;dx=-1.6765140511236653E-6
Armijo: th(723890.0558507132)=-1.026621694732671; dx=-3.4773212158712896E-7 evalInputDelta=-0.2895407813851336
New Minimum: -1.3161624761178046 > -1.3444714632459331
END: th(361945.0279253566)=-1.3444714632459331; dx=-8.04354685439762E-7 evalInputDelta=0.02830898712812857
Fitness changed from -1.3161624761178046 to -1.3444714632459331
Iteration 7 complete. Error: -1.3444714632459331 Total: 2.8467; Orientation: 0.3302; Line Search: 1.8775
Adding measurement 4b267f7f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.435e+03, gradient 1.337e-03, dot -0.276; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3444714632459331, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 4b267f7f to history. Total: 3
th(0)=-1.3444714632459331;dx=-1.785320260912126E-6
Armijo: th(779786.9240469472)=-0.9249363646906654; dx=-2.5778552392446975E-7 evalInputDelta=-0.4195350985552677
Armijo: th(389893.4620234736)=-1.3391190255893881; dx=-7.274974775306266E-7 evalInputDelta=-0.005352437656545028
New Minimum: -1.3444714632459331 > -1.4122904943418715
END: th(129964.48734115786)=-1.4122904943418715; dx=-1.3217610526548972E-6 evalInputDelta=0.06781903109593834
Fitness changed from -1.3444714632459331 to -1.4122904943418715
Iteration 8 complete. Error: -1.4122904943418715 Total: 3.5124; Orientation: 0.3135; Line Search: 2.6376
Adding measurement 14954588 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.539e+03, gradient 1.166e-03, dot -0.304; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4122904943418715, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 14954588 to history. Total: 3
th(0)=-1.4122904943418715;dx=-1.359406067609722E-6
New Minimum: -1.4122904943418715 > -1.4570023357778519
END: th(280000.0000000001)=-1.4570023357778519; dx=-8.819617466756876E-7 evalInputDelta=0.04471184143598039
Fitness changed from -1.4122904943418715 to -1.4570023357778519
Iteration 9 complete. Error: -1.4570023357778519 Total: 2.3421; Orientation: 0.3196; Line Search: 1.4714
Adding measurement 64ddc495 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.134e+03, gradient 1.152e-03, dot -0.282; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4570023357778519, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 64ddc495 to history. Total: 3
th(0)=-1.4570023357778519;dx=-1.3274186536136165E-6
Armijo: th(603241.7132089278)=-1.2888143796825333; dx=-4.3489889664556465E-7 evalInputDelta=-0.16818795609531856
New Minimum: -1.4570023357778519 > -1.4699369278799672
END: th(301620.8566044639)=-1.4699369278799672; dx=-7.967757188773659E-7 evalInputDelta=0.012934592102115339
Fitness changed from -1.4570023357778519 to -1.4699369278799672
Iteration 10 complete. Error: -1.4699369278799672 Total: 2.8171; Orientation: 0.2955; Line Search: 1.9199
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a68f15f1-aed7-4794-8a00-36a56474e9f8.jpg)
Adding measurement 59521d02 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.988e+03, gradient 1.198e-03, dot -0.272; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4699369278799672, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 59521d02 to history. Total: 3
th(0)=-1.4699369278799672;dx=-1.4358377888005602E-6
Armijo: th(649822.4367057894)=-1.21659581126085; dx=-3.3861461893089356E-7 evalInputDelta=-0.2533411166191173
Armijo: th(324911.2183528947)=-1.4678361650077858; dx=-7.460504387790826E-7 evalInputDelta=-0.0021007628721814164
New Minimum: -1.4699369278799672 > -1.5052343152304655
END: th(108303.7394509649)=-1.5052343152304655; dx=-1.1796058060961048E-6 evalInputDelta=0.035297387350498255
Fitness changed from -1.4699369278799672 to -1.5052343152304655
Iteration 11 complete. Error: -1.5052343152304655 Total: 3.7626; Orientation: 0.3177; Line Search: 2.8301
Adding measurement 4169c8e5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.772e+03, gradient 1.114e-03, dot -0.296; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5052343152304655, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 4169c8e5 to history. Total: 3
th(0)=-1.5052343152304655;dx=-1.2415112855451375E-6
New Minimum: -1.5052343152304655 > -1.5279807282259923
END: th(233333.3333333335)=-1.5279807282259923; dx=-8.844886987668425E-7 evalInputDelta=0.02274641299552682
Fitness changed from -1.5052343152304655 to -1.5279807282259923
Iteration 12 complete. Error: -1.5279807282259923 Total: 2.3729; Orientation: 0.3505; Line Search: 1.3256
Adding measurement 452077ec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.784e+03, gradient 1.083e-03, dot -0.303; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5279807282259923, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 452077ec to history. Total: 3
th(0)=-1.5279807282259923;dx=-1.1723229912009684E-6
Armijo: th(502701.42767410656)=-1.4104718647239727; dx=-5.34301344134233E-7 evalInputDelta=-0.11750886350201961
New Minimum: -1.5279807282259923 > -1.5370377009803105
END: th(251350.71383705328)=-1.5370377009803105; dx=-7.792703672671578E-7 evalInputDelta=0.00905697275431816
Fitness changed from -1.5279807282259923 to -1.5370377009803105
Iteration 13 complete. Error: -1.5370377009803105 Total: 3.0742; Orientation: 0.3316; Line Search: 2.1388
Adding measurement 78921a71 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.915e+03, gradient 1.086e-03, dot -0.296; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5370377009803105, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 78921a71 to history. Total: 3
th(0)=-1.5370377009803105;dx=-1.1799178684833601E-6
Armijo: th(541518.6972548246)=-1.3795789722029017; dx=-4.59795234282942E-7 evalInputDelta=-0.15745872877740874
Armijo: th(270759.3486274123)=-1.5330162104171023; dx=-7.241004410906306E-7 evalInputDelta=-0.004021490563208108
New Minimum: -1.5370377009803105 > -1.5574447741661746
END: th(90253.11620913743)=-1.5574447741661746; dx=-9.88938018918552E-7 evalInputDelta=0.0204070731858641
Fitness changed from -1.5370377009803105 to -1.5574447741661746
Iteration 14 complete. Error: -1.5574447741661746 Total: 3.3154; Orientation: 0.2949; Line Search: 2.4646
Adding measurement 7063d986 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.945e+03, gradient 1.018e-03, dot -0.309; [ab684438-cfa3-45bc-9552-92f0e323e67e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5574447741661746, -1.0199223060408378, -0.8944594913002348, -0.8145118867856382
LBFGS Accumulation History: 3 points
Removed measurement 7063d986 to history. Total: 3
th(0)=-1.5574447741661746;dx=-1.0364570327123697E-6
New Minimum: -1.5574447741661746 > -1.5702923925729073
END: th(194444.44444444458)=-1.5702923925729073; dx=-7.888585646993526E-7 evalInputDelta=0.012847618406732764
Fitness changed from -1.5574447741661746 to -1.5702923925729073
Iteration 15 complete. Error: -1.5702923925729073 Total: 2.2298; Orientation: 0.3490; Line Search: 1.2418
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/230ec16e-b565-4665-bc93-a06c9a513722.jpg)
Final threshold in iteration 16: -1.5702923925729073 (> -Infinity) after 46.397s (< 5400.000s)

Returns

    -1.5702923925729073