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

Iteration 20 Iteration 20

Iteration 25 Iteration 25

Iteration 30 Iteration 30

BasicOptimizer.scala:89 executed in 362.46 seconds (3.521 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: 9921459483869
Reset training subject: 9923255993157
Adding measurement 68326d43 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.4594102809069718;dx=-1.4939580371847334E-5
New Minimum: -0.4594102809069718 > -0.45944686974171123
WOLFE (weak): th(2.154434690031884)=-0.45944686974171123; dx=-1.4993895941434903E-5 evalInputDelta=3.6588834739448295E-5
New Minimum: -0.45944686974171123 > -0.4594837672851188
WOLFE (weak): th(4.308869380063768)=-0.4594837672851188; dx=-1.5164457742643173E-5 evalInputDelta=7.348637814702519E-5
New Minimum: -0.4594837672851188 > -0.4596311097732121
WOLFE (weak): th(12.926608140191302)=-0.4596311097732121; dx=-1.5348835742354688E-5 evalInputDelta=2.2082886624030795E-4
New Minimum: -0.4596311097732121 > -0.4602925874176002
WOLFE (weak): th(51.70643256076521)=-0.4602925874176002; dx=-1.5065849841166454E-5 evalInputDelta=8.823065106284278E-4
New Minimum: -0.4602925874176002 > -0.4638679112031844
WOLFE (weak): th(258.53216280382605)=-0.4638679112031844; dx=-1.513215951178447E-5 evalInputDelta=0.0044576302962126
New Minimum: -0.4638679112031844 > -0.48670700865757016
WOLFE (weak): th(1551.1929768229563)=-0.48670700865757016; dx=-1.5292573942110094E-5 evalInputDelta=0.027296727750598382
New Minimum: -0.48670700865757016 > -0.7067860621606642
WOLFE (weak): th(10858.350837760694)=-0.7067860621606642; dx=-2.0667118706832298E-5 evalInputDelta=0.24737578125369242
New Minimum: -0.7067860621606642 > -1.1266281485341378
WOLF (strong): th(86866.80670208555)=-1.1266281485341378; dx=8.80811635435486E-7 evalInputDelta=0.6672178676271661
New Minimum: -1.1266281485341378 > -1.1938016133644043
END: th(48862.57876992312)=-1.1938016133644043; dx=-3.4996574354031407E-6 evalInputDelta=0.7343913324574325
Fitness changed from -0.4594102809069718 to -1.1938016133644043
Iteration 1 complete. Error: -1.1938016133644043 Total: 20.0346; Orientation: 0.3303; Line Search: 15.0009
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/dd1bc669-670d-48d8-8071-cd94817a5649.jpg)
Adding measurement 2ff89607 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1.1938016133644043;dx=-6.300744532612454E-5
Armijo: th(105271.23474633782)=-0.9742121272633979; dx=2.623522849587204E-6 evalInputDelta=-0.21958948610100637
New Minimum: -1.1938016133644043 > -1.518346219570766
WOLF (strong): th(52635.61737316891)=-1.518346219570766; dx=1.7543396431005422E-6 evalInputDelta=0.3245446062063617
New Minimum: -1.518346219570766 > -1.8344699923637278
END: th(17545.205791056305)=-1.8344699923637278; dx=-1.062623310277851E-5 evalInputDelta=0.6406683789993235
Fitness changed from -1.1938016133644043 to -1.8344699923637278
Iteration 2 complete. Error: -1.8344699923637278 Total: 7.3056; Orientation: 0.0213; Line Search: 5.7589
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/4abd55e5-3279-45cf-8b77-918873444894.jpg)
Adding measurement 23913cb to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.8344699923637278;dx=-1.0299841970465802E-4
Armijo: th(37800.00000000001)=-1.6984449965553643; dx=5.941388628217527E-6 evalInputDelta=-0.13602499580836347
New Minimum: -1.8344699923637278 > -2.1974218891460926
WOLF (strong): th(18900.000000000004)=-2.1974218891460926; dx=1.2878449955135369E-5 evalInputDelta=0.36295189678236484
New Minimum: -2.1974218891460926 > -2.323294721261775
END: th(6300.000000000001)=-2.323294721261775; dx=-4.154190410879315E-5 evalInputDelta=0.4888247288980472
Fitness changed from -1.8344699923637278 to -2.323294721261775
Iteration 3 complete. Error: -2.323294721261775 Total: 7.2153; Orientation: 0.0185; Line Search: 5.6879
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ec21be52-aec4-4bb0-a850-bf568eca5865.jpg)
Adding measurement 3326d317 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.161e+03, gradient 1.052e-02, dot -0.317; [94b5fd58-8aac-479e-a233-6ddef0fea406 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.323294721261775, -1.8344699923637278, -1.1938016133644043, -0.4594102809069718
LBFGS Accumulation History: 3 points
Removed measurement 3326d317 to history. Total: 3
th(0)=-2.323294721261775;dx=-1.0928711748632797E-4
New Minimum: -2.323294721261775 > -3.1639719146688083
END: th(13572.93854720087)=-3.1639719146688083; dx=-2.0872728521353418E-5 evalInputDelta=0.8406771934070334
Fitness changed from -2.323294721261775 to -3.1639719146688083
Iteration 4 complete. Error: -3.1639719146688083 Total: 4.9231; Orientation: 0.5572; Line Search: 2.8200
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/678d2fdc-299f-4a2a-8892-b020ec40c832.jpg)
Adding measurement 30b5e235 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.588e+03, gradient 1.391e-02, dot -0.182; [94b5fd58-8aac-479e-a233-6ddef0fea406 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.1639719146688083, -1.8344699923637278, -1.1938016133644043, -0.4594102809069718
LBFGS Accumulation History: 3 points
Removed measurement 30b5e235 to history. Total: 3
th(0)=-3.1639719146688083;dx=-1.8988699700378886E-4
New Minimum: -3.1639719146688083 > -3.3992177331427635
END: th(29242.009651760516)=-3.3992177331427635; dx=-2.3376085868149917E-6 evalInputDelta=0.2352458184739552
Fitness changed from -3.1639719146688083 to -3.3992177331427635
Iteration 5 complete. Error: -3.3992177331427635 Total: 4.8323; Orientation: 0.5187; Line Search: 2.8075
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/307cc462-4bba-4af1-acec-b1ba5e54659d.jpg)
Adding measurement 78a445bd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.991e+03, gradient 1.847e-02, dot -0.155; [94b5fd58-8aac-479e-a233-6ddef0fea406 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.3992177331427635, -1.8344699923637278, -1.1938016133644043, -0.4594102809069718
LBFGS Accumulation History: 3 points
Removed measurement 78a445bd to history. Total: 3
th(0)=-3.3992177331427635;dx=-3.319513429951303E-4
New Minimum: -3.3992177331427635 > -3.6082290893486957
WOLF (strong): th(63000.00000000002)=-3.6082290893486957; dx=1.4272506072601107E-5 evalInputDelta=0.20901135620593214
New Minimum: -3.6082290893486957 > -4.985604168099504
WOLF (strong): th(31500.00000000001)=-4.985604168099504; dx=1.5580039186454886E-5 evalInputDelta=1.58638643495674
New Minimum: -4.985604168099504 > -5.451644839912229
END: th(10500.000000000004)=-5.451644839912229; dx=-5.1279951821099586E-5 evalInputDelta=2.052427106769465
Fitness changed from -3.3992177331427635 to -5.451644839912229
Iteration 6 complete. Error: -5.451644839912229 Total: 7.7063; Orientation: 0.4916; Line Search: 5.6788
Adding measurement 773e6c01 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.023e+03, gradient 2.108e-02, dot -0.085; [94b5fd58-8aac-479e-a233-6ddef0fea406 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.451644839912229, -1.8344699923637278, -1.1938016133644043, -0.4594102809069718
LBFGS Accumulation History: 3 points
Removed measurement 773e6c01 to history. Total: 3
th(0)=-5.451644839912229;dx=-4.322571138033822E-4
Armijo: th(22621.564245334786)=-5.368734459699814; dx=3.1527605182933977E-5 evalInputDelta=-0.08291038021241448
New Minimum: -5.451644839912229 > -6.623311352631495
WOLF (strong): th(11310.782122667393)=-6.623311352631495; dx=3.066000760066696E-5 evalInputDelta=1.1716665127192663
New Minimum: -6.623311352631495 > -6.636435964572274
END: th(3770.2607075557976)=-6.636435964572274; dx=-1.2375347839696564E-4 evalInputDelta=1.1847911246600455
Fitness changed from -5.451644839912229 to -6.636435964572274
Iteration 7 complete. Error: -6.636435964572274 Total: 8.3037; Orientation: 0.5220; Line Search: 6.4227
Adding measurement 63947cec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.346e+06, gradient 1.846e-02, dot -0.170; [94b5fd58-8aac-479e-a233-6ddef0fea406 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.636435964572274, -1.8344699923637278, -1.1938016133644043, -0.4594102809069718
LBFGS Accumulation History: 3 points
Removed measurement 63947cec to history. 

...skipping 23711 bytes...

1; Orientation: 1.5922; Line Search: 27.3449
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/2bdaba39-f258-428d-9acf-74eae2989ae0.jpg)
Adding measurement 6bffd9a to history. Total: 14
Accepted: LBFGS Orientation magnitude: 1.460e+05, gradient 2.206e-02, dot 0.407; [94b5fd58-8aac-479e-a233-6ddef0fea406 = 1.000/1.000e+00]
th(0)=-43.0734817618843;dx=-1276.5312090867092
New Minimum: -43.0734817618843 > -43.07348312348088
WOLFE (weak): th(6.369900554203615E-9)=-43.07348312348088; dx=-1306.826196654316 evalInputDelta=1.361596574156465E-6
New Minimum: -43.07348312348088 > -43.07349265465564
WOLFE (weak): th(1.273980110840723E-8)=-43.07349265465564; dx=-1305.3871905240744 evalInputDelta=1.0892771335591078E-5
New Minimum: -43.07349265465564 > -43.07350763221173
WOLFE (weak): th(3.821940332522169E-8)=-43.07350763221173; dx=-1306.6994098142368 evalInputDelta=2.587032742695783E-5
New Minimum: -43.07350763221173 > -43.07360158221749
WOLFE (weak): th(1.5287761330088675E-7)=-43.07360158221749; dx=-1306.204440707014 evalInputDelta=1.1982033318957974E-4
New Minimum: -43.07360158221749 > -43.07408630652742
WOLFE (weak): th(7.643880665044337E-7)=-43.07408630652742; dx=-1307.1969419447173 evalInputDelta=6.045446431173218E-4
New Minimum: -43.07408630652742 > -43.07717969948294
WOLFE (weak): th(4.586328399026602E-6)=-43.07717969948294; dx=-1301.0434344996563 evalInputDelta=0.0036979375986376795
New Minimum: -43.07717969948294 > -43.09926948981797
WOLFE (weak): th(3.2104298793186214E-5)=-43.09926948981797; dx=-1298.1433138452962 evalInputDelta=0.025787727933668236
New Minimum: -43.09926948981797 > -43.27478229452257
WOLFE (weak): th(2.568343903454897E-4)=-43.27478229452257; dx=-1252.1217451589705 evalInputDelta=0.20130053263827108
New Minimum: -43.27478229452257 > -44.600910020658795
END: th(0.002311509513109407)=-44.600910020658795; dx=-1039.7935854814946 evalInputDelta=1.527428258774492
Fitness changed from -43.0734817618843 to -44.600910020658795
Iteration 31 complete. Error: -44.600910020658795 Total: 17.6329; Orientation: 1.8244; Line Search: 14.2809
Adding measurement 7e726c47 to history. Total: 15
Accepted: LBFGS Orientation magnitude: 1.157e+05, gradient 2.071e-02, dot 0.345; [94b5fd58-8aac-479e-a233-6ddef0fea406 = 1.000/1.000e+00]
th(0)=-44.600910020658795;dx=-829.4500230748085
New Minimum: -44.600910020658795 > -46.02948352866996
END: th(0.004979996281381616)=-46.02948352866996; dx=-549.3514503309459 evalInputDelta=1.4285735080111621
Fitness changed from -44.600910020658795 to -46.02948352866996
Iteration 32 complete. Error: -46.02948352866996 Total: 5.9901; Orientation: 1.7761; Line Search: 2.8743
Adding measurement 3260706 to history. Total: 16
Accepted: LBFGS Orientation magnitude: 7.783e+04, gradient 2.093e-02, dot 0.234; [94b5fd58-8aac-479e-a233-6ddef0fea406 = 1.000/1.000e+00]
th(0)=-46.02948352866996;dx=-380.3945972210693
Armijo: th(0.010729076744838337)=-45.649722191669404; dx=-196.5159379754146 evalInputDelta=-0.37976133700055215
New Minimum: -46.02948352866996 > -46.21970663364917
END: th(0.005364538372419169)=-46.21970663364917; dx=-274.7065733453161 evalInputDelta=0.1902231049792107
Fitness changed from -46.02948352866996 to -46.21970663364917
Iteration 33 complete. Error: -46.21970663364917 Total: 7.5916; Orientation: 1.9859; Line Search: 4.2376
Adding measurement 1cfd0def to history. Total: 17
Accepted: LBFGS Orientation magnitude: 5.695e+04, gradient 2.296e-02, dot 0.161; [94b5fd58-8aac-479e-a233-6ddef0fea406 = 1.000/1.000e+00]
th(0)=-46.21970663364917;dx=-211.47305416569066
Armijo: th(0.011557547565547038)=-45.08957813436997; dx=-121.36578312575784 evalInputDelta=-1.130128499279195
Armijo: th(0.005778773782773519)=-45.82930403000047; dx=-161.9006497462574 evalInputDelta=-0.3904026036486954
Armijo: th(0.001926257927591173)=-46.14501145453838; dx=-186.0556196671399 evalInputDelta=-0.07469517911079038
Armijo: th(4.8156448189779323E-4)=-46.20890439874375; dx=-198.4137659315296 evalInputDelta=-0.010802234905419539
Armijo: th(9.631289637955864E-5)=-46.217808303431006; dx=-205.77236306455603 evalInputDelta=-0.001898330218160993
Armijo: th(1.6052149396593107E-5)=-46.2194020939452; dx=-205.50774504834845 evalInputDelta=-3.045397039684872E-4
Armijo: th(2.293164199513301E-6)=-46.21965841499641; dx=-205.58902906405768 evalInputDelta=-4.821865275772552E-5
Armijo: th(2.866455249391626E-7)=-46.219699020181025; dx=-205.1883938644633 evalInputDelta=-7.613468142153579E-6
Armijo: th(3.184950277101807E-8)=-46.21970409582659; dx=-204.75366772279142 evalInputDelta=-2.5378225743111216E-6
Armijo: th(3.184950277101807E-9)=-46.21970155800388; dx=-204.57476016178396 evalInputDelta=-5.07564529073079E-6
Armijo: th(2.8954093428198246E-10)=-46.21970663364917; dx=-204.30519023076374 evalInputDelta=0.0
MIN ALPHA (2.4128411190165206E-11): th(0.0)=-46.21970663364917
Fitness changed from -46.21970663364917 to -46.21970663364917
Static Iteration Total: 22.5273; Orientation: 2.0130; Line Search: 18.6299
Iteration 34 failed. Error: -46.21970663364917
Previous Error: 0.0 -> -46.21970663364917
Retrying iteration 34
Reset training subject: 10241761151135
Adding measurement 3ebe83f6 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-46.21970663364917;dx=-5.109863337987447E-4
WOLFE (weak): th(2.1544346900318838E-10)=-46.21970663364917; dx=-5.084506057190206E-4 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-46.21970663364917; dx=-5.090621061467377E-4 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-46.21970663364917; dx=-5.081955287125431E-4 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-46.21970663364917; dx=-5.07445147480673E-4 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-46.21970663364917; dx=-5.080846042162787E-4 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-46.21970663364917; dx=-5.090918419203398E-4 evalInputDelta=0.0
WOLFE (weak): th(1.0858350837760695E-6)=-46.21970663364917; dx=-5.094786127841059E-4 evalInputDelta=0.0
Armijo: th(8.686680670208556E-6)=-46.21970663364917; dx=-5.087532883658891E-4 evalInputDelta=0.0
WOLFE (weak): th(4.886257876992313E-6)=-46.21970663364917; dx=-5.078844672630311E-4 evalInputDelta=0.0
WOLFE (weak): th(6.7864692736004345E-6)=-46.21970663364917; dx=-5.096252978795745E-4 evalInputDelta=0.0
Armijo: th(7.736574971904495E-6)=-46.21970663364917; dx=-5.087389302617467E-4 evalInputDelta=0.0
Armijo: th(7.2615221227524645E-6)=-46.21970663364917; dx=-5.077807595946861E-4 evalInputDelta=0.0
Armijo: th(7.02399569817645E-6)=-46.21970663364917; dx=-5.09047971151898E-4 evalInputDelta=0.0
WOLFE (weak): th(6.905232485888442E-6)=-46.21970663364917; dx=-5.09414652901722E-4 evalInputDelta=0.0
Armijo: th(6.9646140920324465E-6)=-46.21970663364917; dx=-5.088200128658229E-4 evalInputDelta=0.0
WOLFE (weak): th(6.934923288960445E-6)=-46.21970663364917; dx=-5.090379751830815E-4 evalInputDelta=0.0
WOLFE (weak): th(6.949768690496446E-6)=-46.21970663364917; dx=-5.08583975597412E-4 evalInputDelta=0.0
Armijo: th(6.957191391264446E-6)=-46.21970663364917; dx=-5.087191027865939E-4 evalInputDelta=0.0
Armijo: th(6.953480040880446E-6)=-46.21970663364917; dx=-5.09353911346307E-4 evalInputDelta=0.0
WOLFE (weak): th(6.951624365688445E-6)=-46.21970663364917; dx=-5.09213626343319E-4 evalInputDelta=0.0
WOLFE (weak): th(6.952552203284445E-6)=-46.21970663364917; dx=-5.098267300575382E-4 evalInputDelta=0.0
Armijo: th(6.953016122082445E-6)=-46.21970663364917; dx=-5.058534702241119E-4 evalInputDelta=0.0
Armijo: th(6.952784162683445E-6)=-46.21970663364917; dx=-5.090831000891026E-4 evalInputDelta=0.0
Armijo: th(6.952668182983945E-6)=-46.21970663364917; dx=-5.092653599110515E-4 evalInputDelta=0.0
WOLFE (weak): th(6.952610193134196E-6)=-46.21970663364917; dx=-5.08037026425646E-4 evalInputDelta=0.0
mu ~= nu (6.952610193134196E-6): th(0.0)=-46.21970663364917
Fitness changed from -46.21970663364917 to -46.21970663364917
Static Iteration Total: 42.1410; Orientation: 0.0173; Line Search: 39.3906
Iteration 35 failed. Error: -46.21970663364917
Previous Error: 0.0 -> -46.21970663364917
Optimization terminated 35
Final threshold in iteration 35: -46.21970663364917 (> -Infinity) after 362.444s (< 3600.000s)

Returns

    -46.21970663364917