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

BasicOptimizer.scala:89 executed in 58.46 seconds (1.437 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: 210786966020500
Reset training subject: 210787763065700
Adding measurement 3a80e1ab to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.0913338774137813;dx=-0.019091661076559498
New Minimum: -2.0913338774137813 > -2.1166714520385597
WOLFE (weak): th(2.154434690031884)=-2.1166714520385597; dx=-0.019093364357653943 evalInputDelta=0.02533757462477837
New Minimum: -2.1166714520385597 > -2.1420673586471253
WOLFE (weak): th(4.308869380063768)=-2.1420673586471253; dx=-0.0190726598293949 evalInputDelta=0.05073348123334398
New Minimum: -2.1420673586471253 > -2.2440480627721016
WOLFE (weak): th(12.926608140191302)=-2.2440480627721016; dx=-0.019160372412628718 evalInputDelta=0.15271418535832026
New Minimum: -2.2440480627721016 > -2.7069978841263165
WOLFE (weak): th(51.70643256076521)=-2.7069978841263165; dx=-0.01929347039399372 evalInputDelta=0.6156640067125352
New Minimum: -2.7069978841263165 > -5.302282625415543
WOLFE (weak): th(258.53216280382605)=-5.302282625415543; dx=-0.020885900148714727 evalInputDelta=3.210948748001762
New Minimum: -5.302282625415543 > -23.158764530414444
WOLFE (weak): th(1551.1929768229563)=-23.158764530414444; dx=-0.01986064061529704 evalInputDelta=21.067430653000663
New Minimum: -23.158764530414444 > -59.97625798384482
END: th(10858.350837760694)=-59.97625798384482; dx=-0.00333787165735361 evalInputDelta=57.884924106431036
Fitness changed from -2.0913338774137813 to -59.97625798384482
Iteration 1 complete. Error: -59.97625798384482 Total: 8.4255; Orientation: 0.0154; Line Search: 6.1584
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9a1998a6-db32-4534-88db-b14995fee635.jpg)
Adding measurement 7e6da14 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-59.97625798384482;dx=-0.055321487660250225
New Minimum: -59.97625798384482 > -107.45907764100772
END: th(23393.607721408407)=-107.45907764100772; dx=-9.536873684882628E-4 evalInputDelta=47.482819657162906
Fitness changed from -59.97625798384482 to -107.45907764100772
Iteration 2 complete. Error: -107.45907764100772 Total: 2.5145; Orientation: 0.0158; Line Search: 1.7493
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/36c2b6b7-9d8c-4819-a3c1-dbe697fe54af.jpg)
Adding measurement 490a7256 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-107.45907764100772;dx=-0.06114519788217425
New Minimum: -107.45907764100772 > -121.0924524342511
END: th(50400.00000000001)=-121.0924524342511; dx=-4.370609938728826E-4 evalInputDelta=13.633374793243377
Fitness changed from -107.45907764100772 to -121.0924524342511
Iteration 3 complete. Error: -121.0924524342511 Total: 2.2627; Orientation: 0.0160; Line Search: 1.5521
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/282f3aac-124d-488d-9936-2a8c46a29d93.jpg)
Adding measurement 1af3ae00 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.133e+03, gradient 2.080e-01, dot -0.197; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -121.0924524342511, -107.45907764100772, -59.97625798384482, -2.0913338774137813
LBFGS Accumulation History: 3 points
Removed measurement 1af3ae00 to history. Total: 3
th(0)=-121.0924524342511;dx=-0.043149689576211014
New Minimum: -121.0924524342511 > -179.01181451719245
END: th(108583.50837760697)=-179.01181451719245; dx=-4.755603052083282E-4 evalInputDelta=57.91936208294135
Fitness changed from -121.0924524342511 to -179.01181451719245
Iteration 4 complete. Error: -179.01181451719245 Total: 2.6420; Orientation: 0.3134; Line Search: 1.5461
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/8a4d6f42-ee7d-47b5-99c8-44e2c49a9862.jpg)
Adding measurement 165fbd8f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.739e+03, gradient 1.736e-01, dot -0.186; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -179.01181451719245, -107.45907764100772, -59.97625798384482, -2.0913338774137813
LBFGS Accumulation History: 3 points
Removed measurement 165fbd8f to history. Total: 3
th(0)=-179.01181451719245;dx=-0.030064775957265477
Armijo: th(233936.07721408413)=-174.25872349937256; dx=-2.4134359398147927E-4 evalInputDelta=-4.753091017819884
New Minimum: -179.01181451719245 > -253.60059355138713
END: th(116968.03860704206)=-253.60059355138713; dx=-9.258356416210652E-4 evalInputDelta=74.58877903419469
Fitness changed from -179.01181451719245 to -253.60059355138713
Iteration 5 complete. Error: -253.60059355138713 Total: 3.5306; Orientation: 0.3097; Line Search: 2.4931
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/55f5f106-b1b5-41b8-8a24-76b3d3cdf19d.jpg)
Adding measurement 2eba421e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.724e+03, gradient 1.555e-01, dot -0.173; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -253.60059355138713, -107.45907764100772, -59.97625798384482, -2.0913338774137813
LBFGS Accumulation History: 3 points
Removed measurement 2eba421e to history. Total: 3
th(0)=-253.60059355138713;dx=-0.024089855838426426
New Minimum: -253.60059355138713 > -264.02267122073954
END: th(252000.0000000001)=-264.02267122073954; dx=-4.906041107139197E-5 evalInputDelta=10.422077669352404
Fitness changed from -253.60059355138713 to -264.02267122073954
Iteration 6 complete. Error: -264.02267122073954 Total: 2.5344; Orientation: 0.2877; Line Search: 1.5725
Adding measurement 34ab765c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.274e+03, gradient 1.514e-01, dot -0.114; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -264.02267122073954, -107.45907764100772, -59.97625798384482, -2.0913338774137813
LBFGS Accumulation History: 3 points
Removed measurement 34ab765c to history. Total: 3
th(0)=-264.02267122073954;dx=-0.022876024639596503
Armijo: th(542917.5418880349)=-179.0403747160583; dx=5.19478519488403E-5 evalInputDelta=-84.98229650468124
New Minimum: -264.02267122073954 > -365.2782129374546
END: th(271458.77094401745)=-365.2782129374546; dx=-4.2775519617619664E-4 evalInputDelta=101.25554171671507
Fitness changed from -264.02267122073954 to -365.2782129374546
Iteration 7 complete. Error: -365.2782129374546 Total: 3.3406; Orientation: 0.2880; Line Search: 2.3111
Adding measurement 40369d4a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.845e+03, gradient 1.321e-01, dot -0.076; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -365.2782129374546, -107.45907764100772, -59.97625798384482, -2.0913338774137813
LBFGS Accumulation History: 3 points
Removed measurement 40369d4a to history. Total: 3
th(0)=-365.2782129374546;dx=-0.01738584633928091
Armijo: th(584840.1930352104)=-192.76775005200892; dx=1.3805154634714004E-4 evalInputDelta=-172.5104628854457
New Minimum: -365.2782129374546 > -463.8281993044393
END: th(292420.0965176052)=-463.8281993044393; dx=-3.8306070096093346E-4 evalInputDelta=98.54998636698468
Fitness changed from -365.2782129374546 to -463.8281993044393
Iteration 8 complete. Error: -463.8281993044393 Total: 3.3722; Orientation: 0.3030; Line Search: 2.3926
Adding measurement 72471e5b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.790e+04, gradient 1.324e-01, dot -0.064; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -463.8281993044393, -107.45907764100772, -59.97625798384482, -2.0913338774137813
LBFGS Accumulation History: 3 points
Removed measurement 72471e5b to history. Total: 3
th(0)=-463.8281993044393;dx=-0.017461333892881695
Armijo: th(630000.0000000002)=-247.33562287000086; dx=1.6131543783704013E-4 evalInputDelta=-216.49257643443843
New Minimum: -463.8281993044393 > -564.7859148492887
END: th(315000.0000000001)=-564.7859148492887; dx=-3.242111715637338E-4 evalInputDelta=100.9577155448494
Fitness changed from -463.8281993044393 to -564.7859148492887
Iteration 9 complete. Error: -564.7859148492887 Total: 3.2348; Orientation: 0.2767; Line Search: 2.2768
Adding measurement 72dd567b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.270e+04, gradient 1.330e-01, dot -0.059; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -564.7859148492887, -107.45907764100772, -59.97625798384482, -2.0913338774137813
LBFGS Accumulation History: 3 points
Removed measurement 72dd567b to history. Total: 3
th(0)=-564.7859148492887;dx=-0.017681694308317904
Armijo: th(678646.9273600436)=-290.80209131919065; dx=2.573186358580374E-4 evalInputDelta=-273.98382353009805
New Minimum: -564.7859148492887 > -668.3832485793057
END: th(339323.4636800218)=-668.3832485793057; dx=-2.572034117176064E-4 evalInputDelta=103.597333730017
Fitness changed from -564.7859148492887 to -668.3832485793057
Iteration 10 complete. Error: -668.3832485793057 Total: 3.4591; Orientation: 0.2882; Line Search: 2.4779
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c8ccd7a4-0377-45a5-9b04-47d15f95e1e9.jpg)
Adding measurement 1e4a6d62 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.417e+04, gradient 1.290e-01, dot -0.054; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -668.3832485793057, -107.45907764100772, -59.97625798384482, -2.0913338774137813
LBFGS Accumulation History: 3 points
Removed measurement 1e4a6d62 to history. Total: 3
th(0)=-668.3832485793057;dx=-0.01661442264848042
Armijo: th(731050.241294013)=-280.2542171757147; dx=2.571506131444644E-4 evalInputDelta=-388.129031403591
New Minimum: -668.3832485793057 > -745.5446904900743
END: th(365525.1206470065)=-745.5446904900743; dx=-1.6216700122360673E-4 evalInputDelta=77.16144191076864
Fitness changed from -668.3832485793057 to -745.5446904900743
Iteration 11 complete. Error: -745.5446904900743 Total: 3.2839; Orientation: 0.2880; Line Search: 2.2498
Adding measurement 645193bb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.024e+05, gradient 1.383e-01, dot -0.055; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -745.5446904900743, -107.45907764100772, -59.97625798384482, -2.0913338774137813
LBFGS Accumulation History: 3 points
Removed measurement 645193bb to history. Total: 3
th(0)=-745.5446904900743;dx=-0.019109269430623445
Armijo: th(787500.0000000003)=-294.53492138897843; dx=3.2814816391525474E-4 evalInputDelta=-451.0097691010959
New Minimum: -745.5446904900743 > -786.2147318612294
WOLF (strong): th(393750.0000000002)=-786.2147318612294; dx=7.726165682056502E-5 evalInputDelta=40.670041371155094
New Minimum: -786.2147318612294 > -1252.9602707320537
END: th(131250.00000000006)=-1252.9602707320537; dx=-0.004331177496662894 evalInputDelta=507.41558024197934
Fitness changed from -745.5446904900743 to -1252.9602707320537
Iteration 12 complete. Error: -1252.9602707320537 Total: 4.1721; Orientation: 0.2904; Line Search: 3.2136
Adding measurement 3fba8e5e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.055e+05, gradient 1.384e-01, dot -0.085; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1252.9602707320537, -107.45907764100772, -59.97625798384482, -2.0913338774137813
LBFGS Accumulation History: 3 points
Removed measurement 3fba8e5e to history. Total: 3
th(0)=-1252.9602707320537;dx=-0.01914809544550675
Armijo: th(282769.55306668486)=-1166.353180185111; dx=-5.192544705318942E-4 evalInputDelta=-86.6070905469428
New Minimum: -1252.9602707320537 > -1519.5676938407698
END: th(141384.77653334243)=-1519.5676938407698; dx=-0.0032751142746041285 evalInputDelta=266.60742310871615
Fitness changed from -1252.9602707320537 to -1519.5676938407698
Iteration 13 complete. Error: -1519.5676938407698 Total: 3.3573; Orientation: 0.2793; Line Search: 2.3521
Adding measurement 127528bb to history. Total: 3
Accepted: LBFGS Orientation magnitude: 5.630e+04, gradient 1.496e-01, dot 0.119; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1519.5676938407698;dx=-1003.3025611397068
Armijo: th(304604.26720583875)=-1064.6992406591205; dx=0.0019380198169591059 evalInputDelta=-454.86845318164933
Armijo: th(152302.13360291938)=-1064.721330585627; dx=0.0038778005784043277 evalInputDelta=-454.84636325514293
Armijo: th(50767.37786763979)=-1064.799297080802; dx=0.011617531544888407 evalInputDelta=-454.7683967599678
Armijo: th(12691.844466909948)=-1064.7847146610939; dx=0.04647248009060054 evalInputDelta=-454.782979179676
Armijo: th(2538.3688933819894)=-1065.0608319100602; dx=0.23290912568360542 evalInputDelta=-454.50686193070965
Armijo: th(423.0614822303316)=-1066.4548771305124; dx=1.3910239232600823 evalInputDelta=-453.11281671025745
Armijo: th(60.43735460433309)=-1081.5174149716242; dx=9.554708747930595 evalInputDelta=-438.0502788691456
Armijo: th(7.554669325541636)=-1150.0783725445601; dx=64.36504299327191 evalInputDelta=-369.4893212962097
Armijo: th(0.8394077028379595)=-1439.221018217815; dx=172.15700874833172 evalInputDelta=-80.34667562295476
New Minimum: -1519.5676938407698 > -1523.6832848901622
END: th(0.08394077028379596)=-1523.6832848901622; dx=-1.006953237841671 evalInputDelta=4.115591049392378
Fitness changed from -1519.5676938407698 to -1523.6832848901622
Iteration 14 complete. Error: -1523.6832848901622 Total: 9.8056; Orientation: 0.4760; Line Search: 8.6423
Adding measurement 672cf6f4 to history. Total: 4
Accepted: LBFGS Orientation magnitude: 3.291e+04, gradient 1.468e-01, dot 0.194; [9d8565f9-6958-4952-a94b-b75eb81db34a = 1.000/1.000e+00]
th(0)=-1523.6832848901622;dx=-934.9913022154273
New Minimum: -1523.6832848901622 > -1524.1595491452406
END: th(0.1808449074074075)=-1524.1595491452406; dx=-4.278648988258261 evalInputDelta=0.47626425507837666
Fitness changed from -1523.6832848901622 to -1524.1595491452406
Iteration 15 complete. Error: -1524.1595491452406 Total: 2.4990; Orientation: 0.3451; Line Search: 1.4808
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/4e8bcf4f-b6b5-4c66-a5f3-4856bf017ae4.jpg)
Final threshold in iteration 16: -1524.1595491452406 (> -Infinity) after 58.458s (< 5400.000s)

Returns

    -1524.1595491452406