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 42.31 seconds (0.773 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: 137482319012300
Reset training subject: 137483235628700
Adding measurement 44afe4e7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-31.625194917659314;dx=-0.005551508118086852
New Minimum: -31.625194917659314 > -31.637726967208042
WOLFE (weak): th(2.154434690031884)=-31.637726967208042; dx=-0.005480626836203389 evalInputDelta=0.012532049548727997
New Minimum: -31.637726967208042 > -31.650255675109495
WOLFE (weak): th(4.308869380063768)=-31.650255675109495; dx=-0.0054999965003734354 evalInputDelta=0.02506075745018066
New Minimum: -31.650255675109495 > -31.700413211113318
WOLFE (weak): th(12.926608140191302)=-31.700413211113318; dx=-0.005526841634368469 evalInputDelta=0.07521829345400377
New Minimum: -31.700413211113318 > -31.926169489502104
WOLFE (weak): th(51.70643256076521)=-31.926169489502104; dx=-0.005479138726397952 evalInputDelta=0.3009745718427901
New Minimum: -31.926169489502104 > -33.13628885359981
WOLFE (weak): th(258.53216280382605)=-33.13628885359981; dx=-0.005550131411627976 evalInputDelta=1.5110939359404938
New Minimum: -33.13628885359981 > -40.97082177587097
WOLFE (weak): th(1551.1929768229563)=-40.97082177587097; dx=-0.005599912511805628 evalInputDelta=9.345626858211652
New Minimum: -40.97082177587097 > -83.90768229299917
END: th(10858.350837760694)=-83.90768229299917; dx=-0.002853715048243758 evalInputDelta=52.282487375339855
Fitness changed from -31.625194917659314 to -83.90768229299917
Iteration 1 complete. Error: -83.90768229299917 Total: 10.3807; Orientation: 0.0186; Line Search: 7.6789
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5ee9a075-416a-4b37-91ba-345c0b9684c4.jpg)
Adding measurement 39ce49c5 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-83.90768229299917;dx=-0.006130559669914902
New Minimum: -83.90768229299917 > -164.41307408635632
END: th(23393.607721408407)=-164.41307408635632; dx=-0.001494013185556766 evalInputDelta=80.50539179335715
Fitness changed from -83.90768229299917 to -164.41307408635632
Iteration 2 complete. Error: -164.41307408635632 Total: 2.7515; Orientation: 0.0146; Line Search: 1.7893
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/232d011a-d977-49de-98d6-f10bcd27706b.jpg)
Adding measurement 347d7cc3 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-164.41307408635632;dx=-0.0071165339709375166
New Minimum: -164.41307408635632 > -232.18072125807817
END: th(50400.00000000001)=-232.18072125807817; dx=-1.5298255238041934E-4 evalInputDelta=67.76764717172185
Fitness changed from -164.41307408635632 to -232.18072125807817
Iteration 3 complete. Error: -232.18072125807817 Total: 2.7208; Orientation: 0.0152; Line Search: 1.7634
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e8a7055a-b9c3-43d6-87fb-ba8f31aeb65b.jpg)
Adding measurement 1c6145e6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.095e+03, gradient 8.696e-02, dot -0.252; [78127150-8599-4cb5-8804-61fd2c46aceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -232.18072125807817, -164.41307408635632, -83.90768229299917, -31.625194917659314
LBFGS Accumulation History: 3 points
Removed measurement 1c6145e6 to history. Total: 3
th(0)=-232.18072125807817;dx=-0.007526229796759215
New Minimum: -232.18072125807817 > -289.6020752448412
WOLF (strong): th(108583.50837760697)=-289.6020752448412; dx=1.8813747263059282E-4 evalInputDelta=57.42135398676305
New Minimum: -289.6020752448412 > -348.09634126558325
END: th(54291.75418880348)=-348.09634126558325; dx=-2.474225259895113E-4 evalInputDelta=115.91562000750508
Fitness changed from -232.18072125807817 to -348.09634126558325
Iteration 4 complete. Error: -348.09634126558325 Total: 4.1210; Orientation: 0.2836; Line Search: 2.8725
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/16c09ef4-74c8-45d2-befd-f826ffd5d667.jpg)
Adding measurement 2f444745 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.935e+03, gradient 7.569e-02, dot -0.219; [78127150-8599-4cb5-8804-61fd2c46aceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -348.09634126558325, -164.41307408635632, -83.90768229299917, -31.625194917659314
LBFGS Accumulation History: 3 points
Removed measurement 2f444745 to history. Total: 3
th(0)=-348.09634126558325;dx=-0.005695564955061291
New Minimum: -348.09634126558325 > -380.2606204603052
WOLF (strong): th(116968.03860704206)=-380.2606204603052; dx=4.7010580674712436E-4 evalInputDelta=32.16427919472193
New Minimum: -380.2606204603052 > -469.1818447119854
END: th(58484.01930352103)=-469.1818447119854; dx=-4.514449087252762E-4 evalInputDelta=121.08550344640213
Fitness changed from -348.09634126558325 to -469.1818447119854
Iteration 5 complete. Error: -469.1818447119854 Total: 3.8801; Orientation: 0.2897; Line Search: 2.6509
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e8a2b4f4-2f4c-4a93-bf08-ec180d2204b7.jpg)
Adding measurement 3e72413c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.412e+04, gradient 7.310e-02, dot -0.256; [78127150-8599-4cb5-8804-61fd2c46aceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -469.1818447119854, -164.41307408635632, -83.90768229299917, -31.625194917659314
LBFGS Accumulation History: 3 points
Removed measurement 3e72413c to history. Total: 3
th(0)=-469.1818447119854;dx=-0.0053049455946879535
New Minimum: -469.1818447119854 > -482.1845294584761
WOLF (strong): th(126000.00000000004)=-482.1845294584761; dx=4.683682735855888E-4 evalInputDelta=13.00268474649073
New Minimum: -482.1845294584761 > -568.1001119462542
END: th(63000.00000000002)=-568.1001119462542; dx=-2.7854051498197837E-4 evalInputDelta=98.9182672342688
Fitness changed from -469.1818447119854 to -568.1001119462542
Iteration 6 complete. Error: -568.1001119462542 Total: 3.8102; Orientation: 0.2831; Line Search: 2.6039
Adding measurement 2955cf91 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.987e+04, gradient 7.094e-02, dot -0.265; [78127150-8599-4cb5-8804-61fd2c46aceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -568.1001119462542, -164.41307408635632, -83.90768229299917, -31.625194917659314
LBFGS Accumulation History: 3 points
Removed measurement 2955cf91 to history. Total: 3
th(0)=-568.1001119462542;dx=-0.004988460636044001
Armijo: th(135729.38547200873)=-523.4233878648986; dx=7.527415174649697E-4 evalInputDelta=-44.67672408135559
New Minimum: -568.1001119462542 > -653.6672375258025
END: th(67864.69273600436)=-653.6672375258025; dx=-1.1664816450818982E-5 evalInputDelta=85.56712557954836
Fitness changed from -568.1001119462542 to -653.6672375258025
Iteration 7 complete. Error: -653.6672375258025 Total: 3.9924; Orientation: 0.2907; Line Search: 2.8658
Adding measurement 334a6e1d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.345e+04, gradient 7.262e-02, dot -0.292; [78127150-8599-4cb5-8804-61fd2c46aceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -653.6672375258025, -164.41307408635632, -83.90768229299917, -31.625194917659314
LBFGS Accumulation History: 3 points
Removed measurement 334a6e1d to history. Total: 3
th(0)=-653.6672375258025;dx=-0.0052474222982394885
Armijo: th(146210.0482588026)=-579.1884408772366; dx=8.071802830176488E-4 evalInputDelta=-74.47879664856589
New Minimum: -653.6672375258025 > -727.1605395958981
WOLF (strong): th(73105.0241294013)=-727.1605395958981; dx=3.4368711586331636E-4 evalInputDelta=73.49330207009552
New Minimum: -727.1605395958981 > -738.8222647514286
END: th(24368.3413764671)=-738.8222647514286; dx=-0.002130446876813525 evalInputDelta=85.1550272256261
Fitness changed from -653.6672375258025 to -738.8222647514286
Iteration 8 complete. Error: -738.8222647514286 Total: 4.6405; Orientation: 0.2822; Line Search: 3.5249
Adding measurement 52fa1a18 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.008e+04, gradient 5.683e-02, dot -0.390; [78127150-8599-4cb5-8804-61fd2c46aceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -738.8222647514286, -164.41307408635632, -83.90768229299917, -31.625194917659314
LBFGS Accumulation History: 3 points
Removed measurement 52fa1a18 to history. Total: 3
th(0)=-738.8222647514286;dx=-0.0031988655192271686
New Minimum: -738.8222647514286 > -809.4464473181754
END: th(52500.00000000002)=-809.4464473181754; dx=-0.0012997776479552595 evalInputDelta=70.62418256674675
Fitness changed from -738.8222647514286 to -809.4464473181754
Iteration 9 complete. Error: -809.4464473181754 Total: 2.8648; Orientation: 0.2836; Line Search: 1.7495
Adding measurement 71abfc6d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.535e+04, gradient 5.682e-02, dot -0.420; [78127150-8599-4cb5-8804-61fd2c46aceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -809.4464473181754, -164.41307408635632, -83.90768229299917, -31.625194917659314
LBFGS Accumulation History: 3 points
Removed measurement 71abfc6d to history. Total: 3
th(0)=-809.4464473181754;dx=-0.0032181834458745884
New Minimum: -809.4464473181754 > -839.3571553184731
END: th(113107.82122667394)=-839.3571553184731; dx=-3.1544643118489924E-4 evalInputDelta=29.910708000297745
Fitness changed from -809.4464473181754 to -839.3571553184731
Iteration 10 complete. Error: -839.3571553184731 Total: 2.8898; Orientation: 0.2782; Line Search: 1.7596
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/351bc368-e3cb-44bc-a04c-e580f4d444b8.jpg)
Final threshold in iteration 11: -839.3571553184731 (> -Infinity) after 42.310s (< 5400.000s)

Returns

    -839.3571553184731