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 175.74 seconds (1.754 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: 12750896144539
Reset training subject: 12752093977267
Adding measurement 6b4f239 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.42633118991403335;dx=-4.533871217531521E-7
New Minimum: -0.42633118991403335 > -0.42633230768417174
WOLFE (weak): th(2.154434690031884)=-0.42633230768417174; dx=-4.546247851738533E-7 evalInputDelta=1.1177701383924266E-6
New Minimum: -0.42633230768417174 > -0.42633331367479055
WOLFE (weak): th(4.308869380063768)=-0.42633331367479055; dx=-4.461055525283047E-7 evalInputDelta=2.1237607571999995E-6
New Minimum: -0.42633331367479055 > -0.42633749409926774
WOLFE (weak): th(12.926608140191302)=-0.42633749409926774; dx=-4.484564814571959E-7 evalInputDelta=6.304185234395909E-6
New Minimum: -0.42633749409926774 > -0.4263562719710013
WOLFE (weak): th(51.70643256076521)=-0.4263562719710013; dx=-4.548564285891289E-7 evalInputDelta=2.508205696793997E-5
New Minimum: -0.4263562719710013 > -0.4264565630979945
WOLFE (weak): th(258.53216280382605)=-0.4264565630979945; dx=-4.5052853265363364E-7 evalInputDelta=1.2537318396116381E-4
New Minimum: -0.4264565630979945 > -0.42708307780017235
WOLFE (weak): th(1551.1929768229563)=-0.42708307780017235; dx=-4.513557340835781E-7 evalInputDelta=7.518878861390021E-4
New Minimum: -0.42708307780017235 > -0.4315881192455325
WOLFE (weak): th(10858.350837760694)=-0.4315881192455325; dx=-4.4824132003386884E-7 evalInputDelta=0.005256929331499127
New Minimum: -0.4315881192455325 > -0.4657988569990817
END: th(86866.80670208555)=-0.4657988569990817; dx=-3.938795548401907E-7 evalInputDelta=0.03946766708504834
Fitness changed from -0.42633118991403335 to -0.4657988569990817
Iteration 1 complete. Error: -0.4657988569990817 Total: 14.7469; Orientation: 0.0190; Line Search: 10.8312
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b2619419-ff39-46ae-b936-1b4c7815cadd.jpg)
Adding measurement 62ecf7f0 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.4657988569990817;dx=-4.355538438259575E-7
New Minimum: -0.4657988569990817 > -0.5419671674253846
END: th(187148.86177126726)=-0.5419671674253846; dx=-3.3357016790537304E-7 evalInputDelta=0.07616831042630295
Fitness changed from -0.4657988569990817 to -0.5419671674253846
Iteration 2 complete. Error: -0.5419671674253846 Total: 3.7644; Orientation: 0.0171; Line Search: 2.4439
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2ba124dd-6992-42df-8abc-1576016c43c0.jpg)
Adding measurement 1bff2e9e to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.5419671674253846;dx=-4.978780813562112E-7
New Minimum: -0.5419671674253846 > -0.6638254804841712
END: th(403200.00000000006)=-0.6638254804841712; dx=-1.809621250978395E-7 evalInputDelta=0.12185831305878658
Fitness changed from -0.5419671674253846 to -0.6638254804841712
Iteration 3 complete. Error: -0.6638254804841712 Total: 3.8963; Orientation: 0.0169; Line Search: 2.5755
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/878390e4-11bc-4385-8527-46a36e06fd0a.jpg)
Adding measurement 23d6488e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.834e+03, gradient 8.126e-04, dot -0.309; [6034d7db-a3d4-446c-bc03-5a5e0f1e4d22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.6638254804841712, -0.5419671674253846, -0.4657988569990817, -0.42633118991403335
LBFGS Accumulation History: 3 points
Removed measurement 23d6488e to history. Total: 3
th(0)=-0.6638254804841712;dx=-6.535916163880758E-7
New Minimum: -0.6638254804841712 > -0.7630534165555941
END: th(868668.0670208557)=-0.7630534165555941; dx=-4.406859559371157E-8 evalInputDelta=0.09922793607142288
Fitness changed from -0.6638254804841712 to -0.7630534165555941
Iteration 4 complete. Error: -0.7630534165555941 Total: 4.1505; Orientation: 0.4787; Line Search: 2.3783
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/fb384db0-01f0-43d4-8536-3620a78ae17c.jpg)
Adding measurement 65619539 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.847e+03, gradient 1.095e-03, dot -0.176; [6034d7db-a3d4-446c-bc03-5a5e0f1e4d22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.7630534165555941, -0.5419671674253846, -0.4657988569990817, -0.42633118991403335
LBFGS Accumulation History: 3 points
Removed measurement 65619539 to history. Total: 3
th(0)=-0.7630534165555941;dx=-1.1724104237822398E-6
Armijo: th(1871488.617712673)=-0.6699667984096579; dx=5.793802067175539E-8 evalInputDelta=-0.09308661814593622
New Minimum: -0.7630534165555941 > -0.8904685945304771
WOLF (strong): th(935744.3088563365)=-0.8904685945304771; dx=6.337882074384458E-8 evalInputDelta=0.127415177974883
New Minimum: -0.8904685945304771 > -0.9611776729430086
END: th(311914.76961877884)=-0.9611776729430086; dx=-2.798423040246586E-7 evalInputDelta=0.1981242563874145
Fitness changed from -0.7630534165555941 to -0.9611776729430086
Iteration 5 complete. Error: -0.9611776729430086 Total: 6.6784; Orientation: 0.5699; Line Search: 4.8174
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8f5d02a9-60ee-4d43-913e-80531073b737.jpg)
Adding measurement 4a70017a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.043e+04, gradient 9.197e-04, dot -0.266; [6034d7db-a3d4-446c-bc03-5a5e0f1e4d22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.9611776729430086, -0.5419671674253846, -0.4657988569990817, -0.42633118991403335
LBFGS Accumulation History: 3 points
Removed measurement 4a70017a to history. Total: 3
th(0)=-0.9611776729430086;dx=-8.291357039961618E-7
New Minimum: -0.9611776729430086 > -1.0576350967585415
END: th(672000.0000000002)=-1.0576350967585415; dx=-5.696708380927404E-8 evalInputDelta=0.0964574238155329
Fitness changed from -0.9611776729430086 to -1.0576350967585415
Iteration 6 complete. Error: -1.0576350967585415 Total: 4.2131; Orientation: 0.4773; Line Search: 2.4241
Adding measurement 3b18e82c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.011e+03, gradient 1.221e-03, dot -0.144; [6034d7db-a3d4-446c-bc03-5a5e0f1e4d22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.0576350967585415, -0.5419671674253846, -0.4657988569990817, -0.42633118991403335
LBFGS Accumulation History: 3 points
Removed measurement 3b18e82c to history. Total: 3
th(0)=-1.0576350967585415;dx=-1.4500807103694739E-6
Armijo: th(1447780.1117014263)=-0.8257822816398314; dx=6.772425531895759E-8 evalInputDelta=-0.23185281511871014
New Minimum: -1.0576350967585415 > -1.1036734961245038
WOLF (strong): th(723890.0558507132)=-1.1036734961245038; dx=1.1673606765951044E-7 evalInputDelta=0.046038399365962324
New Minimum: -1.1036734961245038 > -1.2396025929444727
END: th(241296.68528357105)=-1.2396025929444727; dx=-3.7392313702925583E-7 evalInputDelta=0.18196749618593122
Fitness changed from -1.0576350967585415 to -1.2396025929444727
Iteration 7 complete. Error: -1.2396025929444727 Total: 6.8963; Orientation: 0.4961; Line Search: 4.8673
Adding measurement 3748bf17 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.680e+04, gradient 9.945e-04, dot -0.219; [6034d7db-a3d4-446c-bc03-5a5e0f1e4d22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2396025929444727, -0.5419671674253846, -0.4657988569990817, -0.42633118991403335
LBFGS Accumulation History: 3 points
Removed measurement 3748bf17 to history. Total: 3
th(0)=-1.2396025929444727;dx=-9.700151652395478E-7
New Minimum: -1.2396025929444727 > -1.3441769796333067
END: th(519857.9493646314)=-1.3441769796333067; dx=-9.650445733610241E-8 evalInputDelta=0.10457438668883401
Fitness changed from -1.2396025929444727 to -1.3441769796333067
Iteration 8 complete. Error: -1.3441769796333067 Total: 4.0673; Orientation: 0.4840; Line Search: 2.4132
Adding measurement 1e166171 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.366e+04, gradient 1.258e-03, dot -0.168; [6034d7db-a3d4-446c-bc03-5a5e0f1e4d22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3441769796333067, -0.5419671674253846, -0.4657988569990817, -0.42633118991403335
LBFGS Accumulation History: 3 points

...skipping 7183 bytes...

33214.9578038597)=-1.9805224764708564; dx=2.2339521332338448E-7 evalInputDelta=0.03757864599839533
New Minimum: -1.9805224764708564 > -2.089050638133149
END: th(144404.9859346199)=-2.089050638133149; dx=-4.7220177710496733E-7 evalInputDelta=0.14610680766068773
Fitness changed from -1.942943830472461 to -2.089050638133149
Iteration 14 complete. Error: -2.089050638133149 Total: 6.4526; Orientation: 0.4713; Line Search: 4.8362
Adding measurement 2d9e1bec to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.403e+04, gradient 1.008e-03, dot 0.274; [6034d7db-a3d4-446c-bc03-5a5e0f1e4d22 = 1.000/1.000e+00]
th(0)=-2.089050638133149;dx=-3.8503227662669013
Armijo: th(311111.11111111136)=-0.28999787130128546; dx=1.061243889100576E-7 evalInputDelta=-1.7990527668318634
Armijo: th(155555.55555555568)=-0.2899480927884957; dx=2.5172802588718906E-7 evalInputDelta=-1.7991025453446532
Armijo: th(51851.85185185189)=-0.29018028113892935; dx=6.597165885326854E-7 evalInputDelta=-1.7988703569942195
Armijo: th(12962.962962962973)=-0.2905961718284407; dx=2.9815348936720863E-6 evalInputDelta=-1.7984544663047082
Armijo: th(2592.5925925925944)=-0.29097259052871627; dx=1.487518071409354E-5 evalInputDelta=-1.7980780476044327
Armijo: th(432.09876543209907)=-0.2868660525399607; dx=6.67908676766978E-5 evalInputDelta=-1.8021845855931882
Armijo: th(61.72839506172844)=-0.2738459453626692; dx=4.5581800100541616E-4 evalInputDelta=-1.8152046927704797
Armijo: th(7.716049382716055)=-0.22868071414270452; dx=0.010699603446286694 evalInputDelta=-1.8603699239904443
Armijo: th(0.8573388203017839)=-1.0990695090709282; dx=-0.026219713716900593 evalInputDelta=-0.9899811290622207
Armijo: th(0.08573388203017838)=-2.087528839754209; dx=-0.783774558566741 evalInputDelta=-0.0015217983789397316
New Minimum: -2.089050638133149 > -2.104874931020631
END: th(0.007793989275470762)=-2.104874931020631; dx=-3.349647842684022 evalInputDelta=0.015824292887482105
Fitness changed from -2.089050638133149 to -2.104874931020631
Iteration 15 complete. Error: -2.104874931020631 Total: 16.7028; Orientation: 0.4556; Line Search: 15.0728
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/0405046e-3d14-4fbd-aa9c-9f89e52f2827.jpg)
Adding measurement 3412e67e to history. Total: 4
Rejected: LBFGS Orientation magnitude: 6.057e+04, gradient 1.003e-03, dot -0.221; [6034d7db-a3d4-446c-bc03-5a5e0f1e4d22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.104874931020631, -2.089050638133149, -0.5419671674253846, -0.4657988569990817, -0.42633118991403335
Rejected: LBFGS Orientation magnitude: 7.927e+04, gradient 1.003e-03, dot -0.274; [6034d7db-a3d4-446c-bc03-5a5e0f1e4d22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.104874931020631, -2.089050638133149, -0.5419671674253846, -0.4657988569990817
LBFGS Accumulation History: 3 points
Removed measurement 3412e67e to history. Total: 4
Removed measurement 2d9e1bec to history. Total: 3
th(0)=-2.104874931020631;dx=-9.651158160441148E-7
Armijo: th(0.016791640868810676)=-2.104874931020631; dx=-9.748193901105566E-7 evalInputDelta=0.0
Armijo: th(0.008395820434405338)=-2.104874931020631; dx=-9.717904257016716E-7 evalInputDelta=0.0
Armijo: th(0.002798606811468446)=-2.104874931020631; dx=-9.839289217771229E-7 evalInputDelta=0.0
Armijo: th(6.996517028671115E-4)=-2.104874931020631; dx=-9.79949818877434E-7 evalInputDelta=0.0
WOLFE (weak): th(1.399303405734223E-4)=-2.104874931020631; dx=-9.810776135030683E-7 evalInputDelta=0.0
Armijo: th(4.1979102172026695E-4)=-2.104874931020631; dx=-9.830674560409577E-7 evalInputDelta=0.0
Armijo: th(2.798606811468446E-4)=-2.104874931020631; dx=-9.809009626019572E-7 evalInputDelta=0.0
WOLFE (weak): th(2.0989551086013345E-4)=-2.104874931020631; dx=-9.831052607465621E-7 evalInputDelta=0.0
Armijo: th(2.4487809600348904E-4)=-2.104874931020631; dx=-9.831779478109122E-7 evalInputDelta=0.0
WOLFE (weak): th(2.2738680343181125E-4)=-2.104874931020631; dx=-9.8342494492617E-7 evalInputDelta=0.0
Armijo: th(2.3613244971765015E-4)=-2.104874931020631; dx=-9.727489649226742E-7 evalInputDelta=0.0
Armijo: th(2.317596265747307E-4)=-2.104874931020631; dx=-9.776516103436413E-7 evalInputDelta=0.0
WOLFE (weak): th(2.2957321500327097E-4)=-2.104874931020631; dx=-9.83513734051307E-7 evalInputDelta=0.0
Armijo: th(2.3066642078900084E-4)=-2.104874931020631; dx=-9.759260670010118E-7 evalInputDelta=0.0
Armijo: th(2.301198178961359E-4)=-2.104874931020631; dx=-9.693747497436017E-7 evalInputDelta=0.0
WOLFE (weak): th(2.2984651644970345E-4)=-2.104874931020631; dx=-9.796357062748656E-7 evalInputDelta=0.0
WOLFE (weak): th(2.2998316717291967E-4)=-2.104874931020631; dx=-9.852762427533627E-7 evalInputDelta=0.0
WOLFE (weak): th(2.3005149253452778E-4)=-2.104874931020631; dx=-9.802653676193168E-7 evalInputDelta=0.0
Armijo: th(2.3008565521533185E-4)=-2.104874931020631; dx=-9.840931933976733E-7 evalInputDelta=0.0
WOLFE (weak): th(2.3006857387492983E-4)=-2.104874931020631; dx=-9.788814754598268E-7 evalInputDelta=0.0
Armijo: th(2.3007711454513084E-4)=-2.104874931020631; dx=-9.76916817433484E-7 evalInputDelta=0.0
Armijo: th(2.3007284421003033E-4)=-2.104874931020631; dx=-9.836510678187622E-7 evalInputDelta=0.0
Armijo: th(2.3007070904248008E-4)=-2.104874931020631; dx=-9.760386543328305E-7 evalInputDelta=0.0
mu ~= nu (2.3006857387492983E-4): th(0.0)=-2.104874931020631
Fitness changed from -2.104874931020631 to -2.104874931020631
Static Iteration Total: 33.0765; Orientation: 1.1596; Line Search: 30.6121
Iteration 16 failed. Error: -2.104874931020631
Previous Error: 0.0 -> -2.104874931020631
Retrying iteration 16
Reset training subject: 12900175102200
Adding measurement 58a18c4d to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-2.104874931020631;dx=-9.83107924955822E-7
Armijo: th(4.956700166818316E-4)=-2.1048748585730532; dx=-9.852555096592589E-7 evalInputDelta=-7.244757771474042E-8
WOLFE (weak): th(2.478350083409158E-4)=-2.104874931020631; dx=-9.888721561451223E-7 evalInputDelta=0.0
WOLFE (weak): th(3.717525125113737E-4)=-2.104874931020631; dx=-9.86706405285033E-7 evalInputDelta=0.0
Armijo: th(4.337112645966027E-4)=-2.1048748585730532; dx=-9.768799045471846E-7 evalInputDelta=-7.244757771474042E-8
WOLFE (weak): th(4.0273188855398823E-4)=-2.104874931020631; dx=-9.861077366106183E-7 evalInputDelta=0.0
WOLFE (weak): th(4.1822157657529546E-4)=-2.104874931020631; dx=-9.8361171423986E-7 evalInputDelta=0.0
Armijo: th(4.2596642058594905E-4)=-2.1048748585730532; dx=-9.791307414654949E-7 evalInputDelta=-7.244757771474042E-8
Armijo: th(4.220939985806223E-4)=-2.1048748585730532; dx=-9.850792606617905E-7 evalInputDelta=-7.244757771474042E-8
WOLFE (weak): th(4.201577875779589E-4)=-2.104874931020631; dx=-9.86137534585009E-7 evalInputDelta=0.0
Armijo: th(4.211258930792906E-4)=-2.1048748585730532; dx=-9.764479841806587E-7 evalInputDelta=-7.244757771474042E-8
Armijo: th(4.2064184032862475E-4)=-2.1048748585730532; dx=-9.878645085154328E-7 evalInputDelta=-7.244757771474042E-8
WOLFE (weak): th(4.203998139532918E-4)=-2.104874931020631; dx=-9.87420251093871E-7 evalInputDelta=0.0
WOLFE (weak): th(4.205208271409583E-4)=-2.104874931020631; dx=-9.8460815788393E-7 evalInputDelta=0.0
Armijo: th(4.205813337347915E-4)=-2.1048748585730532; dx=-9.785909751259638E-7 evalInputDelta=-7.244757771474042E-8
Armijo: th(4.205510804378749E-4)=-2.1048748585730532; dx=-9.800728091456347E-7 evalInputDelta=-7.244757771474042E-8
Armijo: th(4.2053595378941657E-4)=-2.1048748585730532; dx=-9.834481629914847E-7 evalInputDelta=-7.244757771474042E-8
Armijo: th(4.205283904651874E-4)=-2.1048748585730532; dx=-9.682480550307922E-7 evalInputDelta=-7.244757771474042E-8
Armijo: th(4.2052460880307287E-4)=-2.1048748585730532; dx=-9.87663432886682E-7 evalInputDelta=-7.244757771474042E-8
mu ~= nu (4.205208271409583E-4): th(0.0)=-2.104874931020631
Fitness changed from -2.104874931020631 to -2.104874931020631
Static Iteration Total: 26.4572; Orientation: 0.0185; Line Search: 24.0983
Iteration 17 failed. Error: -2.104874931020631
Previous Error: 0.0 -> -2.104874931020631
Optimization terminated 17
Final threshold in iteration 17: -2.104874931020631 (> -Infinity) after 175.736s (< 3600.000s)

Returns

    -2.104874931020631