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

BasicOptimizer.scala:89 executed in 168.19 seconds (1.699 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: 1213019338319
Reset training subject: 1214213351044
Adding measurement 2d9b4e83 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.30207618159697797;dx=-1.6025434996289962E-4
New Minimum: -0.30207618159697797 > -0.3023320294271097
WOLFE (weak): th(2.154434690031884)=-0.3023320294271097; dx=-1.6000425946356022E-4 evalInputDelta=2.5584783013171686E-4
New Minimum: -0.3023320294271097 > -0.3025874006980996
WOLFE (weak): th(4.308869380063768)=-0.3025874006980996; dx=-1.5988381965019173E-4 evalInputDelta=5.112191011216183E-4
New Minimum: -0.3025874006980996 > -0.30361035699705813
WOLFE (weak): th(12.926608140191302)=-0.30361035699705813; dx=-1.5889475858182068E-4 evalInputDelta=0.0015341754000801622
New Minimum: -0.30361035699705813 > -0.30824579678132064
WOLFE (weak): th(51.70643256076521)=-0.30824579678132064; dx=-1.59331809353425E-4 evalInputDelta=0.006169615184342669
New Minimum: -0.30824579678132064 > -0.3339515536112676
WOLFE (weak): th(258.53216280382605)=-0.3339515536112676; dx=-1.6094976686816865E-4 evalInputDelta=0.03187537201428964
New Minimum: -0.3339515536112676 > -0.4986110889389623
WOLFE (weak): th(1551.1929768229563)=-0.4986110889389623; dx=-1.4999987098091635E-4 evalInputDelta=0.1965349073419843
New Minimum: -0.4986110889389623 > -1.3757373680388327
END: th(10858.350837760694)=-1.3757373680388327; dx=-7.567224876626772E-5 evalInputDelta=1.0736611864418548
Fitness changed from -0.30207618159697797 to -1.3757373680388327
Iteration 1 complete. Error: -1.3757373680388327 Total: 10.6368; Orientation: 0.1752; Line Search: 7.4296
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/976725ee-f07b-4e54-96d4-ceae75e7ef2d.jpg)
Adding measurement 24adecb8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1.3757373680388327;dx=-3.9436017493278187E-4
New Minimum: -1.3757373680388327 > -2.974871242401327
END: th(23393.607721408407)=-2.974871242401327; dx=-3.6879414506717284E-5 evalInputDelta=1.599133874362494
Fitness changed from -1.3757373680388327 to -2.974871242401327
Iteration 2 complete. Error: -2.974871242401327 Total: 2.6882; Orientation: 0.0209; Line Search: 1.7971
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/94ec9f67-0360-4933-b82d-1903cdf125a0.jpg)
Adding measurement 65e10f1f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-2.974871242401327;dx=-4.3079799127180717E-4
New Minimum: -2.974871242401327 > -5.052537714033367
END: th(50400.00000000001)=-5.052537714033367; dx=-2.2413119262191967E-5 evalInputDelta=2.07766647163204
Fitness changed from -2.974871242401327 to -5.052537714033367
Iteration 3 complete. Error: -5.052537714033367 Total: 2.6846; Orientation: 0.0208; Line Search: 1.7981
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a7a3d905-cac0-4a04-8b5b-8ab7f16b3dd5.jpg)
Adding measurement 29f5217b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.512e+03, gradient 2.178e-02, dot -0.114; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.052537714033367, -2.974871242401327, -1.3757373680388327, -0.30207618159697797
LBFGS Accumulation History: 3 points
Removed measurement 29f5217b to history. Total: 3
th(0)=-5.052537714033367;dx=-4.7375055240470666E-4
New Minimum: -5.052537714033367 > -8.878045049578422
END: th(108583.50837760697)=-8.878045049578422; dx=-1.483797883576534E-5 evalInputDelta=3.825507335545055
Fitness changed from -5.052537714033367 to -8.878045049578422
Iteration 4 complete. Error: -8.878045049578422 Total: 3.1962; Orientation: 0.5479; Line Search: 1.7645
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/138abda5-71ae-4776-b110-578926bd9749.jpg)
Adding measurement 3bbdb077 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.591e+03, gradient 2.127e-02, dot -0.094; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.878045049578422, -2.974871242401327, -1.3757373680388327, -0.30207618159697797
LBFGS Accumulation History: 3 points
Removed measurement 3bbdb077 to history. Total: 3
th(0)=-8.878045049578422;dx=-4.5164119508904E-4
New Minimum: -8.878045049578422 > -13.709078531421754
END: th(233936.07721408413)=-13.709078531421754; dx=-6.058130712826091E-6 evalInputDelta=4.831033481843333
Fitness changed from -8.878045049578422 to -13.709078531421754
Iteration 5 complete. Error: -13.709078531421754 Total: 3.1870; Orientation: 0.5032; Line Search: 1.8208
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/46bf6149-a8c6-459a-8ab9-3b17e32a0f4d.jpg)
Adding measurement 6e6649aa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.162e+03, gradient 1.865e-02, dot -0.070; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.709078531421754, -2.974871242401327, -1.3757373680388327, -0.30207618159697797
LBFGS Accumulation History: 3 points
Removed measurement 6e6649aa to history. Total: 3
th(0)=-13.709078531421754;dx=-3.4685540156182505E-4
New Minimum: -13.709078531421754 > -23.848878731074905
WOLF (strong): th(504000.0000000002)=-23.848878731074905; dx=1.1903515935119375E-6 evalInputDelta=10.13980019965315
New Minimum: -23.848878731074905 > -29.420873183239692
END: th(252000.0000000001)=-29.420873183239692; dx=-9.08706323654949E-6 evalInputDelta=15.711794651817938
Fitness changed from -13.709078531421754 to -29.420873183239692
Iteration 6 complete. Error: -29.420873183239692 Total: 4.0908; Orientation: 0.4770; Line Search: 2.7273
Adding measurement 4f1ee548 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.941e+03, gradient 2.053e-02, dot -0.073; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -29.420873183239692, -2.974871242401327, -1.3757373680388327, -0.30207618159697797
LBFGS Accumulation History: 3 points
Removed measurement 4f1ee548 to history. Total: 3
th(0)=-29.420873183239692;dx=-4.20508299679475E-4
New Minimum: -29.420873183239692 > -32.803624764899006
WOLF (strong): th(542917.5418880349)=-32.803624764899006; dx=1.1567480465981706E-5 evalInputDelta=3.3827515816593134
New Minimum: -32.803624764899006 > -46.6839304857592
END: th(271458.77094401745)=-46.6839304857592; dx=-4.372371792472438E-6 evalInputDelta=17.263057302519506
Fitness changed from -29.420873183239692 to -46.6839304857592
Iteration 7 complete. Error: -46.6839304857592 Total: 4.0461; Orientation: 0.4859; Line Search: 2.7233
Adding measurement 66183caa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.576e+04, gradient 2.371e-02, dot -0.085; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.6839304857592, -2.974871242401327, -1.3757373680388327, -0.30207618159697797
LBFGS Accumulation History: 3 points
Removed measurement 66183caa to history. Total: 3
th(0)=-46.6839304857592;dx=-5.606501513483623E-4
Armijo: th(584840.1930352104)=-40.62022415988805; dx=2.4069647367610936E-5 evalInputDelta=-6.063706325871145
New Minimum: -46.6839304857592 > -64.62321094043033
WOLF (strong): th(292420.0965176052)=-64.62321094043033; dx=1.7918642473738192E-5 evalInputDelta=17.939280454671128
New Minimum: -64.62321094043033 > -70.80458992797932
END: th(97473.3655058684)=-70.80458992797932; dx=-1.2933589302819697E-4 evalInputDelta=24.120659442220123
Fitness changed from -46.6839304857592 to -70.80458992797932
Iteration 8 complete. Error: -70.80458992797932 Total: 5.7484; Orientation: 0.4730; Line Search: 4.4392
Adding measurement 40e83f8f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.270e+07, gradient 2.245e-02, dot -0.140; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.80458992797932, -2.974871242401327, -1.3757373680388327, -0.30207618159697797
LBFGS Accumulation History: 3 points
Removed measurement 40e83f8f to history. Total: 3
th(0)=-70.80458992797932;dx=-5.028208320335685E-4
New Minimum: -70.80458992797932 > -87.25802142071335
END: th(210000.0000000001)=-87.2580214

