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

BasicOptimizer.scala:89 executed in 190.61 seconds (2.304 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: 1558462707397
Reset training subject: 1559550137532
Adding measurement 3f3226f3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.58312481222735;dx=-7.670727380309373E-5
New Minimum: -2.58312481222735 > -2.5832787300059294
WOLFE (weak): th(2.154434690031884)=-2.5832787300059294; dx=-7.672406288706262E-5 evalInputDelta=1.5391777857942657E-4
New Minimum: -2.5832787300059294 > -2.5834320296962052
WOLFE (weak): th(4.308869380063768)=-2.5834320296962052; dx=-7.670582111930423E-5 evalInputDelta=3.072174688552032E-4
New Minimum: -2.5834320296962052 > -2.5840471160252036
WOLFE (weak): th(12.926608140191302)=-2.5840471160252036; dx=-7.67355320575942E-5 evalInputDelta=9.223037978536297E-4
New Minimum: -2.5840471160252036 > -2.5868120543864292
WOLFE (weak): th(51.70643256076521)=-2.5868120543864292; dx=-7.654568122184279E-5 evalInputDelta=0.0036872421590792293
New Minimum: -2.5868120543864292 > -2.6014739927729704
WOLFE (weak): th(258.53216280382605)=-2.6014739927729704; dx=-7.579811648188121E-5 evalInputDelta=0.018349180545620403
New Minimum: -2.6014739927729704 > -2.6921550415910325
WOLFE (weak): th(1551.1929768229563)=-2.6921550415910325; dx=-7.173486138314651E-5 evalInputDelta=0.10903022936368245
New Minimum: -2.6921550415910325 > -3.180899373262732
END: th(10858.350837760694)=-3.180899373262732; dx=-3.7966340634232764E-5 evalInputDelta=0.597774561035382
Fitness changed from -2.58312481222735 to -3.180899373262732
Iteration 1 complete. Error: -3.180899373262732 Total: 12.1097; Orientation: 0.0193; Line Search: 8.8957
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/78659871-80e3-4934-8b8c-97af2d88bdc1.jpg)
Adding measurement 65692b72 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-3.180899373262732;dx=-6.168862359030131E-5
New Minimum: -3.180899373262732 > -3.865439521290227
END: th(23393.607721408407)=-3.865439521290227; dx=-7.859942308114664E-6 evalInputDelta=0.6845401480274949
Fitness changed from -3.180899373262732 to -3.865439521290227
Iteration 2 complete. Error: -3.865439521290227 Total: 3.3133; Orientation: 0.0197; Line Search: 2.2061
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/26981278-6e71-4133-9cd1-17d953b3b3b5.jpg)
Adding measurement 454a4ec1 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-3.865439521290227;dx=-9.585140414190735E-5
New Minimum: -3.865439521290227 > -4.892374636522036
WOLF (strong): th(50400.00000000001)=-4.892374636522036; dx=1.3145789225661738E-7 evalInputDelta=1.0269351152318094
END: th(25200.000000000004)=-4.715347456960357; dx=-1.7985291474228564E-5 evalInputDelta=0.8499079356701302
Fitness changed from -3.865439521290227 to -4.892374636522036
Iteration 3 complete. Error: -4.892374636522036 Total: 4.4443; Orientation: 0.0198; Line Search: 3.3302
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1efa387d-0de0-49ed-b871-5c8068c470a3.jpg)
Adding measurement 535698f1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.197e+03, gradient 1.650e-02, dot -0.245; [7cc2d98a-e630-445e-8ca0-bf2bdcb44a4a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.892374636522036, -3.865439521290227, -3.180899373262732, -2.58312481222735
LBFGS Accumulation History: 3 points
Removed measurement 535698f1 to history. Total: 3
th(0)=-4.892374636522036;dx=-2.71863631612713E-4
New Minimum: -4.892374636522036 > -6.5738716115632885
WOLF (strong): th(54291.75418880348)=-6.5738716115632885; dx=1.71223339207409E-5 evalInputDelta=1.6814969750412523
New Minimum: -6.5738716115632885 > -6.991805374251453
END: th(27145.87709440174)=-6.991805374251453; dx=-6.016091225041064E-6 evalInputDelta=2.099430737729417
Fitness changed from -4.892374636522036 to -6.991805374251453
Iteration 4 complete. Error: -6.991805374251453 Total: 4.8919; Orientation: 0.4496; Line Search: 3.3312
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/42bd718f-f339-433b-9c5b-04728e4015b9.jpg)
Adding measurement 7041e0e7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.739e+03, gradient 1.931e-02, dot -0.200; [7cc2d98a-e630-445e-8ca0-bf2bdcb44a4a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.991805374251453, -3.865439521290227, -3.180899373262732, -2.58312481222735
LBFGS Accumulation History: 3 points
Removed measurement 7041e0e7 to history. Total: 3
th(0)=-6.991805374251453;dx=-3.7270297234579485E-4
New Minimum: -6.991805374251453 > -8.269318492554929
WOLF (strong): th(58484.01930352103)=-8.269318492554929; dx=1.0787032759665721E-5 evalInputDelta=1.2775131183034754
New Minimum: -8.269318492554929 > -8.855523022932426
WOLF (strong): th(29242.009651760516)=-8.855523022932426; dx=1.0949876334707244E-5 evalInputDelta=1.8637176486809723
END: th(9747.336550586839)=-8.798047833866745; dx=-7.720229623752194E-5 evalInputDelta=1.8062424596152917
Fitness changed from -6.991805374251453 to -8.855523022932426
Iteration 5 complete. Error: -8.855523022932426 Total: 5.9439; Orientation: 0.4425; Line Search: 4.4214
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/bcc0ad05-5da5-4884-ab96-cdecc6d6ef3c.jpg)
Adding measurement 4380a94f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.570e+03, gradient 2.195e-02, dot -0.158; [7cc2d98a-e630-445e-8ca0-bf2bdcb44a4a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.855523022932426, -3.865439521290227, -3.180899373262732, -2.58312481222735
LBFGS Accumulation History: 3 points
Removed measurement 4380a94f to history. Total: 3
th(0)=-8.855523022932426;dx=-4.814503984407309E-4
New Minimum: -8.855523022932426 > -12.18259262879843
END: th(21000.000000000007)=-12.18259262879843; dx=-5.624796022800158E-6 evalInputDelta=3.3270696058660043
Fitness changed from -8.855523022932426 to -12.18259262879843
Iteration 6 complete. Error: -12.18259262879843 Total: 3.7381; Orientation: 0.4389; Line Search: 2.2023
Adding measurement 39a962eb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.533e+03, gradient 2.308e-02, dot -0.181; [7cc2d98a-e630-445e-8ca0-bf2bdcb44a4a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.18259262879843, -3.865439521290227, -3.180899373262732, -2.58312481222735
LBFGS Accumulation History: 3 points
Removed measurement 39a962eb to history. Total: 3
th(0)=-12.18259262879843;dx=-5.318205982130764E-4
New Minimum: -12.18259262879843 > -12.373532364509567
WOLF (strong): th(45243.12849066957)=-12.373532364509567; dx=4.139162644294962E-5 evalInputDelta=0.19093973571113665
New Minimum: -12.373532364509567 > -13.924875692115934
WOLF (strong): th(22621.564245334786)=-13.924875692115934; dx=5.448086463383947E-5 evalInputDelta=1.7422830633175046
New Minimum: -13.924875692115934 > -14.36712873790496
END: th(7540.521415111595)=-14.36712873790496; dx=-1.0360254658026793E-4 evalInputDelta=2.1845361091065296
Fitness changed from -12.18259262879843 to -14.36712873790496
Iteration 7 complete. Error: -14.36712873790496 Total: 5.9251; Orientation: 0.4507; Line Search: 4.4339
Adding measurement 4c3d8487 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.719e+04, gradient 1.985e-02, dot -0.200; [7cc2d98a-e630-445e-8ca0-bf2bdcb44a4a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.36712873790496, -3.865439521290227, -3.180899373262732, -2.58312481222735
LBFGS Accumulation History: 3 points
Removed measurement 4c3d8487 to history. Total: 3
th(0)=-14.36712873790496;dx=-3.931676374149878E-4
New Minimum: -14.36712873790496 > -16.001558230057316
END: th(16245.56091764473)=-16.001558230057316; dx=-2.8657285917156023E-5 evalInputDelta=1.634429492152357
Fitness changed from -14.36712873790496 to -16.001558230057316
Iteration 8 complete. Error: -16.001558230057316 Total: 3.7396; Orientation: 0.4374; Line Search: 2.2439
Adding measurement 471df620 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.717e+04, gradient 2.756e-02, dot -0.151; [7cc2d98a-e630-445e-8ca0-bf2bdcb44a4a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.001558230057316, -3.865439521290227, -3.180899373262732, -

...skipping 11718 bytes...

m: -40.59663724953225 > -40.62096711309971
WOLF (strong): th(0.022547369330678406)=-40.62096711309971; dx=0.40501141283437475 evalInputDelta=0.027949536466934433
WOLFE (weak): th(0.007515789776892802)=-40.60388306586658; dx=-0.34193785177444547 evalInputDelta=0.010865489233808034
WOLFE (weak): th(0.015031579553785604)=-40.61429945085755; dx=-0.3196114996812452 evalInputDelta=0.02128187422477623
WOLF (strong): th(0.018789474442232005)=-40.618686846193; dx=0.06599598289415992 evalInputDelta=0.025669269560225416
END: th(0.016910526998008803)=-40.616822880766456; dx=-0.05172180655877229 evalInputDelta=0.023805304133681204
Fitness changed from -40.593017576632775 to -40.62096711309971
Iteration 19 complete. Error: -40.62096711309971 Total: 9.5603; Orientation: 0.6452; Line Search: 7.8595
Adding measurement 7ed05330 to history. Total: 6
Rejected: LBFGS Orientation magnitude: 3.052e+05, gradient 2.640e-02, dot -0.030; [7cc2d98a-e630-445e-8ca0-bf2bdcb44a4a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.62096711309971, -40.593017576632775, -40.574605446148446, -37.549127007173254, -3.865439521290227, -3.180899373262732, -2.58312481222735
Rejected: LBFGS Orientation magnitude: 4.152e+05, gradient 2.640e-02, dot -0.034; [7cc2d98a-e630-445e-8ca0-bf2bdcb44a4a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.62096711309971, -40.593017576632775, -40.574605446148446, -37.549127007173254, -3.865439521290227, -3.180899373262732
Accepted: LBFGS Orientation magnitude: 4.803e+05, gradient 2.640e-02, dot 0.051; [7cc2d98a-e630-445e-8ca0-bf2bdcb44a4a = 1.000/1.000e+00]
Overwriting history with 5 points
th(0)=-40.62096711309971;dx=-650.8080496226576
Armijo: th(0.0364326259912309)=-14.014519705751347; dx=111.10760890642275 evalInputDelta=-26.606447407348362
Armijo: th(0.01821631299561545)=-20.94686218190945; dx=313.9750517554394 evalInputDelta=-19.67410493119026
Armijo: th(0.0060721043318718165)=-34.363137470702384; dx=489.50589561133097 evalInputDelta=-6.257829642397326
Armijo: th(0.0015180260829679541)=-40.270643682905465; dx=85.81175242097459 evalInputDelta=-0.35032343019424417
New Minimum: -40.62096711309971 > -40.7176330764804
END: th(3.036052165935908E-4)=-40.7176330764804; dx=-402.27555532128184 evalInputDelta=0.09666596338069411
Fitness changed from -40.62096711309971 to -40.7176330764804
Iteration 20 complete. Error: -40.7176330764804 Total: 11.0140; Orientation: 2.9901; Line Search: 6.9614
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>![Iteration 20](etc/2704fcf0-d3d0-49df-9e64-57d68f71cc1e.jpg)
Adding measurement 7a58f2fa to history. Total: 5
Accepted: LBFGS Orientation magnitude: 2.570e+05, gradient 2.761e-02, dot 0.043; [7cc2d98a-e630-445e-8ca0-bf2bdcb44a4a = 1.000/1.000e+00]
th(0)=-40.7176330764804;dx=-303.22600379920686
Armijo: th(6.540976107038758E-4)=-40.699873481758765; dx=-132.1847943069671 evalInputDelta=-0.017759594721638905
New Minimum: -40.7176330764804 > -40.723280097273474
END: th(3.270488053519379E-4)=-40.723280097273474; dx=-166.25052853743534 evalInputDelta=0.005647020793070112
Fitness changed from -40.7176330764804 to -40.723280097273474
Iteration 21 complete. Error: -40.723280097273474 Total: 5.1160; Orientation: 0.6913; Line Search: 3.3409
Adding measurement 2f7abdd6 to history. Total: 6
Accepted: LBFGS Orientation magnitude: 2.191e+05, gradient 2.821e-02, dot 0.036; [7cc2d98a-e630-445e-8ca0-bf2bdcb44a4a = 1.000/1.000e+00]
th(0)=-40.723280097273474;dx=-221.07011318138828
Armijo: th(7.046052915837002E-4)=-40.664966071126685; dx=-90.28102818092465 evalInputDelta=-0.05831402614678893
Armijo: th(3.523026457918501E-4)=-40.703400791304226; dx=-120.69942365505901 evalInputDelta=-0.019879305969247696
Armijo: th(1.1743421526395003E-4)=-40.71901276243444; dx=-134.17660855349416 evalInputDelta=-0.004267334839035186
Armijo: th(2.9358553815987508E-5)=-40.722507510415774; dx=-140.75940672354062 evalInputDelta=-7.725868576997641E-4
Armijo: th(5.871710763197501E-6)=-40.723118164282226; dx=-142.63446364366087 evalInputDelta=-1.619329912472267E-4
Armijo: th(9.786184605329168E-7)=-40.723262791488345; dx=-142.72729218374883 evalInputDelta=-1.730578512848524E-5
Armijo: th(1.3980263721898812E-7)=-40.72327391663677; dx=-143.70871532582973 evalInputDelta=-6.180636702879383E-6
Armijo: th(1.7475329652373515E-8)=-40.72327762501891; dx=-142.9483438356844 evalInputDelta=-2.4722545646227445E-6
Armijo: th(1.941703294708168E-9)=-40.723280097273474; dx=-143.1512328502131 evalInputDelta=0.0
Armijo: th(1.9417032947081682E-10)=-40.72327762501891; dx=-142.1855846595463 evalInputDelta=-2.4722545646227445E-6
MIN ALPHA (1.765184813371062E-11): th(0.0)=-40.723280097273474
Fitness changed from -40.723280097273474 to -40.723280097273474
Static Iteration Total: 15.2022; Orientation: 0.7865; Line Search: 13.3658
Iteration 22 failed. Error: -40.723280097273474
Previous Error: 0.0 -> -40.723280097273474
Retrying iteration 22
Reset training subject: 1715342869626
Adding measurement 3de5250d to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-40.723280097273474;dx=-7.947703042747897E-4
WOLFE (weak): th(2.1544346900318838E-10)=-40.723280097273474; dx=-7.865537826440571E-4 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-40.723280097273474; dx=-7.865163125689072E-4 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-40.723280097273474; dx=-7.863913601464116E-4 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-40.723280097273474; dx=-7.864222218880789E-4 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-40.723280097273474; dx=-7.864173430199833E-4 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-40.723280097273474; dx=-7.863807678078414E-4 evalInputDelta=0.0
WOLFE (weak): th(1.0858350837760695E-6)=-40.723280097273474; dx=-7.864048219527904E-4 evalInputDelta=0.0
Armijo: th(8.686680670208556E-6)=-40.723280097273474; dx=-7.866014384704681E-4 evalInputDelta=0.0
Armijo: th(4.886257876992313E-6)=-40.723280097273474; dx=-7.863309774523521E-4 evalInputDelta=0.0
WOLFE (weak): th(2.986046480384191E-6)=-40.723280097273474; dx=-7.865854475282474E-4 evalInputDelta=0.0
WOLFE (weak): th(3.936152178688252E-6)=-40.723280097273474; dx=-7.864921439576554E-4 evalInputDelta=0.0
WOLFE (weak): th(4.411205027840282E-6)=-40.723280097273474; dx=-7.865726535470081E-4 evalInputDelta=0.0
Armijo: th(4.6487314524162974E-6)=-40.723280097273474; dx=-7.863464694422754E-4 evalInputDelta=0.0
Armijo: th(4.52996824012829E-6)=-40.723280097273474; dx=-7.86561614283108E-4 evalInputDelta=0.0
Armijo: th(4.4705866339842855E-6)=-40.723280097273474; dx=-7.86336558482035E-4 evalInputDelta=0.0
WOLFE (weak): th(4.440895830912284E-6)=-40.723280097273474; dx=-7.865767029190834E-4 evalInputDelta=0.0
WOLFE (weak): th(4.455741232448285E-6)=-40.723280097273474; dx=-7.864058860076193E-4 evalInputDelta=0.0
WOLFE (weak): th(4.463163933216285E-6)=-40.723280097273474; dx=-7.862689794849353E-4 evalInputDelta=0.0
WOLFE (weak): th(4.466875283600285E-6)=-40.723280097273474; dx=-7.86596947569701E-4 evalInputDelta=0.0
WOLFE (weak): th(4.468730958792286E-6)=-40.723280097273474; dx=-7.865803863182255E-4 evalInputDelta=0.0
WOLFE (weak): th(4.469658796388286E-6)=-40.723280097273474; dx=-7.863751835535263E-4 evalInputDelta=0.0
Armijo: th(4.4701227151862855E-6)=-40.723280097273474; dx=-7.863443823270153E-4 evalInputDelta=0.0
WOLFE (weak): th(4.4698907557872856E-6)=-40.723280097273474; dx=-7.863550973620904E-4 evalInputDelta=0.0
WOLFE (weak): th(4.4700067354867856E-6)=-40.723280097273474; dx=-7.862610664474932E-4 evalInputDelta=0.0
WOLFE (weak): th(4.470064725336535E-6)=-40.723280097273474; dx=-7.863132496465009E-4 evalInputDelta=0.0
WOLFE (weak): th(4.47009372026141E-6)=-40.723280097273474; dx=-7.864653565999404E-4 evalInputDelta=0.0
mu ~= nu (4.47009372026141E-6): th(0.0)=-40.723280097273474
Fitness changed from -40.723280097273474 to -40.723280097273474
Static Iteration Total: 33.7303; Orientation: 0.0190; Line Search: 31.6103
Iteration 23 failed. Error: -40.723280097273474
Previous Error: 0.0 -> -40.723280097273474
Optimization terminated 23
Final threshold in iteration 23: -40.723280097273474 (> -Infinity) after 190.611s (< 3600.000s)

Returns

    -40.723280097273474