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 9.05 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: 137604097199699
Reset training subject: 137604235406800
Adding measurement 2580be8 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.5439561545662956;dx=-6.706572646715736E-6
New Minimum: -0.5439561545662956 > -0.5439695646151821
WOLFE (weak): th(2.154434690031884)=-0.5439695646151821; dx=-6.7090591802860155E-6 evalInputDelta=1.3410048886441928E-5
New Minimum: -0.5439695646151821 > -0.5439831071013249
WOLFE (weak): th(4.308869380063768)=-0.5439831071013249; dx=-6.362683387458799E-6 evalInputDelta=2.6952535029267644E-5
New Minimum: -0.5439831071013249 > -0.5440374595312323
WOLFE (weak): th(12.926608140191302)=-0.5440374595312323; dx=-6.605138789265033E-6 evalInputDelta=8.130496493663486E-5
New Minimum: -0.5440374595312323 > -0.544281301553832
WOLFE (weak): th(51.70643256076521)=-0.544281301553832; dx=-6.647000421970768E-6 evalInputDelta=3.251469875363844E-4
New Minimum: -0.544281301553832 > -0.5455874708307373
WOLFE (weak): th(258.53216280382605)=-0.5455874708307373; dx=-6.534878528963077E-6 evalInputDelta=0.0016313162644416845
New Minimum: -0.5455874708307373 > -0.5538520225698489
WOLFE (weak): th(1551.1929768229563)=-0.5538520225698489; dx=-6.713150092587269E-6 evalInputDelta=0.009895868003553243
New Minimum: -0.5538520225698489 > -0.6174330956397901
WOLFE (weak): th(10858.350837760694)=-0.6174330956397901; dx=-7.113997494266464E-6 evalInputDelta=0.07347694107349445
New Minimum: -0.6174330956397901 > -0.8904011521694912
END: th(86866.80670208555)=-0.8904011521694912; dx=-2.882690676657728E-6 evalInputDelta=0.3464449976031956
Fitness changed from -0.5439561545662956 to -0.8904011521694912
Iteration 1 complete. Error: -0.8904011521694912 Total: 1.4688; Orientation: 0.0015; Line Search: 1.1057
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/12b72ca3-3901-4b05-9b5d-ba69045ea946.jpg)
Adding measurement 182b40da to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.8904011521694912;dx=-1.2976971861634088E-5
New Minimum: -0.8904011521694912 > -1.5575443318489166
END: th(187148.86177126726)=-1.5575443318489166; dx=-1.775590567446996E-6 evalInputDelta=0.6671431796794254
Fitness changed from -0.8904011521694912 to -1.5575443318489166
Iteration 2 complete. Error: -1.5575443318489166 Total: 0.3605; Orientation: 0.0017; Line Search: 0.2324
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ac37a5f5-bf42-43a6-a3f7-3ec0373da1f3.jpg)
Adding measurement 5f36d878 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.5575443318489166;dx=-1.4519852688867828E-5
New Minimum: -1.5575443318489166 > -1.7073395987983435
WOLF (strong): th(403200.00000000006)=-1.7073395987983435; dx=6.368112559109248E-8 evalInputDelta=0.1497952669494269
New Minimum: -1.7073395987983435 > -2.10049815059564
END: th(201600.00000000003)=-2.10049815059564; dx=-8.568464656708951E-8 evalInputDelta=0.5429538187467233
Fitness changed from -1.5575443318489166 to -2.10049815059564
Iteration 3 complete. Error: -2.10049815059564 Total: 0.5371; Orientation: 0.0016; Line Search: 0.3972
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4f5ffff3-b554-46b8-8f67-3629a086af38.jpg)
Adding measurement 3db3f11 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.756e+03, gradient 3.493e-03, dot -0.204; [3db99ed1-fe6f-4eff-95cf-6ae1e7c833ee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.10049815059564, -1.5575443318489166, -0.8904011521694912, -0.5439561545662956
LBFGS Accumulation History: 3 points
Removed measurement 3db3f11 to history. Total: 3
th(0)=-2.10049815059564;dx=-1.1615928033726631E-5
New Minimum: -2.10049815059564 > -2.410203277171698
WOLF (strong): th(434334.03351042786)=-2.410203277171698; dx=7.070642944161797E-7 evalInputDelta=0.3097051265760582
New Minimum: -2.410203277171698 > -3.186244855880222
WOLF (strong): th(217167.01675521393)=-3.186244855880222; dx=4.4212630273556975E-7 evalInputDelta=1.0857467052845822
END: th(72389.00558507131)=-3.0025993338988113; dx=-6.795260140875792E-6 evalInputDelta=0.9021011833031714
Fitness changed from -2.10049815059564 to -3.186244855880222
Iteration 4 complete. Error: -3.186244855880222 Total: 3.5655; Orientation: 0.1786; Line Search: 3.2400
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b9454528-1865-47b0-8c2d-c7e7f014626d.jpg)
Adding measurement 1ad8a7cc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.528e+03, gradient 3.304e-03, dot -0.239; [3db99ed1-fe6f-4eff-95cf-6ae1e7c833ee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.186244855880222, -1.5575443318489166, -0.8904011521694912, -0.5439561545662956
LBFGS Accumulation History: 3 points
Removed measurement 1ad8a7cc to history. Total: 3
th(0)=-3.186244855880222;dx=-1.0582055135926116E-5
New Minimum: -3.186244855880222 > -4.021417884133592
END: th(155957.38480938942)=-4.021417884133592; dx=-1.9003760265099601E-6 evalInputDelta=0.8351730282533696
Fitness changed from -3.186244855880222 to -4.021417884133592
Iteration 5 complete. Error: -4.021417884133592 Total: 0.5778; Orientation: 0.0555; Line Search: 0.3340
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/202c93c2-659f-4693-833a-973a67c94f8e.jpg)
Adding measurement 61023799 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.557e+03, gradient 2.934e-03, dot -0.237; [3db99ed1-fe6f-4eff-95cf-6ae1e7c833ee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.021417884133592, -1.5575443318489166, -0.8904011521694912, -0.5439561545662956
LBFGS Accumulation History: 3 points
Removed measurement 61023799 to history. Total: 3
th(0)=-4.021417884133592;dx=-8.307796168598989E-6
New Minimum: -4.021417884133592 > -4.16426615890897
WOLF (strong): th(336000.0000000001)=-4.16426615890897; dx=1.9185187078819787E-7 evalInputDelta=0.14284827477537831
New Minimum: -4.16426615890897 > -4.446102145683494
END: th(168000.00000000006)=-4.446102145683494; dx=-1.2375938867276215E-6 evalInputDelta=0.4246842615499027
Fitness changed from -4.021417884133592 to -4.446102145683494
Iteration 6 complete. Error: -4.446102145683494 Total: 0.5728; Orientation: 0.0354; Line Search: 0.3782
Adding measurement 24ae091b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.497e+03, gradient 2.803e-03, dot -0.274; [3db99ed1-fe6f-4eff-95cf-6ae1e7c833ee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.446102145683494, -1.5575443318489166, -0.8904011521694912, -0.5439561545662956
LBFGS Accumulation History: 3 points
Removed measurement 24ae091b to history. Total: 3
th(0)=-4.446102145683494;dx=-7.6233665918355025E-6
Armijo: th(361945.0279253566)=-3.912730951915823; dx=9.083852822921222E-7 evalInputDelta=-0.5333711937676715
New Minimum: -4.446102145683494 > -4.65641593450494
END: th(180972.5139626783)=-4.65641593450494; dx=-1.1170255419273486E-8 evalInputDelta=0.2103137888214457
Fitness changed from -4.446102145683494 to -4.65641593450494
Iteration 7 complete. Error: -4.65641593450494 Total: 0.5160; Orientation: 0.0333; Line Search: 0.3654
Adding measurement 616b69f3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.936e+03, gradient 2.975e-03, dot -0.256; [3db99ed1-fe6f-4eff-95cf-6ae1e7c833ee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.65641593450494, -1.5575443318489166, -0.8904011521694912, -0.5439561545662956
LBFGS Accumulation History: 3 points
Removed measurement 616b69f3 to history. Total: 3
th(0)=-4.65641593450494;dx=-8.637365932049238E-6
Armijo: th(389893.4620234736)=-4.485513871022411; dx=1.4688699922591112E-6 evalInputDelta=-0.17090206348252934
New Minimum: -4.65641593450494 > -5.241345456323249
WOLF (strong): th(194946.7310117368)=-5.241345456323249; dx=5.854821022151548E-7 evalInputDelta=0.5849295218183093
END: th(64982.24367057893)=-5.151261397106501; dx=-4.263853521079014E-6 evalInputDelta=0.49484546260156126
Fitness changed from -4.65641593450494 to -5.241345456323249
Iteration 8 complete. Error: -5.241345456323249 Total: 0.6296; Orientation: 0.0320; Line Search: 0.4824
Adding measurement 4d62d1f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.619e+03, gradient 2.923e-03, dot -0.263; [3db99ed1-fe6f-4eff-95cf-6ae1e7c833ee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.241345456323249, -1.5575443318489166, -0.8904011521694912, -0.5439561545662956
LBFGS Accumulation History: 3 points
Removed measurement 4d62d1f7 to history. Total: 3
th(0)=-5.241345456323249;dx=-8.229495908670616E-6
New Minimum: -5.241345456323249 > -5.779039998213899
END: th(140000.00000000006)=-5.779039998213899; dx=-1.2367560792003402E-6 evalInputDelta=0.5376945418906498
Fitness changed from -5.241345456323249 to -5.779039998213899
Iteration 9 complete. Error: -5.779039998213899 Total: 0.4063; Orientation: 0.0335; Line Search: 0.2453
Adding measurement 5a4d851e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.472e+03, gradient 2.218e-03, dot -0.355; [3db99ed1-fe6f-4eff-95cf-6ae1e7c833ee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.779039998213899, -1.5575443318489166, -0.8904011521694912, -0.5439561545662956
LBFGS Accumulation History: 3 points
Removed measurement 5a4d851e to history. Total: 3
th(0)=-5.779039998213899;dx=-4.6473848158814685E-6
New Minimum: -5.779039998213899 > -6.124408957491426
END: th(301620.8566044639)=-6.124408957491426; dx=-2.778508658132988E-7 evalInputDelta=0.3453689592775273
Fitness changed from -5.779039998213899 to -6.124408957491426
Iteration 10 complete. Error: -6.124408957491426 Total: 0.3994; Orientation: 0.0339; Line Search: 0.2453
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e74f9501-96d5-4dcb-b0fb-4a5e2e0c6427.jpg)
Final threshold in iteration 11: -6.124408957491426 (> -Infinity) after 9.045s (< 5400.000s)

Returns

    -6.124408957491426