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 7.52 seconds (0.000 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: 143671206909600
Reset training subject: 143671336330000
Adding measurement f6167ed to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1.1023885267628142;dx=-7.796068990808803E-5
New Minimum: -1.1023885267628142 > -1.1025582979190334
WOLFE (weak): th(2.154434690031884)=-1.1025582979190334; dx=-7.767111323475275E-5 evalInputDelta=1.6977115621918948E-4
New Minimum: -1.1025582979190334 > -1.1027283594052735
WOLFE (weak): th(4.308869380063768)=-1.1027283594052735; dx=-7.818380861605064E-5 evalInputDelta=3.3983264245929234E-4
New Minimum: -1.1027283594052735 > -1.1034092920611431
WOLFE (weak): th(12.926608140191302)=-1.1034092920611431; dx=-7.828007140289133E-5 evalInputDelta=0.0010207652983289517
New Minimum: -1.1034092920611431 > -1.1064800254512732
WOLFE (weak): th(51.70643256076521)=-1.1064800254512732; dx=-7.768094816809273E-5 evalInputDelta=0.004091498688459039
New Minimum: -1.1064800254512732 > -1.1230103584460145
WOLFE (weak): th(258.53216280382605)=-1.1230103584460145; dx=-7.863080765753769E-5 evalInputDelta=0.02062183168320031
New Minimum: -1.1230103584460145 > -1.2267085372147812
WOLFE (weak): th(1551.1929768229563)=-1.2267085372147812; dx=-7.713626663404E-5 evalInputDelta=0.12432001045196706
New Minimum: -1.2267085372147812 > -1.693960133413962
END: th(10858.350837760694)=-1.693960133413962; dx=-4.5994894561164124E-5 evalInputDelta=0.5915716066511478
Fitness changed from -1.1023885267628142 to -1.693960133413962
Iteration 1 complete. Error: -1.693960133413962 Total: 1.2719; Orientation: 0.0015; Line Search: 0.9202
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3840b580-68ff-47db-b768-2148b5a68a6a.jpg)
Adding measurement 446a705d to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1.693960133413962;dx=-8.902993507979446E-5
New Minimum: -1.693960133413962 > -2.6517367830330603
END: th(23393.607721408407)=-2.6517367830330603; dx=-3.535364854544554E-5 evalInputDelta=0.9577766496190983
Fitness changed from -1.693960133413962 to -2.6517367830330603
Iteration 2 complete. Error: -2.6517367830330603 Total: 0.3504; Orientation: 0.0015; Line Search: 0.2280
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/03cb72ae-29fd-49e4-9ddf-99c00ed523dc.jpg)
Adding measurement 64b94572 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-2.6517367830330603;dx=-1.1026782401336288E-4
New Minimum: -2.6517367830330603 > -3.952865233450706
END: th(50400.00000000001)=-3.952865233450706; dx=-1.155384009376941E-5 evalInputDelta=1.3011284504176457
Fitness changed from -2.6517367830330603 to -3.952865233450706
Iteration 3 complete. Error: -3.952865233450706 Total: 0.3500; Orientation: 0.0017; Line Search: 0.2274
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e626e8dc-1aa0-4ebb-89d8-c7965852b7cf.jpg)
Adding measurement 78dcf24d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.522e+03, gradient 8.551e-03, dot -0.270; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.952865233450706, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 78dcf24d to history. Total: 3
th(0)=-3.952865233450706;dx=-7.1329473633413E-5
New Minimum: -3.952865233450706 > -6.075944561286862
END: th(108583.50837760697)=-6.075944561286862; dx=-5.433268424231329E-6 evalInputDelta=2.123079327836156
Fitness changed from -3.952865233450706 to -6.075944561286862
Iteration 4 complete. Error: -6.075944561286862 Total: 0.3789; Orientation: 0.0284; Line Search: 0.2303
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a9b05d2c-b753-47dd-9f2b-780e4acd3edd.jpg)
Adding measurement 51efca9a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.353e+03, gradient 8.075e-03, dot -0.316; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.075944561286862, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 51efca9a to history. Total: 3
th(0)=-6.075944561286862;dx=-6.454350172294072E-5
New Minimum: -6.075944561286862 > -9.797936692099508
END: th(233936.07721408413)=-9.797936692099508; dx=-1.5752146534414379E-6 evalInputDelta=3.7219921308126462
Fitness changed from -6.075944561286862 to -9.797936692099508
Iteration 5 complete. Error: -9.797936692099508 Total: 0.3829; Orientation: 0.0302; Line Search: 0.2333
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/fcccc53b-5011-4e4d-80f8-0cb488f6383c.jpg)
Adding measurement 3e2e71e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.919e+03, gradient 7.929e-03, dot -0.238; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.797936692099508, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 3e2e71e4 to history. Total: 3
th(0)=-9.797936692099508;dx=-6.236817012897927E-5
Armijo: th(504000.0000000002)=-9.614486033354108; dx=6.378359301030703E-7 evalInputDelta=-0.18345065874540012
New Minimum: -9.797936692099508 > -13.584565847646614
END: th(252000.0000000001)=-13.584565847646614; dx=-3.8060232315052767E-7 evalInputDelta=3.7866291555471054
Fitness changed from -9.797936692099508 to -13.584565847646614
Iteration 6 complete. Error: -13.584565847646614 Total: 0.5033; Orientation: 0.0299; Line Search: 0.3457
Adding measurement 5031a213 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.968e+03, gradient 6.866e-03, dot -0.270; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.584565847646614, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 5031a213 to history. Total: 3
th(0)=-13.584565847646614;dx=-4.564578730250283E-5
New Minimum: -13.584565847646614 > -13.625866735351577
WOLF (strong): th(542917.5418880349)=-13.625866735351577; dx=2.6095257263747203E-6 evalInputDelta=0.04130088770496343
New Minimum: -13.625866735351577 > -19.290104024791955
END: th(271458.77094401745)=-19.290104024791955; dx=-4.747676002923931E-7 evalInputDelta=5.705538177145341
Fitness changed from -13.584565847646614 to -19.290104024791955
Iteration 7 complete. Error: -19.290104024791955 Total: 0.4820; Orientation: 0.0278; Line Search: 0.3416
Adding measurement 2ff33634 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.445e+03, gradient 7.665e-03, dot -0.310; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.290104024791955, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 2ff33634 to history. Total: 3
th(0)=-19.290104024791955;dx=-5.752645901327569E-5
Armijo: th(584840.1930352104)=-15.702889322299622; dx=8.679879574524409E-6 evalInputDelta=-3.587214702492332
New Minimum: -19.290104024791955 > -22.967188655927725
WOLF (strong): th(292420.0965176052)=-22.967188655927725; dx=6.730020907812912E-6 evalInputDelta=3.67708463113577
New Minimum: -22.967188655927725 > -24.625869158781867
END: th(97473.3655058684)=-24.625869158781867; dx=-1.612254370191112E-5 evalInputDelta=5.335765133989913
Fitness changed from -19.290104024791955 to -24.625869158781867
Iteration 8 complete. Error: -24.625869158781867 Total: 0.5958; Orientation: 0.0277; Line Search: 0.4562
Adding measurement 78fb26f2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.093e+04, gradient 5.993e-03, dot -0.429; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.625869158781867, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 78fb26f2 to history. Total: 3
th(0)=-24.625869158781867;dx=-3.459912067526229E-5
New Minimum: -24.625869158781867 > -27.9761336385034
END: th(210000.0000000001)=-27.9761336385034; dx=-8.417085896117939E-6 evalInputDelta=3.350264479721531
Fitness changed from -24.625869158781867 to -27.9761336385034
Iteration 9 complete. Error: -27.9761336385034 Total: 0.3643; Orientation: 0.0269; Line Search: 0.2261
Adding measurement 569d6e1a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.056e+04, gradient 6.958e-03, dot -0.428; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -27.9761336385034, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 569d6e1a to history. Total: 3
th(0)=-27.9761336385034;dx=-4.6437108003811985E-5
Armijo: th(452431.2849066958)=-26.247178718051515; dx=3.877225857916794E-6 evalInputDelta=-1.7289549204518835
New Minimum: -27.9761336385034 > -30.11013867583665
WOLF (strong): th(226215.6424533479)=-30.11013867583665; dx=3.919608108855239E-6 evalInputDelta=2.134005037333253
New Minimum: -30.11013867583665 > -31.16837877766812
END: th(75405.21415111596)=-31.16837877766812; dx=-1.4817010933709979E-5 evalInputDelta=3.192245139164722
Fitness changed from -27.9761336385034 to -31.16837877766812
Iteration 10 complete. Error: -31.16837877766812 Total: 0.5979; Orientation: 0.0304; Line Search: 0.4569
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e4cf6812-c33d-4fda-9c64-520969f72c30.jpg)
Adding measurement 3b184b95 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.782e+04, gradient 5.340e-03, dot -0.519; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -31.16837877766812, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 3b184b95 to history. Total: 3
th(0)=-31.16837877766812;dx=-2.706242225009554E-5
New Minimum: -31.16837877766812 > -33.28091338430924
END: th(162455.60917644732)=-33.28091338430924; dx=-1.2693056732898858E-5 evalInputDelta=2.112534606641116
Fitness changed from -31.16837877766812 to -33.28091338430924
Iteration 11 complete. Error: -33.28091338430924 Total: 0.3783; Orientation: 0.0273; Line Search: 0.2287
Adding measurement 26add530 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.928e+04, gradient 5.839e-03, dot -0.520; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.28091338430924, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 26add530 to history. Total: 3
th(0)=-33.28091338430924;dx=-3.2719747608948655E-5
New Minimum: -33.28091338430924 > -34.00940375133377
WOLF (strong): th(350000.0000000002)=-34.00940375133377; dx=5.275024914442396E-7 evalInputDelta=0.7284903670245342
New Minimum: -34.00940375133377 > -35.362042892274495
END: th(175000.0000000001)=-35.362042892274495; dx=-5.325018031918004E-6 evalInputDelta=2.081129507965258
Fitness changed from -33.28091338430924 to -35.362042892274495
Iteration 12 complete. Error: -35.362042892274495 Total: 0.4867; Orientation: 0.0287; Line Search: 0.3473
Adding measurement 68b514b3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.095e+04, gradient 6.610e-03, dot -0.404; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -35.362042892274495, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 68b514b3 to history. Total: 3
th(0)=-35.362042892274495;dx=-4.243702885022003E-5
Armijo: th(377026.07075557986)=-28.548836203862464; dx=7.115705980121475E-6 evalInputDelta=-6.813206688412031
Armijo: th(188513.03537778993)=-34.99412791705013; dx=6.242523994275686E-6 evalInputDelta=-0.367914975224366
New Minimum: -35.362042892274495 > -37.0060120399368
END: th(62837.67845926331)=-37.0060120399368; dx=-1.612571461860837E-5 evalInputDelta=1.643969147662304
Fitness changed from -35.362042892274495 to -37.0060120399368
Iteration 13 complete. Error: -37.0060120399368 Total: 0.5899; Orientation: 0.0283; Line Search: 0.4498
Adding measurement 5c97afc9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.914e+04, gradient 5.070e-03, dot -0.560; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.0060120399368, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 5c97afc9 to history. Total: 3
th(0)=-37.0060120399368;dx=-2.4573777793895506E-5
New Minimum: -37.0060120399368 > -38.607123478108
END: th(135379.67431370614)=-38.607123478108; dx=-1.2840121859036692E-5 evalInputDelta=1.601111438171202
Fitness changed from -37.0060120399368 to -38.607123478108
Iteration 14 complete. Error: -38.607123478108 Total: 0.3889; Orientation: 0.0288; Line Search: 0.2408
Adding measurement 33d211c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.638e+04, gradient 5.046e-03, dot -0.575; [5e32caf6-3f84-4045-b6f8-827550e27474 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -38.607123478108, -2.6517367830330603, -1.693960133413962, -1.1023885267628142
LBFGS Accumulation History: 3 points
Removed measurement 33d211c to history. Total: 3
th(0)=-38.607123478108;dx=-2.3641447308687384E-5
New Minimum: -38.607123478108 > -40.62774385051766
END: th(291666.66666666686)=-40.62774385051766; dx=-6.379809412813726E-6 evalInputDelta=2.0206203724096596
Fitness changed from -38.607123478108 to -40.62774385051766
Iteration 15 complete. Error: -40.62774385051766 Total: 0.3885; Orientation: 0.0323; Line Search: 0.2446
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/2acde126-4332-41b4-8d80-1f6195ef4261.jpg)
Final threshold in iteration 16: -40.62774385051766 (> -Infinity) after 7.522s (< 5400.000s)

Returns

    -40.62774385051766