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 172.16 seconds (1.469 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: 12125209846486
Reset training subject: 12126415539362
Adding measurement 4db13888 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1.7700470821991894;dx=-7.206832547900161E-4
New Minimum: -1.7700470821991894 > -1.7716786900448735
WOLFE (weak): th(2.154434690031884)=-1.7716786900448735; dx=-7.143616905427934E-4 evalInputDelta=0.0016316078456841687
New Minimum: -1.7716786900448735 > -1.7733099235754517
WOLFE (weak): th(4.308869380063768)=-1.7733099235754517; dx=-7.172687789643926E-4 evalInputDelta=0.0032628413762623154
New Minimum: -1.7733099235754517 > -1.7798599530376606
WOLFE (weak): th(12.926608140191302)=-1.7798599530376606; dx=-7.233555059164979E-4 evalInputDelta=0.009812870838471266
New Minimum: -1.7798599530376606 > -1.809635806945962
WOLFE (weak): th(51.70643256076521)=-1.809635806945962; dx=-7.248446504370194E-4 evalInputDelta=0.03958872474677255
New Minimum: -1.809635806945962 > -1.9707158196923198
WOLFE (weak): th(258.53216280382605)=-1.9707158196923198; dx=-7.294708399213116E-4 evalInputDelta=0.2006687374931304
New Minimum: -1.9707158196923198 > -3.02102761677183
WOLFE (weak): th(1551.1929768229563)=-3.02102761677183; dx=-7.651067607228927E-4 evalInputDelta=1.2509805345726408
New Minimum: -3.02102761677183 > -6.579375995970649
END: th(10858.350837760694)=-6.579375995970649; dx=-2.01092872586345E-4 evalInputDelta=4.809328913771459
Fitness changed from -1.7700470821991894 to -6.579375995970649
Iteration 1 complete. Error: -6.579375995970649 Total: 13.2285; Orientation: 0.0172; Line Search: 9.6413
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6e4276ac-ad71-42f8-8866-f27fa791446d.jpg)
Adding measurement 58536857 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-6.579375995970649;dx=-0.0024768283028062913
New Minimum: -6.579375995970649 > -9.976211347409588
WOLF (strong): th(23393.607721408407)=-9.976211347409588; dx=2.788170222657842E-5 evalInputDelta=3.3968353514389396
New Minimum: -9.976211347409588 > -12.526727073921306
END: th(11696.803860704204)=-12.526727073921306; dx=-1.386417388258151E-4 evalInputDelta=5.947351077950657
Fitness changed from -6.579375995970649 to -12.526727073921306
Iteration 2 complete. Error: -12.526727073921306 Total: 4.9311; Orientation: 0.0178; Line Search: 3.6228
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b5833937-c6dd-4f0e-a65c-9b32bc7e3390.jpg)
Adding measurement 160c0ba7 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-12.526727073921306;dx=-0.0030735013603515266
New Minimum: -12.526727073921306 > -16.226874432923466
WOLF (strong): th(25200.000000000004)=-16.226874432923466; dx=5.145866446117371E-5 evalInputDelta=3.7001473590021607
New Minimum: -16.226874432923466 > -19.97264431560151
END: th(12600.000000000002)=-19.97264431560151; dx=-2.2084181216612336E-4 evalInputDelta=7.445917241680204
Fitness changed from -12.526727073921306 to -19.97264431560151
Iteration 3 complete. Error: -19.97264431560151 Total: 5.0018; Orientation: 0.0180; Line Search: 3.6753
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/67af7fbb-67a1-4ae9-898c-c32284ea808d.jpg)
Adding measurement 405e8704 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.148e+03, gradient 5.750e-02, dot -0.189; [6d6973a3-6fd7-4389-802f-6cd85165bd7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.97264431560151, -12.526727073921306, -6.579375995970649, -1.7700470821991894
LBFGS Accumulation History: 3 points
Removed measurement 405e8704 to history. Total: 3
th(0)=-19.97264431560151;dx=-0.0032655695775887783
New Minimum: -19.97264431560151 > -22.281627937703803
END: th(27145.87709440174)=-22.281627937703803; dx=-2.7236626556707682E-5 evalInputDelta=2.308983622102293
Fitness changed from -19.97264431560151 to -22.281627937703803
Iteration 4 complete. Error: -22.281627937703803 Total: 4.2242; Orientation: 0.4944; Line Search: 2.4334
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0a6f6f48-56e0-40cb-a1a1-05fd06fa157a.jpg)
Adding measurement 20cd0147 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.248e+03, gradient 6.855e-02, dot -0.151; [6d6973a3-6fd7-4389-802f-6cd85165bd7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -22.281627937703803, -12.526727073921306, -6.579375995970649, -1.7700470821991894
LBFGS Accumulation History: 3 points
Removed measurement 20cd0147 to history. Total: 3
th(0)=-22.281627937703803;dx=-0.004592032135995341
Armijo: th(58484.01930352103)=-15.44696302986823; dx=6.175602766102546E-5 evalInputDelta=-6.834664907835572
New Minimum: -22.281627937703803 > -30.333818505535948
WOLF (strong): th(29242.009651760516)=-30.333818505535948; dx=1.2039314962860284E-4 evalInputDelta=8.052190567832145
New Minimum: -30.333818505535948 > -39.50713547338658
END: th(9747.336550586839)=-39.50713547338658; dx=-5.969156209752694E-4 evalInputDelta=17.22550753568278
Fitness changed from -22.281627937703803 to -39.50713547338658
Iteration 5 complete. Error: -39.50713547338658 Total: 7.1244; Orientation: 0.5743; Line Search: 5.2487
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/97403af7-a8ad-4f1b-a494-eafaae3063ba.jpg)
Adding measurement 5ecec106 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.917e+03, gradient 6.469e-02, dot -0.146; [6d6973a3-6fd7-4389-802f-6cd85165bd7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.50713547338658, -12.526727073921306, -6.579375995970649, -1.7700470821991894
LBFGS Accumulation History: 3 points
Removed measurement 5ecec106 to history. Total: 3
th(0)=-39.50713547338658;dx=-0.004129515559713118
New Minimum: -39.50713547338658 > -47.61028259641308
END: th(21000.000000000007)=-47.61028259641308; dx=-3.0995007158160556E-5 evalInputDelta=8.103147123026496
Fitness changed from -39.50713547338658 to -47.61028259641308
Iteration 6 complete. Error: -47.61028259641308 Total: 4.2367; Orientation: 0.4838; Line Search: 2.4235
Adding measurement 7e867d29 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.457e+03, gradient 8.775e-02, dot -0.123; [6d6973a3-6fd7-4389-802f-6cd85165bd7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.61028259641308, -12.526727073921306, -6.579375995970649, -1.7700470821991894
LBFGS Accumulation History: 3 points
Removed measurement 7e867d29 to history. Total: 3
th(0)=-47.61028259641308;dx=-0.007655976988625485
Armijo: th(45243.12849066957)=-32.17259823873546; dx=1.829924979985603E-4 evalInputDelta=-15.437684357677618
New Minimum: -47.61028259641308 > -54.778514138545034
WOLF (strong): th(22621.564245334786)=-54.778514138545034; dx=4.082052289344696E-4 evalInputDelta=7.168231542131956
New Minimum: -54.778514138545034 > -69.25797151885347
END: th(7540.521415111595)=-69.25797151885347; dx=-6.802721653975416E-4 evalInputDelta=21.647688922440388
Fitness changed from -47.61028259641308 to -69.25797151885347
Iteration 7 complete. Error: -69.25797151885347 Total: 6.5161; Orientation: 0.5495; Line Search: 4.8173
Adding measurement 33648db6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.266e+04, gradient 7.365e-02, dot -0.150; [6d6973a3-6fd7-4389-802f-6cd85165bd7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.25797151885347, -12.526727073921306, -6.579375995970649, -1.7700470821991894
LBFGS Accumulation History: 3 points
Removed measurement 33648db6 to history. Total: 3
th(0)=-69.25797151885347;dx=-0.00534934189372324
New Minimum: -69.25797151885347 > -76.55836543344515
WOLF (strong): th(16245.56091764473)=-76.55836543344515; dx=2.3665040274200457E-4 evalInputDelta=7.30039391459168
New Minimum: -76.55836543344515 > -82.71332066695024
END: th(8122.780458822365)=-82.71332066695024; dx=-5.358201420196995E-4 evalInputDelta=13.455349148096772
Fitness changed from -69.25797151885347 to -82.71332066695024
Iteration 8 complete. Error: -82.71332066695024 Total: 5.2598; Orientation: 0.4939; Line Search: 3.6069
Adding measurement 5b4b6b59 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.775e+04, gradient 7.801e-02, dot -0.169;

...skipping 5078 bytes...

68361178 evalInputDelta=0.0
Armijo: th(2.3523989995344176E-7)=-123.06905474174884; dx=-6.3478890272544435 evalInputDelta=0.0
Armijo: th(2.012608032935002E-7)=-123.06904840747067; dx=-6.4572363689078465 evalInputDelta=-6.334278168651508E-6
Armijo: th(1.842712549635294E-7)=-123.06905474174884; dx=-6.95401156580387 evalInputDelta=0.0
Armijo: th(1.75776480798544E-7)=-123.06904840747067; dx=-6.309643307279943 evalInputDelta=-6.334278168651508E-6
Armijo: th(1.715290937160513E-7)=-123.06904840747067; dx=-6.782435584419494 evalInputDelta=-6.334278168651508E-6
Armijo: th(1.6940540017480496E-7)=-123.06905474174884; dx=-6.375026866748186 evalInputDelta=0.0
Armijo: th(1.683435534041818E-7)=-123.06904840747067; dx=-6.067337594877667 evalInputDelta=-6.334278168651508E-6
Armijo: th(1.6781263001887018E-7)=-123.06905474174884; dx=-6.686649250246836 evalInputDelta=0.0
Armijo: th(1.675471683262144E-7)=-123.06905474174884; dx=-6.6501735171594465 evalInputDelta=0.0
Armijo: th(1.674144374798865E-7)=-123.06905474174884; dx=-6.319493547787484 evalInputDelta=0.0
Armijo: th(1.6734807205672253E-7)=-123.06904840747067; dx=-6.4308382597989295 evalInputDelta=-6.334278168651508E-6
Armijo: th(1.6731488934514055E-7)=-123.06905474174884; dx=-6.526115631622949 evalInputDelta=0.0
Armijo: th(1.6729829798934956E-7)=-123.06905474174884; dx=-6.321432136655828 evalInputDelta=0.0
Armijo: th(1.6729000231145409E-7)=-123.06905474174884; dx=-6.22824101901031 evalInputDelta=0.0
WOLFE (weak): th(1.6728585447250632E-7)=-123.06906107602668; dx=-6.3309987861023185 evalInputDelta=6.33427784180185E-6
WOLFE (weak): th(1.672879283919802E-7)=-123.06906107602668; dx=-6.43088766599763 evalInputDelta=6.33427784180185E-6
Armijo: th(1.6728896535171716E-7)=-123.06904840747067; dx=-6.629527875086986 evalInputDelta=-6.334278168651508E-6
mu ~= nu (1.672879283919802E-7): th(1.672817066335586E-7)=-123.06906107602668
Fitness changed from -123.06905474174884 to -123.06906107602668
Iteration 12 complete. Error: -123.06906107602668 Total: 47.3446; Orientation: 0.4679; Line Search: 45.7002
Adding measurement 29063c76 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.550e+07, gradient 8.289e-02, dot -0.181; [6d6973a3-6fd7-4389-802f-6cd85165bd7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -123.06906107602668, -123.06905474174884, -12.526727073921306, -6.579375995970649, -1.7700470821991894
Rejected: LBFGS Orientation magnitude: 2.906e+07, gradient 8.289e-02, dot -0.226; [6d6973a3-6fd7-4389-802f-6cd85165bd7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -123.06906107602668, -123.06905474174884, -12.526727073921306, -6.579375995970649
LBFGS Accumulation History: 3 points
Removed measurement 29063c76 to history. Total: 4
Removed measurement 17d204c8 to history. Total: 3
th(0)=-123.06906107602668;dx=-0.0068354452413637076
WOLFE (weak): th(3.6041203318226656E-7)=-123.06906107602668; dx=-0.006848147409638168 evalInputDelta=0.0
WOLFE (weak): th(7.208240663645331E-7)=-123.06906107602668; dx=-0.0068460952717482 evalInputDelta=0.0
Armijo: th(2.1624721990935994E-6)=-123.06904840747067; dx=-0.006843776906027868 evalInputDelta=-1.2668556010453358E-5
Armijo: th(1.4416481327290662E-6)=-123.06904840747067; dx=-0.006801606041030327 evalInputDelta=-1.2668556010453358E-5
WOLFE (weak): th(1.0812360995467997E-6)=-123.06906107602668; dx=-0.0068438412947093505 evalInputDelta=0.0
WOLFE (weak): th(1.261442116137933E-6)=-123.06906107602668; dx=-0.006788104540699366 evalInputDelta=0.0
Armijo: th(1.3515451244334995E-6)=-123.06905474174884; dx=-0.006840431416703915 evalInputDelta=-6.33427784180185E-6
Armijo: th(1.3064936202857163E-6)=-123.06905474174884; dx=-0.006850946700595011 evalInputDelta=-6.33427784180185E-6
Armijo: th(1.2839678682118245E-6)=-123.06905474174884; dx=-0.006837231215362871 evalInputDelta=-6.33427784180185E-6
Armijo: th(1.2727049921748789E-6)=-123.06905474174884; dx=-0.006846272633804254 evalInputDelta=-6.33427784180185E-6
Armijo: th(1.267073554156406E-6)=-123.06905474174884; dx=-0.0067062615503437496 evalInputDelta=-6.33427784180185E-6
Armijo: th(1.2642578351471694E-6)=-123.06905474174884; dx=-0.006812725403471681 evalInputDelta=-6.33427784180185E-6
Armijo: th(1.2628499756425513E-6)=-123.06905474174884; dx=-0.006794662397510123 evalInputDelta=-6.33427784180185E-6
WOLFE (weak): th(1.262146045890242E-6)=-123.06906107602668; dx=-0.0067887722957355075 evalInputDelta=0.0
WOLFE (weak): th(1.2624980107663966E-6)=-123.06906107602668; dx=-0.006755112039171146 evalInputDelta=0.0
WOLFE (weak): th(1.262673993204474E-6)=-123.06906107602668; dx=-0.0068450285546572355 evalInputDelta=0.0
Armijo: th(1.2627619844235126E-6)=-123.06905474174884; dx=-0.006836798353052677 evalInputDelta=-6.33427784180185E-6
WOLFE (weak): th(1.2627179888139934E-6)=-123.06906107602668; dx=-0.006825743717121286 evalInputDelta=0.0
Armijo: th(1.2627399866187531E-6)=-123.06905474174884; dx=-0.006846061908672093 evalInputDelta=-6.33427784180185E-6
WOLFE (weak): th(1.2627289877163733E-6)=-123.06906107602668; dx=-0.0067718541268323666 evalInputDelta=0.0
mu ~= nu (1.2627289877163733E-6): th(0.0)=-123.06906107602668
Fitness changed from -123.06906107602668 to -123.06906107602668
Static Iteration Total: 28.7772; Orientation: 1.0295; Line Search: 26.5963
Iteration 13 failed. Error: -123.06906107602668
Previous Error: 0.0 -> -123.06906107602668
Retrying iteration 13
Reset training subject: 12267972316209
Adding measurement 6d25fd12 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-123.06906107602668;dx=-0.00668804873026182
Armijo: th(2.7204789834534186E-6)=-123.06905474174884; dx=-0.006694791984207144 evalInputDelta=-6.33427784180185E-6
Armijo: th(1.3602394917267093E-6)=-123.06905474174884; dx=-0.006698330600811297 evalInputDelta=-6.33427784180185E-6
WOLFE (weak): th(4.534131639089031E-7)=-123.06906107602668; dx=-0.006709276976925005 evalInputDelta=0.0
WOLFE (weak): th(9.068263278178062E-7)=-123.06906107602668; dx=-0.006703643954969462 evalInputDelta=0.0
WOLFE (weak): th(1.1335329097722578E-6)=-123.06906107602668; dx=-0.0066874693104595605 evalInputDelta=0.0
WOLFE (weak): th(1.2468862007494835E-6)=-123.06906107602668; dx=-0.006637840694772086 evalInputDelta=0.0
Armijo: th(1.3035628462380965E-6)=-123.06905474174884; dx=-0.0067097849969548345 evalInputDelta=-6.33427784180185E-6
Armijo: th(1.27522452349379E-6)=-123.06905474174884; dx=-0.006679135852712219 evalInputDelta=-6.33427784180185E-6
WOLFE (weak): th(1.2610553621216366E-6)=-123.06906107602668; dx=-0.006699776342052146 evalInputDelta=0.0
Armijo: th(1.2681399428077133E-6)=-123.06905474174884; dx=-0.0066333429503202535 evalInputDelta=-6.33427784180185E-6
Armijo: th(1.264597652464675E-6)=-123.06905474174884; dx=-0.006634715365228148 evalInputDelta=-6.33427784180185E-6
Armijo: th(1.2628265072931557E-6)=-123.06905474174884; dx=-0.006673323294018115 evalInputDelta=-6.33427784180185E-6
WOLFE (weak): th(1.2619409347073962E-6)=-123.06906107602668; dx=-0.006670284790032836 evalInputDelta=0.0
WOLFE (weak): th(1.2623837210002758E-6)=-123.06906107602668; dx=-0.006687545791822921 evalInputDelta=0.0
WOLFE (weak): th(1.2626051141467158E-6)=-123.06906107602668; dx=-0.006655917712536055 evalInputDelta=0.0
WOLFE (weak): th(1.2627158107199358E-6)=-123.06906107602668; dx=-0.006703507296168266 evalInputDelta=0.0
Armijo: th(1.2627711590065458E-6)=-123.06905474174884; dx=-0.006644249539561859 evalInputDelta=-6.33427784180185E-6
Armijo: th(1.262743484863241E-6)=-123.06905474174884; dx=-0.006691232427910466 evalInputDelta=-6.33427784180185E-6
WOLFE (weak): th(1.2627296477915884E-6)=-123.06906107602668; dx=-0.006696391591585512 evalInputDelta=0.0
Armijo: th(1.2627365663274147E-6)=-123.06905474174884; dx=-0.006542736236313624 evalInputDelta=-6.33427784180185E-6
mu ~= nu (1.2627296477915884E-6): th(0.0)=-123.06906107602668
Fitness changed from -123.06906107602668 to -123.06906107602668
Static Iteration Total: 29.3964; Orientation: 0.0188; Line Search: 26.5509
Iteration 14 failed. Error: -123.06906107602668
Previous Error: 0.0 -> -123.06906107602668
Optimization terminated 14
Final threshold in iteration 14: -123.06906107602668 (> -Infinity) after 172.159s (< 3600.000s)

Returns

    -123.06906107602668