Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 89.28 seconds (2.606 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: 207791288861500
Reset training subject: 207792037919900
Adding measurement 35b82c4e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=11.4376962184906;dx=-1.501403476677113E-6
New Minimum: 11.4376962184906 > 11.43769383430481
WOLFE (weak): th(2.154434690031884)=11.43769383430481; dx=-1.5012482877214364E-6 evalInputDelta=2.384185791015625E-6
New Minimum: 11.43769383430481 > 11.437691450119019
WOLFE (weak): th(4.308869380063768)=11.437691450119019; dx=-1.5013027355497477E-6 evalInputDelta=4.76837158203125E-6
New Minimum: 11.437691450119019 > 11.437678337097168
WOLFE (weak): th(12.926608140191302)=11.437678337097168; dx=-1.5013937975058822E-6 evalInputDelta=1.7881393432617188E-5
New Minimum: 11.437678337097168 > 11.437622308731079
WOLFE (weak): th(51.70643256076521)=11.437622308731079; dx=-1.5013842564192724E-6 evalInputDelta=7.390975952148438E-5
New Minimum: 11.437622308731079 > 11.437320709228516
WOLFE (weak): th(258.53216280382605)=11.437320709228516; dx=-1.5014328050281592E-6 evalInputDelta=3.7550926208496094E-4
New Minimum: 11.437320709228516 > 11.435444355010986
WOLFE (weak): th(1551.1929768229563)=11.435444355010986; dx=-1.5011020541922972E-6 evalInputDelta=0.002251863479614258
New Minimum: 11.435444355010986 > 11.421929597854614
WOLFE (weak): th(10858.350837760694)=11.421929597854614; dx=-1.4992206514783746E-6 evalInputDelta=0.015766620635986328
New Minimum: 11.421929597854614 > 11.312426328659058
WOLFE (weak): th(86866.80670208555)=11.312426328659058; dx=-1.483427429272031E-6 evalInputDelta=0.12526988983154297
New Minimum: 11.312426328659058 > 9.391988731177374
WOLFE (weak): th(781801.26031877)=9.391988731177374; dx=-1.98985944350257E-6 evalInputDelta=2.0457074873132264
New Minimum: 9.391988731177374 > 5.892154837053498
END: th(7818012.6031877)=5.892154837053498; dx=-8.955212524585609E-7 evalInputDelta=5.545541381437102
Fitness changed from 11.4376962184906 to 5.892154837053498
Iteration 1 complete. Error: 5.892154837053498 Total: 10.7283; Orientation: 0.0170; Line Search: 8.5215
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/56be31c8-27c3-4a26-bd50-3c84ed8e3dc8.jpg)
Adding measurement 1d694d9a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=5.892154837053498;dx=-0.02239754391992532
Armijo: th(1.684339755941405E7)=109.75375912867422; dx=7.6375824709117E-6 evalInputDelta=-103.86160429162072
Armijo: th(8421698.779707026)=49.521216196902685; dx=6.774821872168715E-6 evalInputDelta=-43.62906135984919
Armijo: th(2807232.9265690087)=15.684238246959861; dx=8.730134864009327E-6 evalInputDelta=-9.792083409906363
Armijo: th(701808.2316422522)=17.657505835737126; dx=1.9739754088155494E-5 evalInputDelta=-11.765350998683628
Armijo: th(140361.64632845044)=8.825058512406674; dx=-3.802840198540606E-6 evalInputDelta=-2.9329036753531756
New Minimum: 5.892154837053498 > -21.549984621055273
END: th(23393.607721408407)=-21.549984621055273; dx=-0.0013559139189820613 evalInputDelta=27.44213945810877
Fitness changed from 5.892154837053498 to -21.549984621055273
Iteration 2 complete. Error: -21.549984621055273 Total: 6.2903; Orientation: 0.0167; Line Search: 5.5066
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2045095c-4b3b-4088-ab53-e98e59f05e24.jpg)
Adding measurement 19180603 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-21.549984621055273;dx=-0.020723951159878844
Armijo: th(50400.00000000001)=-11.346856407685511; dx=-6.543230173604625E-4 evalInputDelta=-10.203128213369762
Armijo: th(25200.000000000004)=-7.911928447517294; dx=-9.859065648968129E-4 evalInputDelta=-13.63805617353798
New Minimum: -21.549984621055273 > -58.055832755484516
END: th(8400.000000000002)=-58.055832755484516; dx=-0.004490119080686928 evalInputDelta=36.50584813442924
Fitness changed from -21.549984621055273 to -58.055832755484516
Iteration 3 complete. Error: -58.055832755484516 Total: 4.0890; Orientation: 0.0180; Line Search: 3.3062
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/9ebe698b-7a1a-4987-93e1-07506732bfbb.jpg)
Adding measurement 67369634 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.202e+06, gradient 1.800e-01, dot -0.008; [511e7da4-6923-4972-8dc3-05ff775cbaca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.055832755484516, -21.549984621055273, 5.892154837053498, 11.4376962184906
LBFGS Accumulation History: 3 points
Removed measurement 67369634 to history. Total: 3
th(0)=-58.055832755484516;dx=-0.03187282613660039
Armijo: th(18097.251396267828)=-36.99404565921963; dx=-0.0016468908748570265 evalInputDelta=-21.061787096264887
New Minimum: -58.055832755484516 > -71.54171359091062
END: th(9048.625698133914)=-71.54171359091062; dx=-0.0038158682305858022 evalInputDelta=13.485880835426101
Fitness changed from -58.055832755484516 to -71.54171359091062
Iteration 4 complete. Error: -71.54171359091062 Total: 3.2938; Orientation: 0.3338; Line Search: 2.2729
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c0ea6d0b-709d-4ebc-8f3f-8ade15b576ab.jpg)
Adding measurement 444540a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.549e+06, gradient 1.836e-01, dot -0.006; [511e7da4-6923-4972-8dc3-05ff775cbaca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -71.54171359091062, -21.549984621055273, 5.892154837053498, 11.4376962184906
LBFGS Accumulation History: 3 points
Removed measurement 444540a0 to history. Total: 3
th(0)=-71.54171359091062;dx=-0.033657875032698396
New Minimum: -71.54171359091062 > -82.65450998880858
END: th(19494.673101173677)=-82.65450998880858; dx=-8.308720861005291E-4 evalInputDelta=11.112796397897966
Fitness changed from -71.54171359091062 to -82.65450998880858
Iteration 5 complete. Error: -82.65450998880858 Total: 2.5420; Orientation: 0.3062; Line Search: 1.4621
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a47eda05-e872-4c6b-98ec-2ca4f0d4ee2b.jpg)
Adding measurement 3878cbe5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.412e+06, gradient 1.925e-01, dot -0.005; [511e7da4-6923-4972-8dc3-05ff775cbaca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.65450998880858, -21.549984621055273, 5.892154837053498, 11.4376962184906
LBFGS Accumulation History: 3 points
Removed measurement 3878cbe5 to history. Total: 3
th(0)=-82.65450998880858;dx=-0.036749036088945905
New Minimum: -82.65450998880858 > -102.9048903706204
END: th(42000.000000000015)=-102.9048903706204; dx=-9.506617774722492E-4 evalInputDelta=20.25038038181181
Fitness changed from -82.65450998880858 to -102.9048903706204
Iteration 6 complete. Error: -102.9048903706204 Total: 2.8428; Orientation: 0.5301; Line Search: 1.5672
Adding measurement 695fd7e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.673e+05, gradient 1.629e-01, dot -0.001; [511e7da4-6923-4972-8dc3-05ff775cbaca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.9048903706204, -21.549984621055273, 5.892154837053498, 11.4376962184906
LBFGS Accumulation History: 3 points
Removed measurement 695fd7e to history. Total: 3
th(0)=-102.9048903706204;dx=-0.02652028783424718
Armijo: th(90486.25698133915)=-61.51135621848039; dx=-2.396853684769123E-4 evalInputDelta=-41.393534152140006
New Minimum: -102.9048903706204 > -116.7856665877035
END: th(45243.12849066957)=-116.7856665877035; dx=-3.8452542946232706E-4 evalInputDelta=13.88077621708311
Fitness changed from -102.9048903706204 to -116.7856665877035
Iteration 7 complete. Error: -116.7856665877035 Total: 3.3599; Orientation: 0.3211; Line Search: 2.3063
Adding measurement 59fa04f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.768e+06, gradient 1.442e-01, dot -0.006; [511e7da4-6923-4972-8dc3-05ff775cbaca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -116.7856665877035, -21.549984621055273, 5.892154837053498, 11.4376962184906
LBFGS Accumulation History: 3 points
Removed measurement 59fa04f7 to history. Total: 3
th(0)=-116.7856665877035;dx=-0.020717825576496637
Armijo: th(97473.3655058684)=-92.87319171828885; dx=-1.7862305712896607E-5 

...skipping 752 bytes...

tory. Total: 3
th(0)=-196.71535486460795;dx=-0.023489413784659616
Armijo: th(105000.00000000004)=-106.31587844615902; dx=6.612798486717699E-4 evalInputDelta=-90.39947641844893
New Minimum: -196.71535486460795 > -275.23025909474256
END: th(52500.00000000002)=-275.23025909474256; dx=-0.0010158877161721776 evalInputDelta=78.51490423013462
Fitness changed from -196.71535486460795 to -275.23025909474256
Iteration 9 complete. Error: -275.23025909474256 Total: 3.2841; Orientation: 0.2938; Line Search: 2.3380
Adding measurement 8dc07ba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.267e+06, gradient 1.605e-01, dot -0.003; [511e7da4-6923-4972-8dc3-05ff775cbaca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -275.23025909474256, -21.549984621055273, 5.892154837053498, 11.4376962184906
LBFGS Accumulation History: 3 points
Removed measurement 8dc07ba to history. Total: 3
th(0)=-275.23025909474256;dx=-0.0257149081184704
Armijo: th(113107.82122667394)=-145.6150466204294; dx=5.748580788827765E-4 evalInputDelta=-129.61521247431315
New Minimum: -275.23025909474256 > -347.8161395361016
END: th(56553.91061333697)=-347.8161395361016; dx=-0.0010133207561511084 evalInputDelta=72.58588044135905
Fitness changed from -275.23025909474256 to -347.8161395361016
Iteration 10 complete. Error: -347.8161395361016 Total: 3.6990; Orientation: 0.3445; Line Search: 2.6119
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a8c3e441-beea-4da2-98b2-9a031b06e3e4.jpg)
Adding measurement 5d60139c to history. Total: 3
Accepted: LBFGS Orientation magnitude: 3.552e+06, gradient 1.605e-01, dot 0.006; [511e7da4-6923-4972-8dc3-05ff775cbaca = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-347.8161395361016;dx=-3374.0855576228523
Armijo: th(121841.70688233551)=480.37742614746094; dx=7.837051451927836E-4 evalInputDelta=-828.1935656835626
Armijo: th(60920.853441167754)=480.37742614746094; dx=0.0015670220292613424 evalInputDelta=-828.1935656835626
Armijo: th(20306.95114705592)=480.37742614746094; dx=0.00470213208463648 evalInputDelta=-828.1935656835626
Armijo: th(5076.73778676398)=480.3774642944336; dx=0.01880925349526967 evalInputDelta=-828.1936038305353
Armijo: th(1015.347557352796)=480.3738784790039; dx=0.0940332265516787 evalInputDelta=-828.1900180151056
Armijo: th(169.22459289213268)=480.36815643310547; dx=0.5644814607022288 evalInputDelta=-828.1842959692071
Armijo: th(24.17494184173324)=480.2799987792969; dx=3.971188067304133 evalInputDelta=-828.0961383153985
Armijo: th(3.021867730216655)=479.5711898803711; dx=32.93123996563897 evalInputDelta=-827.3873294164728
Armijo: th(0.3357630811351839)=472.3405456542969; dx=392.01213330622187 evalInputDelta=-820.1566851903985
Armijo: th(0.03357630811351839)=308.6451530456543; dx=8021.82021770311 evalInputDelta=-656.461292581756
Armijo: th(0.00305239164668349)=-248.74807722924675; dx=30554.32760840402 evalInputDelta=-99.06806230685487
Armijo: th(2.543659705569575E-4)=-345.98046929644914; dx=3628.3717140611498 evalInputDelta=-1.8356702396524724
Armijo: th(1.956661311976596E-5)=-347.7067734565473; dx=772.9866116461722 evalInputDelta=-0.1093660795543201
Armijo: th(1.3976152228404258E-6)=-347.808110156326; dx=778.8393710063569 evalInputDelta=-0.008029379775621237
Armijo: th(9.317434818936172E-8)=-347.8156275477648; dx=750.3493685155029 evalInputDelta=-5.119883368251976E-4
Armijo: th(5.823396761835108E-9)=-347.81612144352295; dx=798.4424984502696 evalInputDelta=-1.809257867080305E-5
New Minimum: -347.8161395361016 > -347.81616050331814
WOLF (strong): th(3.425527506961828E-10)=-347.81616050331814; dx=777.5043170975803 evalInputDelta=2.0967216528333665E-5
MIN ALPHA (1.9030708372010153E-11): th(3.425527506961828E-10)=-347.81616050331814
Fitness changed from -347.8161395361016 to -347.81616050331814
Iteration 11 complete. Error: -347.81616050331814 Total: 16.3624; Orientation: 0.2907; Line Search: 15.3050
Adding measurement 3a323884 to history. Total: 4
Accepted: LBFGS Orientation magnitude: 3.110e+06, gradient 1.609e-01, dot 0.002; [511e7da4-6923-4972-8dc3-05ff775cbaca = 1.000/1.000e+00]
th(0)=-347.81616050331814;dx=-1055.3279987436053
Armijo: th(2.1544346900318838E-10)=-347.81616050331814; dx=1715.1177809575302 evalInputDelta=0.0
Armijo: th(1.0772173450159419E-10)=-347.8161395361016; dx=1606.479825858889 evalInputDelta=-2.0967216528333665E-5
MIN ALPHA (3.590724483386473E-11): th(0.0)=-347.81616050331814
Fitness changed from -347.81616050331814 to -347.81616050331814
Static Iteration Total: 4.3349; Orientation: 0.3805; Line Search: 3.2493
Iteration 12 failed. Error: -347.81616050331814
Previous Error: 0.0 -> -347.81616050331814
Retrying iteration 12
Reset training subject: 207855608372800
Adding measurement 2db59dc9 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-347.81616050331814;dx=-0.025875544285256576
WOLFE (weak): th(2.1544346900318838E-10)=-347.81616050331814; dx=-0.02347563627379631 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-347.81616050331814; dx=-0.0234400734991237 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-347.81616050331814; dx=-0.023404175334082455 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-347.81616050331814; dx=-0.023462013076824495 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-347.81616050331814; dx=-0.02350480199839628 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-347.81616050331814; dx=-0.023479112718655583 evalInputDelta=0.0
WOLFE (weak): th(1.0858350837760695E-6)=-347.81616050331814; dx=-0.02342228023342656 evalInputDelta=0.0
Armijo: th(8.686680670208556E-6)=-347.8161395361016; dx=-0.02352017453864933 evalInputDelta=-2.0967216528333665E-5
Armijo: th(4.886257876992313E-6)=-347.8161395361016; dx=-0.023457450199528312 evalInputDelta=-2.0967216528333665E-5
Armijo: th(2.986046480384191E-6)=-347.8161395361016; dx=-0.023421126976694892 evalInputDelta=-2.0967216528333665E-5
Armijo: th(2.0359407820801304E-6)=-347.8161395361016; dx=-0.023484502654525962 evalInputDelta=-2.0967216528333665E-5
Armijo: th(1.5608879329281E-6)=-347.81616050331814; dx=-0.02352553789837529 evalInputDelta=0.0
Armijo: th(1.3233615083520847E-6)=-347.81616050331814; dx=-0.023410715138074016 evalInputDelta=0.0
Armijo: th(1.2045982960640772E-6)=-347.81616050331814; dx=-0.02348924597594904 evalInputDelta=0.0
Armijo: th(1.1452166899200734E-6)=-347.81616050331814; dx=-0.023424535315127844 evalInputDelta=0.0
Armijo: th(1.1155258868480715E-6)=-347.81616050331814; dx=-0.023495677423817272 evalInputDelta=0.0
Armijo: th(1.1006804853120704E-6)=-347.81616050331814; dx=-0.023556665538432275 evalInputDelta=0.0
WOLFE (weak): th(1.09325778454407E-6)=-347.81616050331814; dx=-0.02349347123262624 evalInputDelta=0.0
WOLFE (weak): th(1.0969691349280702E-6)=-347.81616050331814; dx=-0.0235463894950724 evalInputDelta=0.0
Armijo: th(1.0988248101200703E-6)=-347.81616050331814; dx=-0.02346302612024851 evalInputDelta=0.0
WOLFE (weak): th(1.0978969725240702E-6)=-347.81616050331814; dx=-0.023406952580951802 evalInputDelta=0.0
WOLFE (weak): th(1.0983608913220704E-6)=-347.81616050331814; dx=-0.023476719622388745 evalInputDelta=0.0
Armijo: th(1.0985928507210703E-6)=-347.81616050331814; dx=-0.023386671943639567 evalInputDelta=0.0
Armijo: th(1.0984768710215703E-6)=-347.81616050331814; dx=-0.023505570182585075 evalInputDelta=0.0
Armijo: th(1.0984188811718203E-6)=-347.81616050331814; dx=-0.023472913519183188 evalInputDelta=0.0
WOLFE (weak): th(1.0983898862469453E-6)=-347.81616050331814; dx=-0.02351539025583893 evalInputDelta=0.0
Armijo: th(1.0984043837093827E-6)=-347.81616050331814; dx=-0.023559699373139273 evalInputDelta=0.0
WOLFE (weak): th(1.0983971349781642E-6)=-347.81616050331814; dx=-0.023493929535579924 evalInputDelta=0.0
mu ~= nu (1.0983971349781642E-6): th(0.0)=-347.81616050331814
Fitness changed from -347.81616050331814 to -347.81616050331814
Static Iteration Total: 24.9588; Orientation: 0.0201; Line Search: 23.4657
Iteration 13 failed. Error: -347.81616050331814
Previous Error: 0.0 -> -347.81616050331814
Optimization terminated 13
Final threshold in iteration 13: -347.81616050331814 (> -Infinity) after 89.278s (< 5400.000s)

Returns

    -347.81616050331814