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 54.38 seconds (1.575 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: 208077168081100
Reset training subject: 208078102306800
Adding measurement 7fc25642 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=10.37412122020012;dx=-1.3135758344286195E-5
New Minimum: 10.37412122020012 > 10.374101986292196
WOLFE (weak): th(2.154434690031884)=10.374101986292196; dx=-1.314671097252382E-5 evalInputDelta=1.9233907924132154E-5
New Minimum: 10.374101986292196 > 10.374085274203987
WOLFE (weak): th(4.308869380063768)=10.374085274203987; dx=-1.3140836276304561E-5 evalInputDelta=3.594599613343519E-5
New Minimum: 10.374085274203987 > 10.374014518346828
WOLFE (weak): th(12.926608140191302)=10.374014518346828; dx=-1.3147344964826835E-5 evalInputDelta=1.0670185329253457E-4
New Minimum: 10.374014518346828 > 10.373698648374367
WOLFE (weak): th(51.70643256076521)=10.373698648374367; dx=-1.313633540239686E-5 evalInputDelta=4.225718257533373E-4
New Minimum: 10.373698648374367 > 10.372009758166483
WOLFE (weak): th(258.53216280382605)=10.372009758166483; dx=-1.3126799619197939E-5 evalInputDelta=0.0021114620336373235
New Minimum: 10.372009758166483 > 10.361492093533833
WOLFE (weak): th(1551.1929768229563)=10.361492093533833; dx=-1.3068522832014913E-5 evalInputDelta=0.012629126666286794
New Minimum: 10.361492093533833 > 10.28657431117849
WOLFE (weak): th(10858.350837760694)=10.28657431117849; dx=-1.2140536873459286E-5 evalInputDelta=0.0875469090216292
New Minimum: 10.28657431117849 > 9.813644128252841
END: th(86866.80670208555)=9.813644128252841; dx=-8.427473705278754E-6 evalInputDelta=0.5604770919472788
Fitness changed from 10.37412122020012 to 9.813644128252841
Iteration 1 complete. Error: 9.813644128252841 Total: 9.4582; Orientation: 0.0166; Line Search: 7.0062
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9b3583b9-fa6b-41d9-a5de-d33063c10787.jpg)
Adding measurement 98d8732 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=9.813644128252841;dx=-1.322745896685782E-5
New Minimum: 9.813644128252841 > 8.96485978587874
END: th(187148.86177126726)=8.96485978587874; dx=-5.537450669899829E-6 evalInputDelta=0.8487843423741008
Fitness changed from 9.813644128252841 to 8.96485978587874
Iteration 2 complete. Error: 8.96485978587874 Total: 2.2928; Orientation: 0.0167; Line Search: 1.5125
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3020f4ac-ef72-48c2-baf3-4cfd89f40907.jpg)
Adding measurement 649bb6ec to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=8.96485978587874;dx=-1.7262690105643476E-5
New Minimum: 8.96485978587874 > 8.00293026931409
END: th(403200.00000000006)=8.00293026931409; dx=-2.6276106024453837E-6 evalInputDelta=0.9619295165646502
Fitness changed from 8.96485978587874 to 8.00293026931409
Iteration 3 complete. Error: 8.00293026931409 Total: 2.2352; Orientation: 0.0165; Line Search: 1.5062
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/06478161-fd3f-4724-a95e-a01ef49e9449.jpg)
Adding measurement 2364350e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.693e+03, gradient 5.579e-03, dot -0.173; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 8.00293026931409, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement 2364350e to history. Total: 3
th(0)=8.00293026931409;dx=-3.1111346192759214E-5
Armijo: th(868668.0670208557)=8.989567012024557; dx=5.537993972548137E-7 evalInputDelta=-0.9866367427104663
New Minimum: 8.00293026931409 > 7.308972911959085
END: th(434334.03351042786)=7.308972911959085; dx=-1.998809524291431E-6 evalInputDelta=0.6939573573550053
Fitness changed from 8.00293026931409 to 7.308972911959085
Iteration 4 complete. Error: 7.308972911959085 Total: 3.5585; Orientation: 0.3389; Line Search: 2.5313
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7f30dac5-3266-4b55-b39b-485c40b4b828.jpg)
Adding measurement 107518c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.142e+03, gradient 4.613e-03, dot -0.165; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7.308972911959085, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement 107518c1 to history. Total: 3
th(0)=7.308972911959085;dx=-2.1244986940549358E-5
New Minimum: 7.308972911959085 > 7.279698643503337
END: th(935744.3088563365)=7.279698643503337; dx=-1.0327608523266343E-7 evalInputDelta=0.02927426845574832
Fitness changed from 7.308972911959085 to 7.279698643503337
Iteration 5 complete. Error: 7.279698643503337 Total: 2.5258; Orientation: 0.3059; Line Search: 1.5208
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/9d615da1-267a-45d1-b19e-9a66e2e266fd.jpg)
Adding measurement 33754b77 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.814e+03, gradient 4.604e-03, dot -0.127; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7.279698643503337, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement 33754b77 to history. Total: 3
th(0)=7.279698643503337;dx=-2.1196133559442414E-5
Armijo: th(2016000.0000000007)=11.044891575842447; dx=2.4476270665324413E-6 evalInputDelta=-3.7651929323391107
New Minimum: 7.279698643503337 > 5.646223769316546
END: th(1008000.0000000003)=5.646223769316546; dx=-1.5616743508429967E-7 evalInputDelta=1.633474874186791
Fitness changed from 7.279698643503337 to 5.646223769316546
Iteration 6 complete. Error: 5.646223769316546 Total: 3.2795; Orientation: 0.3226; Line Search: 2.2613
Adding measurement 132ebc58 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.773e+03, gradient 4.082e-03, dot -0.131; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 5.646223769316546, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement 132ebc58 to history. Total: 3
th(0)=5.646223769316546;dx=-1.664757596059303E-5
Armijo: th(2171670.1675521396)=10.340106104050278; dx=2.3162072187169563E-6 evalInputDelta=-4.693882334733733
New Minimum: 5.646223769316546 > 3.7900453265664957
END: th(1085835.0837760698)=3.7900453265664957; dx=-6.302796215148888E-7 evalInputDelta=1.8561784427500498
Fitness changed from 5.646223769316546 to 3.7900453265664957
Iteration 7 complete. Error: 3.7900453265664957 Total: 3.4682; Orientation: 0.3222; Line Search: 2.4226
Adding measurement 1926d98d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.907e+03, gradient 4.220e-03, dot -0.122; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.7900453265664957, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement 1926d98d to history. Total: 3
th(0)=3.7900453265664957;dx=-1.778458942753603E-5
Armijo: th(2339360.7721408415)=10.565845342514203; dx=2.987769917693946E-6 evalInputDelta=-6.775800015947707
New Minimum: 3.7900453265664957 > 2.404049996942174
END: th(1169680.3860704207)=2.404049996942174; dx=-8.682696520518586E-8 evalInputDelta=1.385995329624322
Fitness changed from 3.7900453265664957 to 2.404049996942174
Iteration 8 complete. Error: 2.404049996942174 Total: 3.3651; Orientation: 0.2957; Line Search: 2.3605
Adding measurement 702a025e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.099e+03, gradient 4.248e-03, dot -0.112; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.404049996942174, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement 702a025e to history. Total: 3
th(0)=2.404049996942174;dx=-1.802980501005438E-5
Armijo: th(2520000.000000001)=10.751572269719274; dx=3.528857364813166E-6 evalInputDelta=-8.3475222727771
New Minimum: 2.404049996942174 > 1.224604258261314
WOLF (strong): th(1260000.0000000005)=1.224604258261314; dx=3.8445922195203583E-7 evalInputDelta=1.17944573868086
New Minimum: 1.224604258261314 > -1.2148363385657426
END: th(420000.0000000002)=-1.2148363385657426; dx=-8.402110152489664E-6 evalInputDelta=3.6188863355079164
Fitness changed from 2.404049996942174 to -1.2148363385657426
Iteration 9 complete. Error: -1.2148363385657426 Total: 4.2724; Orientation: 0.3319; Line Search: 3.2005
Adding measurement 1a9b691b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.514e+03, gradient 3.773e-03, dot -0.109; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2148363385657426, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement 1a9b691b to history. Total: 3
th(0)=-1.2148363385657426;dx=-1.4220845171460503E-5
New Minimum: -1.2148363385657426 > -3.030135940148668
END: th(904862.5698133915)=-3.030135940148668; dx=-2.464754507243992E-6 evalInputDelta=1.8152996015829252
Fitness changed from -1.2148363385657426 to -3.030135940148668
Iteration 10 complete. Error: -3.030135940148668 Total: 2.4185; Orientation: 0.2963; Line Search: 1.4655
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3d823baf-688d-45a8-8b0d-bdbf847f6e02.jpg)
Adding measurement 19f359d5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.773e+03, gradient 4.422e-03, dot -0.093; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.030135940148668, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement 19f359d5 to history. Total: 3
th(0)=-3.030135940148668;dx=-1.9540829078226624E-5
Armijo: th(1949467.3101173681)=5.23843217393264; dx=3.358801346025543E-6 evalInputDelta=-8.268568114081308
Armijo: th(974733.6550586841)=-2.9665639851262817; dx=3.1135292698701596E-7 evalInputDelta=-0.0635719550223861
New Minimum: -3.030135940148668 > -5.46677530427003
END: th(324911.2183528947)=-5.46677530427003; dx=-8.12917710250851E-6 evalInputDelta=2.436639364121362
Fitness changed from -3.030135940148668 to -5.46677530427003
Iteration 11 complete. Error: -5.46677530427003 Total: 4.3244; Orientation: 0.3171; Line Search: 3.3024
Adding measurement 420a12bf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.479e+04, gradient 3.651e-03, dot -0.128; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.46677530427003, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement 420a12bf to history. Total: 3
th(0)=-5.46677530427003;dx=-1.3275393856668881E-5
New Minimum: -5.46677530427003 > -6.793276472062352
END: th(700000.0000000005)=-6.793276472062352; dx=-3.4682042641782288E-6 evalInputDelta=1.3265011677923226
Fitness changed from -5.46677530427003 to -6.793276472062352
Iteration 12 complete. Error: -6.793276472062352 Total: 2.5742; Orientation: 0.3123; Line Search: 1.5600
Adding measurement 4f55e02c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.797e+04, gradient 4.121e-03, dot -0.116; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.793276472062352, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement 4f55e02c to history. Total: 3
th(0)=-6.793276472062352;dx=-1.6965838702437308E-5
Armijo: th(1508104.2830223197)=-1.1242004857159245; dx=2.248469156097606E-6 evalInputDelta=-5.669075986346428
New Minimum: -6.793276472062352 > -7.085900806693758
END: th(754052.1415111598)=-7.085900806693758; dx=-1.0465765215778428E-6 evalInputDelta=0.29262433463140525
Fitness changed from -6.793276472062352 to -7.085900806693758
Iteration 13 complete. Error: -7.085900806693758 Total: 3.4843; Orientation: 0.3086; Line Search: 2.4693
Adding measurement b09615c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.513e+04, gradient 4.562e-03, dot -0.094; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.085900806693758, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement b09615c to history. Total: 3
th(0)=-7.085900806693758;dx=-2.0799247519315565E-5
Armijo: th(1624556.0917644738)=1.6669541322802708; dx=3.836567993629898E-6 evalInputDelta=-8.752854938974028
Armijo: th(812278.0458822369)=-6.578629093674792; dx=9.486613631822278E-7 evalInputDelta=-0.5072717130189659
New Minimum: -7.085900806693758 > -9.174459035837604
END: th(270759.3486274123)=-9.174459035837604; dx=-8.775116867989885E-6 evalInputDelta=2.088558229143846
Fitness changed from -7.085900806693758 to -9.174459035837604
Iteration 14 complete. Error: -9.174459035837604 Total: 4.1230; Orientation: 0.2952; Line Search: 3.0594
Adding measurement 5b34775 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.072e+04, gradient 3.659e-03, dot -0.136; [1e93af2a-38d0-4920-8b1a-0ea6e8d3b363 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.174459035837604, 8.96485978587874, 9.813644128252841, 10.37412122020012
LBFGS Accumulation History: 3 points
Removed measurement 5b34775 to history. Total: 3
th(0)=-9.174459035837604;dx=-1.334467274886717E-5
New Minimum: -9.174459035837604 > -10.239076874254831
END: th(583333.3333333337)=-10.239076874254831; dx=-4.027937739518141E-6 evalInputDelta=1.0646178384172273
Fitness changed from -9.174459035837604 to -10.239076874254831
Iteration 15 complete. Error: -10.239076874254831 Total: 2.9808; Orientation: 0.3072; Line Search: 1.9254
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/8f81c796-c96f-4b5b-b396-c40484abb13a.jpg)
Final threshold in iteration 16: -10.239076874254831 (> -Infinity) after 54.382s (< 5400.000s)

Returns

    -10.239076874254831