...skipping 9839 bytes...

805;dx=-179487.0797228535
New Minimum: -97.6497618963805 > -97.67545652456255
END: th(2.1544346900318848E-7)=-97.67545652456255; dx=-145918.11336808035 evalInputDelta=0.025694628182051815
Fitness changed from -97.6497618963805 to -97.67545652456255
Iteration 21 complete. Error: -97.67545652456255 Total: 4.1922; Orientation: 1.4588; Line Search: 1.7954
Adding measurement 1cac7b3e to history. Total: 13
Accepted: LBFGS Orientation magnitude: 1.115e+08, gradient 2.748e-02, dot 0.058; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
th(0)=-97.67545652456255;dx=-176259.10896959633
New Minimum: -97.67545652456255 > -97.7291729182035
END: th(4.6415888336127815E-7)=-97.7291729182035; dx=-142148.9679874855 evalInputDelta=0.05371639364095415
Fitness changed from -97.67545652456255 to -97.7291729182035
Iteration 22 complete. Error: -97.7291729182035 Total: 4.1903; Orientation: 1.5774; Line Search: 1.7811
Adding measurement 6c3fa0a1 to history. Total: 14
Accepted: LBFGS Orientation magnitude: 1.093e+08, gradient 2.740e-02, dot 0.057; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
th(0)=-97.7291729182035;dx=-169788.1440064742
New Minimum: -97.7291729182035 > -97.83117534782467
END: th(1.0000000000000006E-6)=-97.83117534782467; dx=-121845.24742803597 evalInputDelta=0.1020024296211659
Fitness changed from -97.7291729182035 to -97.83117534782467
Iteration 23 complete. Error: -97.83117534782467 Total: 4.5820; Orientation: 1.9699; Line Search: 1.7967
Adding measurement 3f0d8d90 to history. Total: 15
Accepted: LBFGS Orientation magnitude: 9.793e+07, gradient 2.737e-02, dot 0.052; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
th(0)=-97.83117534782467;dx=-138225.67647945276
New Minimum: -97.83117534782467 > -97.97902431627193
END: th(2.154434690031885E-6)=-97.97902431627193; dx=-93510.50348331433 evalInputDelta=0.14784896844726347
Fitness changed from -97.83117534782467 to -97.97902431627193
Iteration 24 complete. Error: -97.97902431627193 Total: 4.4584; Orientation: 1.8136; Line Search: 1.8010
Adding measurement 541b937c to history. Total: 16
Accepted: LBFGS Orientation magnitude: 8.660e+07, gradient 2.727e-02, dot 0.047; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
th(0)=-97.97902431627193;dx=-110611.18275834146
New Minimum: -97.97902431627193 > -98.1487358638592
END: th(4.641588833612782E-6)=-98.1487358638592; dx=-63750.9597168504 evalInputDelta=0.16971154758726925
Fitness changed from -97.97902431627193 to -98.1487358638592
Iteration 25 complete. Error: -98.1487358638592 Total: 4.5982; Orientation: 1.9566; Line Search: 1.7938
<a id="p-19"></a>Iteration 25
<a id="p-18"></a>![Iteration 25](etc/5f36866c-d2e6-4a87-8349-045d5ec731ba.jpg)
Adding measurement 7d34d8e9 to history. Total: 17
Accepted: LBFGS Orientation magnitude: 7.218e+07, gradient 2.714e-02, dot 0.040; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
th(0)=-98.1487358638592;dx=-78677.22036220475
New Minimum: -98.1487358638592 > -98.15624470514645
END: th(1.0000000000000008E-5)=-98.15624470514645; dx=-27917.61447514947 evalInputDelta=0.007508841287247492
Fitness changed from -98.1487358638592 to -98.15624470514645
Iteration 26 complete. Error: -98.15624470514645 Total: 4.6789; Orientation: 2.0157; Line Search: 1.7869
Adding measurement 7467ce3f to history. Total: 18
Accepted: LBFGS Orientation magnitude: 4.919e+07, gradient 2.689e-02, dot 0.031; [7083082c-14b6-497f-9901-d07be3cddb73 = 1.000/1.000e+00]
th(0)=-98.15624470514645;dx=-40411.59153505576
Armijo: th(2.1544346900318854E-5)=-97.64845032347148; dx=-2928.6775157247303 evalInputDelta=-0.5077943816749695
Armijo: th(1.0772173450159427E-5)=-97.99316739957986; dx=-11092.382898952785 evalInputDelta=-0.1630773055665884
Armijo: th(3.5907244833864755E-6)=-98.11894816108519; dx=-17949.46238847833 evalInputDelta=-0.03729654406126315
Armijo: th(8.976811208466189E-7)=-98.14843473348215; dx=-19952.679600899013 evalInputDelta=-0.007809971664300974
Armijo: th(1.7953622416932378E-7)=-98.15476783648643; dx=-21303.24532521639 evalInputDelta=-0.0014768686600206138
Armijo: th(2.992270402822063E-8)=-98.15600573114205; dx=-21667.0324158487 evalInputDelta=-2.3897400440375804E-4
Armijo: th(4.2746720040315186E-9)=-98.15622080777219; dx=-21746.423978080045 evalInputDelta=-2.3897374262560334E-5
Armijo: th(5.343340005039398E-10)=-98.15623514619745; dx=-21642.162611284002 evalInputDelta=-9.55894900300791E-6
MIN ALPHA (5.937044450043775E-11): th(0.0)=-98.15624470514645
Fitness changed from -98.15624470514645 to -98.15624470514645
Static Iteration Total: 11.9622; Orientation: 2.1273; Line Search: 9.0061
Iteration 27 failed. Error: -98.15624470514645
Previous Error: 0.0 -> -98.15624470514645
Retrying iteration 27
Reset training subject: 1350892643224
Adding measurement 29b80a72 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-98.15624470514645;dx=-7.215537444060743E-4
WOLFE (weak): th(2.1544346900318838E-10)=-98.15624470514645; dx=-7.060442901731367E-4 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-98.15624470514645; dx=-7.061646851928106E-4 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-98.15624470514645; dx=-7.055858890032762E-4 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-98.15624470514645; dx=-7.05559529783166E-4 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-98.15624470514645; dx=-7.058662363765524E-4 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-98.15624470514645; dx=-7.057223727822489E-4 evalInputDelta=0.0
WOLFE (weak): th(1.0858350837760695E-6)=-98.15624470514645; dx=-7.051409340520962E-4 evalInputDelta=0.0
WOLFE (weak): th(8.686680670208556E-6)=-98.15624470514645; dx=-7.054958133724074E-4 evalInputDelta=0.0
Armijo: th(7.8180126031877E-5)=-98.15624470514645; dx=-7.05448781824445E-4 evalInputDelta=0.0
Armijo: th(4.343340335104278E-5)=-98.15624470514645; dx=-7.054588435925368E-4 evalInputDelta=0.0
Armijo: th(2.606004201062567E-5)=-98.15624470514645; dx=-7.058806237661909E-4 evalInputDelta=0.0
Armijo: th(1.7373361340417112E-5)=-98.15624470514645; dx=-7.051337623869448E-4 evalInputDelta=0.0
Armijo: th(1.3030021005312834E-5)=-98.15624470514645; dx=-7.056943065064383E-4 evalInputDelta=0.0
Armijo: th(1.0858350837760695E-5)=-98.15624470514645; dx=-7.05207393664238E-4 evalInputDelta=0.0
WOLFE (weak): th(9.772515753984626E-6)=-98.15624470514645; dx=-7.054977034238138E-4 evalInputDelta=0.0
Armijo: th(1.031543329587266E-5)=-98.15624470514645; dx=-7.057308795746556E-4 evalInputDelta=0.0
Armijo: th(1.0043974524928643E-5)=-98.15624470514645; dx=-7.055538339033935E-4 evalInputDelta=0.0
Armijo: th(9.908245139456634E-6)=-98.15624470514645; dx=-7.052853245702595E-4 evalInputDelta=0.0
WOLFE (weak): th(9.84038044672063E-6)=-98.15624470514645; dx=-7.061226980981673E-4 evalInputDelta=0.0
Armijo: th(9.874312793088632E-6)=-98.15624470514645; dx=-7.055603945231107E-4 evalInputDelta=0.0
Armijo: th(9.85734661990463E-6)=-98.15624470514645; dx=-7.056599379445523E-4 evalInputDelta=0.0
Armijo: th(9.84886353331263E-6)=-98.15624470514645; dx=-7.053140940799584E-4 evalInputDelta=0.0
WOLFE (weak): th(9.84462199001663E-6)=-98.15624470514645; dx=-7.056561663791302E-4 evalInputDelta=0.0
WOLFE (weak): th(9.84674276166463E-6)=-98.15624470514645; dx=-7.058958025211277E-4 evalInputDelta=0.0
Armijo: th(9.84780314748863E-6)=-98.15624470514645; dx=-7.054521691858245E-4 evalInputDelta=0.0
WOLFE (weak): th(9.847272954576631E-6)=-98.15624470514645; dx=-7.058138267524287E-4 evalInputDelta=0.0
Armijo: th(9.847538051032631E-6)=-98.15624470514645; dx=-7.053589653218089E-4 evalInputDelta=0.0
Armijo: th(9.847405502804631E-6)=-98.15624470514645; dx=-7.054141958700007E-4 evalInputDelta=0.0
WOLFE (weak): th(9.847339228690632E-6)=-98.15624470514645; dx=-7.045821378655415E-4 evalInputDelta=0.0
mu ~= nu (9.847339228690632E-6): th(0.0)=-98.15624470514645
Fitness changed from -98.15624470514645 to -98.15624470514645
Static Iteration Total: 30.2962; Orientation: 0.0202; Line Search: 28.6052
Iteration 28 failed. Error: -98.15624470514645
Previous Error: 0.0 -> -98.15624470514645
Optimization terminated 28
Final threshold in iteration 28: -98.15624470514645 (> -Infinity) after 168.170s (< 3600.000s)

Returns

    -98.15624470514645