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.94 seconds (3.529 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: 3221473590555
Reset training subject: 3223013936693
Adding measurement 5766ec8d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.328758936184862;dx=-4.974364543765811E-5
New Minimum: -2.328758936184862 > -2.3288813984712644
WOLFE (weak): th(2.154434690031884)=-2.3288813984712644; dx=-4.96756876615097E-5 evalInputDelta=1.2246228640222512E-4
New Minimum: -2.3288813984712644 > -2.3290049099442913
WOLFE (weak): th(4.308869380063768)=-2.3290049099442913; dx=-4.969498830977033E-5 evalInputDelta=2.459737594291411E-4
New Minimum: -2.3290049099442913 > -2.329496911470686
WOLFE (weak): th(12.926608140191302)=-2.329496911470686; dx=-4.958176514468101E-5 evalInputDelta=7.379752858236444E-4
New Minimum: -2.329496911470686 > -2.3317089087332588
WOLFE (weak): th(51.70643256076521)=-2.3317089087332588; dx=-4.9920189114007125E-5 evalInputDelta=0.0029499725483965733
New Minimum: -2.3317089087332588 > -2.343529627392023
WOLFE (weak): th(258.53216280382605)=-2.343529627392023; dx=-5.0122780395067516E-5 evalInputDelta=0.014770691207160791
New Minimum: -2.343529627392023 > -2.417017324977132
WOLFE (weak): th(1551.1929768229563)=-2.417017324977132; dx=-4.9108351547505805E-5 evalInputDelta=0.08825838879226966
New Minimum: -2.417017324977132 > -2.8656318958109965
END: th(10858.350837760694)=-2.8656318958109965; dx=-3.696919157839688E-5 evalInputDelta=0.5368729596261343
Fitness changed from -2.328758936184862 to -2.8656318958109965
Iteration 1 complete. Error: -2.8656318958109965 Total: 15.3403; Orientation: 0.0186; Line Search: 11.0934
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/edc2ba3d-a2d7-48d5-a006-4007f418481d.jpg)
Adding measurement 66fdeee7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-2.8656318958109965;dx=-6.383636224340891E-5
New Minimum: -2.8656318958109965 > -3.687104540123325
END: th(23393.607721408407)=-3.687104540123325; dx=-6.706088897592744E-6 evalInputDelta=0.8214726443123284
Fitness changed from -2.8656318958109965 to -3.687104540123325
Iteration 2 complete. Error: -3.687104540123325 Total: 4.2627; Orientation: 0.0164; Line Search: 2.7892
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/9e86992c-b6a2-4728-89a6-cf93fc4d0144.jpg)
Adding measurement 41c50af9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-3.687104540123325;dx=-2.6622821388992235E-4
Armijo: th(50400.00000000001)=-3.595206124995762; dx=2.354145454198526E-5 evalInputDelta=-0.09189841512756303
New Minimum: -3.687104540123325 > -4.6250069994253264
END: th(25200.000000000004)=-4.6250069994253264; dx=-2.0001079378602884E-5 evalInputDelta=0.9379024593020016
Fitness changed from -3.687104540123325 to -4.6250069994253264
Iteration 3 complete. Error: -4.6250069994253264 Total: 5.8297; Orientation: 0.0163; Line Search: 4.2050
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b4915423-178e-4189-8836-dff1f312418f.jpg)
Adding measurement 6076d451 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.464e+03, gradient 1.542e-02, dot -0.253; [186c3ecc-89a1-42b3-8159-04296b4079c6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.6250069994253264, -3.687104540123325, -2.8656318958109965, -2.328758936184862
LBFGS Accumulation History: 3 points
Removed measurement 6076d451 to history. Total: 3
th(0)=-4.6250069994253264;dx=-2.2923111544636432E-4
Armijo: th(54291.75418880348)=-1.291014942827889; dx=1.4994023214514657E-5 evalInputDelta=-3.3339920565974372
Armijo: th(27145.87709440174)=-3.8559716256216556; dx=5.890848675319179E-5 evalInputDelta=-0.7690353738036708
New Minimum: -4.6250069994253264 > -5.726319675961139
END: th(9048.625698133914)=-5.726319675961139; dx=-5.742503064980459E-5 evalInputDelta=1.1013126765358123
Fitness changed from -4.6250069994253264 to -5.726319675961139
Iteration 4 complete. Error: -5.726319675961139 Total: 7.5073; Orientation: 0.4723; Line Search: 5.5450
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/06ba129e-94cc-49f5-a5fa-29c092d14dd2.jpg)
Adding measurement 1d0f348c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.890e+03, gradient 1.846e-02, dot -0.171; [186c3ecc-89a1-42b3-8159-04296b4079c6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.726319675961139, -3.687104540123325, -2.8656318958109965, -2.328758936184862
LBFGS Accumulation History: 3 points
Removed measurement 1d0f348c to history. Total: 3
th(0)=-5.726319675961139;dx=-3.380914747288667E-4
New Minimum: -5.726319675961139 > -5.990650402789079
WOLF (strong): th(19494.673101173677)=-5.990650402789079; dx=2.2026547134460085E-5 evalInputDelta=0.26433072682794023
New Minimum: -5.990650402789079 > -6.682173060931917
END: th(9747.336550586839)=-6.682173060931917; dx=-1.4460248644070755E-5 evalInputDelta=0.9558533849707782
Fitness changed from -5.726319675961139 to -6.682173060931917
Iteration 5 complete. Error: -6.682173060931917 Total: 6.1184; Orientation: 0.4625; Line Search: 4.1840
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/03c50cf1-c202-4e41-80cd-22dd2de49662.jpg)
Adding measurement 57a558d9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.449e+03, gradient 1.773e-02, dot -0.181; [186c3ecc-89a1-42b3-8159-04296b4079c6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.682173060931917, -3.687104540123325, -2.8656318958109965, -2.328758936184862
LBFGS Accumulation History: 3 points
Removed measurement 57a558d9 to history. Total: 3
th(0)=-6.682173060931917;dx=-3.059190851493264E-4
Armijo: th(21000.000000000007)=-6.585102556769453; dx=3.9063872862134136E-5 evalInputDelta=-0.09707050416246421
New Minimum: -6.682173060931917 > -7.580737505287692
END: th(10500.000000000004)=-7.580737505287692; dx=-1.5017679769519534E-5 evalInputDelta=0.8985644443557748
Fitness changed from -6.682173060931917 to -7.580737505287692
Iteration 6 complete. Error: -7.580737505287692 Total: 6.7538; Orientation: 0.4852; Line Search: 4.7849
Adding measurement 1a4bc7b2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.992e+03, gradient 1.763e-02, dot -0.146; [186c3ecc-89a1-42b3-8159-04296b4079c6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.580737505287692, -3.687104540123325, -2.8656318958109965, -2.328758936184862
LBFGS Accumulation History: 3 points
Removed measurement 1a4bc7b2 to history. Total: 3
th(0)=-7.580737505287692;dx=-3.0250105177016915E-4
Armijo: th(22621.564245334786)=-5.646828876030703; dx=8.113656512673191E-5 evalInputDelta=-1.9339086292569885
New Minimum: -7.580737505287692 > -8.311518719084674
WOLF (strong): th(11310.782122667393)=-8.311518719084674; dx=2.3535703063185196E-5 evalInputDelta=0.7307812137969822
New Minimum: -8.311518719084674 > -8.491835744033
END: th(3770.2607075557976)=-8.491835744033; dx=-1.7515931175748054E-4 evalInputDelta=0.9110982387453088
Fitness changed from -7.580737505287692 to -8.491835744033
Iteration 7 complete. Error: -8.491835744033 Total: 7.3493; Orientation: 0.4796; Line Search: 5.5437
Adding measurement 50d9df4c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.686e+03, gradient 1.688e-02, dot -0.222; [186c3ecc-89a1-42b3-8159-04296b4079c6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.491835744033, -3.687104540123325, -2.8656318958109965, -2.328758936184862
LBFGS Accumulation History: 3 points
Removed measurement 50d9df4c to history. Total: 3
th(0)=-8.491835744033;dx=-2.8241367595904494E-4
New Minimum: -8.491835744033 > -9.319034546520854
END: th(8122.780458822365)=-9.319034546520854; dx=-3.952128525665162E-5 evalInputDelta=0.8271988024878532
Fitness changed from -8.491835744033 to -9.319034546520854
Iteration 8 complete. Error: -9.319034546520854 Total: 4.6020; Orientation: 0.4727; Line Search: 2.7808
Adding measurement 4b14ee74 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.460e+03, gradient 2.024e-02, dot -0.153; [186c3ecc-89a1-42b3-8159-04296b4079c6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.319034546520854, -3.687104540123325, -2.8656318958109965, -2.328758936184862
LB

...skipping 27698 bytes...

7552451378777423E-7)=-25.246844476348702; dx=-2.5319501331333374 evalInputDelta=0.0
Armijo: th(3.732064612335287E-7)=-25.246842918256267; dx=-2.563395545429079 evalInputDelta=-1.5580924355163006E-6
Armijo: th(3.72047434956406E-7)=-25.246844476348702; dx=-2.5025474029525236 evalInputDelta=0.0
Armijo: th(3.7146792181784457E-7)=-25.246844476348702; dx=-2.517841143657644 evalInputDelta=0.0
Armijo: th(3.7117816524856386E-7)=-25.246844476348702; dx=-2.350871725305153 evalInputDelta=0.0
Armijo: th(3.7103328696392356E-7)=-25.246844476348702; dx=-2.477107029921177 evalInputDelta=0.0
Armijo: th(3.709608478216034E-7)=-25.246844476348702; dx=-2.4307718272371863 evalInputDelta=0.0
Armijo: th(3.709246282504433E-7)=-25.246844476348702; dx=-2.52476091306826 evalInputDelta=0.0
Armijo: th(3.709065184648633E-7)=-25.246844476348702; dx=-2.477182124639292 evalInputDelta=0.0
Armijo: th(3.7089746357207327E-7)=-25.246842918256267; dx=-2.55865430133888 evalInputDelta=-1.5580924355163006E-6
Armijo: th(3.708929361256782E-7)=-25.246842918256267; dx=-2.4958781808585497 evalInputDelta=-1.5580924355163006E-6
Armijo: th(3.708906724024807E-7)=-25.246844476348702; dx=-2.5006250033582633 evalInputDelta=0.0
mu ~= nu (3.708884086792832E-7): th(2.9671072694342657E-7)=-25.246846813487174
Fitness changed from -25.246844476348702 to -25.246846813487174
Iteration 30 complete. Error: -25.246846813487174 Total: 45.6627; Orientation: 0.5686; Line Search: 43.7545
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/0895122d-e398-40ab-84cf-15181571e680.jpg)
Adding measurement 389b2abd to history. Total: 5
Rejected: LBFGS Orientation magnitude: 4.326e+09, gradient 3.008e-02, dot -0.011; [186c3ecc-89a1-42b3-8159-04296b4079c6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.246846813487174, -25.246844476348702, -24.103839534530426, -3.687104540123325, -2.8656318958109965, -2.328758936184862
Rejected: LBFGS Orientation magnitude: 1.150e+10, gradient 3.008e-02, dot -0.089; [186c3ecc-89a1-42b3-8159-04296b4079c6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.246846813487174, -25.246844476348702, -24.103839534530426, -3.687104540123325, -2.8656318958109965
Accepted: LBFGS Orientation magnitude: 1.324e+10, gradient 3.008e-02, dot 0.176; [186c3ecc-89a1-42b3-8159-04296b4079c6 = 1.000/1.000e+00]
Overwriting history with 4 points
th(0)=-25.246846813487174;dx=-6.937082157735343E7
Armijo: th(7.990572923112629E-7)=-2.8872756033027427; dx=2351071.539990319 evalInputDelta=-22.35957121018443
Armijo: th(3.9952864615563144E-7)=-7.092999871684138; dx=4428002.463276077 evalInputDelta=-18.153846941803035
Armijo: th(1.3317621538521048E-7)=-18.129336911968025; dx=1.2687335607778352E7 evalInputDelta=-7.117509901519149
Armijo: th(3.329405384630262E-8)=-24.890610771522958; dx=-1.0770689824207002E7 evalInputDelta=-0.3562360419642161
New Minimum: -25.246846813487174 > -25.443374554283515
END: th(6.658810769260524E-9)=-25.443374554283515; dx=-5.040236512565838E7 evalInputDelta=0.19652774079634128
Fitness changed from -25.246846813487174 to -25.443374554283515
Iteration 31 complete. Error: -25.443374554283515 Total: 11.5225; Orientation: 1.6821; Line Search: 8.3547
Adding measurement 57a2cb08 to history. Total: 4
Accepted: LBFGS Orientation magnitude: 9.470e+09, gradient 3.189e-02, dot 0.120; [186c3ecc-89a1-42b3-8159-04296b4079c6 = 1.000/1.000e+00]
th(0)=-25.443374554283515;dx=-3.629234656128822E7
Armijo: th(1.4345972915652766E-8)=-25.438541119914863; dx=-1.9703436236813404E7 evalInputDelta=-0.004833434368652689
New Minimum: -25.443374554283515 > -25.48808512717958
END: th(7.172986457826383E-9)=-25.48808512717958; dx=-2.7630396049249023E7 evalInputDelta=0.04471057289606506
Fitness changed from -25.443374554283515 to -25.48808512717958
Iteration 32 complete. Error: -25.48808512717958 Total: 6.0802; Orientation: 0.5597; Line Search: 4.1611
Adding measurement 435011cd to history. Total: 5
Accepted: LBFGS Orientation magnitude: 6.897e+09, gradient 3.274e-02, dot 0.085; [186c3ecc-89a1-42b3-8159-04296b4079c6 = 1.000/1.000e+00]
th(0)=-25.48808512717958;dx=-2.007041598796613E7
Armijo: th(1.5453730855870086E-8)=-25.378446199397914; dx=-1.2676437870814648E7 evalInputDelta=-0.10963892778166695
Armijo: th(7.726865427935043E-9)=-25.457236593454073; dx=-1.5053472199046584E7 evalInputDelta=-0.03084853372550711
Armijo: th(2.575621809311681E-9)=-25.485567806697404; dx=-1.8384697615643658E7 evalInputDelta=-0.002517320482176899
Armijo: th(6.439054523279202E-10)=-25.487918445343038; dx=-1.900209488827157E7 evalInputDelta=-1.6668183654289237E-4
Armijo: th(1.2878109046558405E-10)=-25.488043456822634; dx=-1.9906674708098955E7 evalInputDelta=-4.1670356946355014E-5
MIN ALPHA (2.146351507759734E-11): th(0.0)=-25.48808512717958
Fitness changed from -25.48808512717958 to -25.48808512717958
Static Iteration Total: 12.2521; Orientation: 0.7849; Line Search: 9.6486
Iteration 33 failed. Error: -25.48808512717958
Previous Error: 0.0 -> -25.48808512717958
Retrying iteration 33
Reset training subject: 3543796530662
Adding measurement 46b395d0 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-25.48808512717958;dx=-0.0010612290215728701
WOLFE (weak): th(2.1544346900318838E-10)=-25.48808512717958; dx=-0.0010657204959243008 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-25.48808512717958; dx=-0.001066256876750499 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-25.48808512717958; dx=-0.0010664010112930186 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-25.48808512717958; dx=-0.0010644663917354468 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-25.48808512717958; dx=-0.0010623469569943445 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-25.48808512717958; dx=-0.0010671547283318068 evalInputDelta=0.0
WOLFE (weak): th(1.0858350837760695E-6)=-25.48808512717958; dx=-0.0010670045070179338 evalInputDelta=0.0
Armijo: th(8.686680670208556E-6)=-25.48808358383424; dx=-0.001066105067400798 evalInputDelta=-1.5433453413038478E-6
WOLFE (weak): th(4.886257876992313E-6)=-25.48808512717958; dx=-0.0010657806605609372 evalInputDelta=0.0
WOLFE (weak): th(6.7864692736004345E-6)=-25.48808512717958; dx=-0.0010665332090864402 evalInputDelta=0.0
WOLFE (weak): th(7.736574971904495E-6)=-25.48808512717958; dx=-0.001065894113359748 evalInputDelta=0.0
WOLFE (weak): th(8.211627821056525E-6)=-25.48808512717958; dx=-0.0010663820973661204 evalInputDelta=0.0
Armijo: th(8.44915424563254E-6)=-25.48808512717958; dx=-0.001064040490231561 evalInputDelta=0.0
WOLFE (weak): th(8.330391033344532E-6)=-25.48808512717958; dx=-0.0010629261266077773 evalInputDelta=0.0
Armijo: th(8.389772639488536E-6)=-25.48808512717958; dx=-0.0010600763620290533 evalInputDelta=0.0
WOLFE (weak): th(8.360081836416534E-6)=-25.48808512717958; dx=-0.0010644841142773333 evalInputDelta=0.0
Armijo: th(8.374927237952535E-6)=-25.48808512717958; dx=-0.0010662294267313292 evalInputDelta=0.0
WOLFE (weak): th(8.367504537184534E-6)=-25.48808512717958; dx=-0.0010663921764634643 evalInputDelta=0.0
Armijo: th(8.371215887568535E-6)=-25.48808512717958; dx=-0.0010617989761178893 evalInputDelta=0.0
Armijo: th(8.369360212376536E-6)=-25.48808512717958; dx=-0.001060354346017505 evalInputDelta=0.0
WOLFE (weak): th(8.368432374780536E-6)=-25.48808512717958; dx=-0.0010662179100000692 evalInputDelta=0.0
WOLFE (weak): th(8.368896293578536E-6)=-25.48808512717958; dx=-0.0010626893903431115 evalInputDelta=0.0
WOLFE (weak): th(8.369128252977536E-6)=-25.48808512717958; dx=-0.0010663997316104784 evalInputDelta=0.0
WOLFE (weak): th(8.369244232677035E-6)=-25.48808512717958; dx=-0.001064920206422253 evalInputDelta=0.0
WOLFE (weak): th(8.369302222526785E-6)=-25.48808512717958; dx=-0.0010656211674721396 evalInputDelta=0.0
mu ~= nu (8.369302222526785E-6): th(0.0)=-25.48808512717958
Fitness changed from -25.48808512717958 to -25.48808512717958
Static Iteration Total: 40.6186; Orientation: 0.0167; Line Search: 37.9374
Iteration 34 failed. Error: -25.48808512717958
Previous Error: 0.0 -> -25.48808512717958
Optimization terminated 34
Final threshold in iteration 34: -25.48808512717958 (> -Infinity) after 362.942s (< 3600.000s)

Returns

    -25.48808512717958