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 7.94 seconds (0.000 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: 143029671295500
Reset training subject: 143029801519100
Adding measurement 15ea768e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-22.646656104485796;dx=-0.24100821783376622
New Minimum: -22.646656104485796 > -23.298150849537663
WOLFE (weak): th(2.154434690031884)=-23.298150849537663; dx=-0.24244114692178304 evalInputDelta=0.6514947450518669
New Minimum: -23.298150849537663 > -23.959353041026198
WOLFE (weak): th(4.308869380063768)=-23.959353041026198; dx=-0.2460444696632147 evalInputDelta=1.3126969365404015
New Minimum: -23.959353041026198 > -26.71907437668594
WOLFE (weak): th(12.926608140191302)=-26.71907437668594; dx=-0.257811462564161 evalInputDelta=4.072418272200142
New Minimum: -26.71907437668594 > -40.31045900841058
WOLFE (weak): th(51.70643256076521)=-40.31045900841058; dx=-0.26277325276267416 evalInputDelta=17.663802903924786
New Minimum: -40.31045900841058 > -111.49945697737725
END: th(258.53216280382605)=-111.49945697737725; dx=-0.12154268149943517 evalInputDelta=88.85280087289145
Fitness changed from -22.646656104485796 to -111.49945697737725
Iteration 1 complete. Error: -111.49945697737725 Total: 1.0373; Orientation: 0.0015; Line Search: 0.6865
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f67995f4-1f74-4a14-95c5-d7de6ba382af.jpg)
Adding measurement 4739c6ee to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-111.49945697737725;dx=-0.2614015401335521
New Minimum: -111.49945697737725 > -222.2949195325885
END: th(556.9906600335335)=-222.2949195325885; dx=-0.05841375357385619 evalInputDelta=110.79546255521124
Fitness changed from -111.49945697737725 to -222.2949195325885
Iteration 2 complete. Error: -222.2949195325885 Total: 0.3543; Orientation: 0.0015; Line Search: 0.2352
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f6e52ec3-53ce-47b8-9911-bcb61db75883.jpg)
Adding measurement 30c77196 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-222.2949195325885;dx=-0.16945407556106384
New Minimum: -222.2949195325885 > -291.46900296172146
END: th(1200.0)=-291.46900296172146; dx=-0.020900581630349496 evalInputDelta=69.17408342913296
Fitness changed from -222.2949195325885 to -291.46900296172146
Iteration 3 complete. Error: -291.46900296172146 Total: 0.3477; Orientation: 0.0015; Line Search: 0.2245
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ddb1483b-4ec5-4f26-a7a3-d48d68d365c3.jpg)
Adding measurement 578c3a21 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.058e+03, gradient 4.701e-01, dot -0.306; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -291.46900296172146, -222.2949195325885, -111.49945697737725, -22.646656104485796
LBFGS Accumulation History: 3 points
Removed measurement 578c3a21 to history. Total: 3
th(0)=-291.46900296172146;dx=-0.21478309065347656
New Minimum: -291.46900296172146 > -409.37482824423876
END: th(2585.3216280382608)=-409.37482824423876; dx=-0.008431749269617327 evalInputDelta=117.9058252825173
Fitness changed from -291.46900296172146 to -409.37482824423876
Iteration 4 complete. Error: -409.37482824423876 Total: 0.3702; Orientation: 0.0283; Line Search: 0.2252
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7466ccef-c371-492a-a977-0f7f88520eee.jpg)
Adding measurement 5943ca89 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.183e+03, gradient 4.043e-01, dot -0.207; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -409.37482824423876, -222.2949195325885, -111.49945697737725, -22.646656104485796
LBFGS Accumulation History: 3 points
Removed measurement 5943ca89 to history. Total: 3
th(0)=-409.37482824423876;dx=-0.15648957668744393
New Minimum: -409.37482824423876 > -660.8848708360632
END: th(5569.9066003353355)=-660.8848708360632; dx=-9.298875411859961E-5 evalInputDelta=251.51004259182446
Fitness changed from -409.37482824423876 to -660.8848708360632
Iteration 5 complete. Error: -660.8848708360632 Total: 0.3814; Orientation: 0.0283; Line Search: 0.2315
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/43f7e9ae-9e41-42b0-b4b2-cc2753c28adc.jpg)
Adding measurement 5511e89d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.418e+03, gradient 3.947e-01, dot -0.204; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -660.8848708360632, -222.2949195325885, -111.49945697737725, -22.646656104485796
LBFGS Accumulation History: 3 points
Removed measurement 5511e89d to history. Total: 3
th(0)=-660.8848708360632;dx=-0.15069862225988634
New Minimum: -660.8848708360632 > -841.4281757821044
WOLF (strong): th(12000.000000000002)=-841.4281757821044; dx=0.007622626506640828 evalInputDelta=180.5433049460412
New Minimum: -841.4281757821044 > -1022.5685184866587
WOLF (strong): th(6000.000000000001)=-1022.5685184866587; dx=0.0027805793415145654 evalInputDelta=361.6836476505955
END: th(2000.0000000000002)=-988.5620554623771; dx=-0.04484229289228049 evalInputDelta=327.6771846263139
Fitness changed from -660.8848708360632 to -1022.5685184866587
Iteration 6 complete. Error: -1022.5685184866587 Total: 0.6013; Orientation: 0.0285; Line Search: 0.4540
Adding measurement 379b75b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.983e+03, gradient 3.418e-01, dot -0.250; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1022.5685184866587, -222.2949195325885, -111.49945697737725, -22.646656104485796
LBFGS Accumulation History: 3 points
Removed measurement 379b75b0 to history. Total: 3
th(0)=-1022.5685184866587;dx=-0.11250865698780745
New Minimum: -1022.5685184866587 > -1398.3441994015636
END: th(4308.869380063768)=-1398.3441994015636; dx=-0.022188335243275917 evalInputDelta=375.7756809149049
Fitness changed from -1022.5685184866587 to -1398.3441994015636
Iteration 7 complete. Error: -1398.3441994015636 Total: 0.3651; Orientation: 0.0273; Line Search: 0.2263
Adding measurement 6cefd3df to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.991e+03, gradient 3.582e-01, dot -0.285; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1398.3441994015636, -222.2949195325885, -111.49945697737725, -22.646656104485796
LBFGS Accumulation History: 3 points
Removed measurement 6cefd3df to history. Total: 3
th(0)=-1398.3441994015636;dx=-0.12572437743937026
Armijo: th(9283.17766722556)=-1285.7910016795108; dx=0.012556661056720632 evalInputDelta=-112.5531977220528
New Minimum: -1398.3441994015636 > -1553.3920947397667
WOLF (strong): th(4641.58883361278)=-1553.3920947397667; dx=0.018895515908702785 evalInputDelta=155.04789533820303
New Minimum: -1553.3920947397667 > -1577.8330868631194
END: th(1547.1962778709267)=-1577.8330868631194; dx=-0.07096136793631325 evalInputDelta=179.4888874615558
Fitness changed from -1398.3441994015636 to -1577.8330868631194
Iteration 8 complete. Error: -1577.8330868631194 Total: 0.6034; Orientation: 0.0302; Line Search: 0.4644
Adding measurement 2685c5f9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.082e+04, gradient 3.134e-01, dot -0.381; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1577.8330868631194, -222.2949195325885, -111.49945697737725, -22.646656104485796
LBFGS Accumulation History: 3 points
Removed measurement 2685c5f9 to history. Total: 3
th(0)=-1577.8330868631194;dx=-0.09468849584239991
New Minimum: -1577.8330868631194 > -1721.243445884399
END: th(3333.3333333333344)=-1721.243445884399; dx=-0.01844627560568554 evalInputDelta=143.41035902127965
Fitness changed from -1577.8330868631194 to -1721.243445884399
Iteration 9 complete. Error: -1721.243445884399 Total: 0.3708; Orientation: 0.0271; Line Search: 0.2337
Adding measurement 6d9c885f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.280e+04, gradient 3.799e-01, dot -0.331; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1721.243445884399, -222.2949195325885, -111.49945697737725, -22.646656104485796
LBFGS Accumulation History: 3 points
Removed measurement 6d9c885f to history. Total: 3
th(0)=-1721.243445884399;dx=-0.14149559725508834
Armijo: th(7181.448966772949)=-1530.0141339216445; dx=0.01596538090821138 evalInputDelta=-191.22931196275454
New Minimum: -1721.243445884399 > -1763.3689347382754
WOLF (strong): th(3590.7244833864743)=-1763.3689347382754; dx=0.025496137727632144 evalInputDelta=42.12548885387628
New Minimum: -1763.3689347382754 > -1853.5494328449943
END: th(1196.9081611288248)=-1853.5494328449943; dx=-0.04139273146961296 evalInputDelta=132.3059869605952
Fitness changed from -1721.243445884399 to -1853.5494328449943
Iteration 10 complete. Error: -1853.5494328449943 Total: 0.5954; Orientation: 0.0285; Line Search: 0.4580
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/2f70db95-7996-4505-9a56-658d62e5dd84.jpg)
Adding measurement 1e100c00 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.187e+05, gradient 3.069e-01, dot -0.451; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1853.5494328449943, -222.2949195325885, -111.49945697737725, -22.646656104485796
LBFGS Accumulation History: 3 points
Removed measurement 1e100c00 to history. Total: 3
th(0)=-1853.5494328449943;dx=-0.09103859419261776
New Minimum: -1853.5494328449943 > -1937.3560591693
END: th(2578.6604631182117)=-1937.3560591693; dx=-0.02683396338833036 evalInputDelta=83.80662632430563
Fitness changed from -1853.5494328449943 to -1937.3560591693
Iteration 11 complete. Error: -1937.3560591693 Total: 0.3794; Orientation: 0.0270; Line Search: 0.2331
Adding measurement 57c8aa64 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.055e+06, gradient 3.727e-01, dot -0.375; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1937.3560591693, -222.2949195325885, -111.49945697737725, -22.646656104485796
LBFGS Accumulation History: 3 points
Removed measurement 57c8aa64 to history. Total: 3
th(0)=-1937.3560591693;dx=-0.1347188807343775
Armijo: th(5555.555555555558)=-1782.8787816337936; dx=0.016300917161563552 evalInputDelta=-154.47727753550635
New Minimum: -1937.3560591693 > -1975.2904216848722
WOLF (strong): th(2777.777777777779)=-1975.2904216848722; dx=0.0075298071800795245 evalInputDelta=37.934362515572275
New Minimum: -1975.2904216848722 > -2024.0571879272582
END: th(925.9259259259264)=-2024.0571879272582; dx=-0.05203203107885995 evalInputDelta=86.70112875795826
Fitness changed from -1937.3560591693 to -2024.0571879272582
Iteration 12 complete. Error: -2024.0571879272582 Total: 0.5927; Orientation: 0.0281; Line Search: 0.4504
Adding measurement 8a10b7e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.546e+04, gradient 2.814e-01, dot -0.402; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2024.0571879272582, -222.2949195325885, -111.49945697737725, -22.646656104485796
LBFGS Accumulation History: 3 points
Removed measurement 8a10b7e to history. Total: 3
th(0)=-2024.0571879272582;dx=-0.07630304153402942
New Minimum: -2024.0571879272582 > -2071.8725829548493
END: th(1994.8469352147083)=-2071.8725829548493; dx=-0.03930218998880843 evalInputDelta=47.815395027591194
Fitness changed from -2024.0571879272582 to -2071.8725829548493
Iteration 13 complete. Error: -2071.8725829548493 Total: 0.3641; Orientation: 0.0271; Line Search: 0.2279
Adding measurement 242e255c to history. Total: 3
Accepted: LBFGS Orientation magnitude: 5.245e+04, gradient 3.084e-01, dot 0.491; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-2071.8725829548493;dx=-7924.39696559016
New Minimum: -2071.8725829548493 > -2123.065943394128
WOLF (strong): th(4297.7674385303535)=-2123.065943394128; dx=0.15312862432058139 evalInputDelta=51.19336043927888
WOLF (strong): th(2148.8837192651768)=-2123.0564052798973; dx=0.3023289780220395 evalInputDelta=51.18382232504791
New Minimum: -2123.065943394128 > -2123.3670196176636
WOLF (strong): th(716.2945730883922)=-2123.3670196176636; dx=0.9123064894285886 evalInputDelta=51.49443666281422
New Minimum: -2123.3670196176636 > -2124.060027400356
WOLF (strong): th(179.07364327209805)=-2124.060027400356; dx=3.7454797096236336 evalInputDelta=52.18744444550657
New Minimum: -2124.060027400356 > -2129.9901408222527
WOLF (strong): th(35.81472865441961)=-2129.9901408222527; dx=18.310497503165003 evalInputDelta=58.11755786740332
New Minimum: -2129.9901408222527 > -2145.1002307584604
WOLF (strong): th(5.969121442403268)=-2145.1002307584604; dx=103.81800633110987 evalInputDelta=73.22764780361103
New Minimum: -2145.1002307584604 > -2231.5017364994364
WOLF (strong): th(0.8527316346290383)=-2231.5017364994364; dx=502.2557391779981 evalInputDelta=159.6291535445871
New Minimum: -2231.5017364994364 > -2391.0425550374466
END: th(0.10659145432862979)=-2391.0425550374466; dx=-592.8213384101941 evalInputDelta=319.16997208259727
Fitness changed from -2071.8725829548493 to -2391.0425550374466
Iteration 14 complete. Error: -2391.0425550374466 Total: 1.1601; Orientation: 0.0281; Line Search: 1.0226
Adding measurement 7db31462 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.698e+04, gradient 4.229e-01, dot -0.136; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2391.0425550374466, -2071.8725829548493, -222.2949195325885, -111.49945697737725, -22.646656104485796
Rejected: LBFGS Orientation magnitude: 6.900e+04, gradient 4.229e-01, dot -0.253; [ef4563a1-af7a-4939-b060-a935318d7576 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2391.0425550374466, -2071.8725829548493, -222.2949195325885, -111.49945697737725
LBFGS Accumulation History: 3 points
Removed measurement 7db31462 to history. Total: 4
Removed measurement 242e255c to history. Total: 3
th(0)=-2391.0425550374466;dx=-0.176710114417094
New Minimum: -2391.0425550374466 > -2391.0831227709336
END: th(0.22964432686654923)=-2391.0831227709336; dx=-0.12462281214439032 evalInputDelta=0.04056773348702336
Fitness changed from -2391.0425550374466 to -2391.0831227709336
Iteration 15 complete. Error: -2391.0831227709336 Total: 0.4003; Orientation: 0.0621; Line Search: 0.2282
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/1e7016f9-1284-4989-85af-adbcc9f63c0e.jpg)
Final threshold in iteration 16: -2391.0831227709336 (> -Infinity) after 7.935s (< 5400.000s)

Returns

    -2391.0831227709336