Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

BasicOptimizer.scala:89 executed in 59.10 seconds (1.118 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: 142262945838100
Reset training subject: 142263878267600
Adding measurement 7fc3361d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-66.77925023327792;dx=-0.005602697235624046
New Minimum: -66.77925023327792 > -66.79492138956
WOLFE (weak): th(2.154434690031884)=-66.79492138956; dx=-0.005251460594046175 evalInputDelta=0.01567115628208171
New Minimum: -66.79492138956 > -66.81059617844126
WOLFE (weak): th(4.308869380063768)=-66.81059617844126; dx=-0.005301106027334704 evalInputDelta=0.031345945163337774
New Minimum: -66.81059617844126 > -66.87344843410388
WOLFE (weak): th(12.926608140191302)=-66.87344843410388; dx=-0.0053007273209894 evalInputDelta=0.0941982008259572
New Minimum: -66.87344843410388 > -67.15705342120624
WOLFE (weak): th(51.70643256076521)=-67.15705342120624; dx=-0.00514606503357524 evalInputDelta=0.3778031879283219
New Minimum: -67.15705342120624 > -68.6764094777093
WOLFE (weak): th(258.53216280382605)=-68.6764094777093; dx=-0.0052204974632172885 evalInputDelta=1.8971592444313785
New Minimum: -68.6764094777093 > -78.53596595967194
WOLFE (weak): th(1551.1929768229563)=-78.53596595967194; dx=-0.0054135100332378255 evalInputDelta=11.75671572639402
New Minimum: -78.53596595967194 > -147.61127952751443
END: th(10858.350837760694)=-147.61127952751443; dx=-0.004643325961956414 evalInputDelta=80.8320292942365
Fitness changed from -66.77925023327792 to -147.61127952751443
Iteration 1 complete. Error: -147.61127952751443 Total: 10.1536; Orientation: 0.0154; Line Search: 7.5763
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e77da316-1b13-4d04-a465-f12c29238a6d.jpg)
Adding measurement 71110298 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-147.61127952751443;dx=-0.009099423860369962
New Minimum: -147.61127952751443 > -321.0944905709221
END: th(23393.607721408407)=-321.0944905709221; dx=-0.0039134100989057004 evalInputDelta=173.4832110434077
Fitness changed from -147.61127952751443 to -321.0944905709221
Iteration 2 complete. Error: -321.0944905709221 Total: 2.6235; Orientation: 0.0145; Line Search: 1.6715
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/34e2516a-4fd0-446c-bd26-bc087eb1d2d2.jpg)
Adding measurement 3585e936 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-321.0944905709221;dx=-0.01390145639074927
New Minimum: -321.0944905709221 > -621.5360257056706
END: th(50400.00000000001)=-621.5360257056706; dx=-0.0028432269144251197 evalInputDelta=300.44153513474845
Fitness changed from -321.0944905709221 to -621.5360257056706
Iteration 3 complete. Error: -621.5360257056706 Total: 2.6774; Orientation: 0.0144; Line Search: 1.7692
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/fc73524d-c721-4fc3-a5a2-878b43ed6dee.jpg)
Adding measurement b173a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.286e+05, gradient 1.488e-01, dot -0.157; [14279596-2df0-4675-8a07-3d72ca7d57cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -621.5360257056706, -321.0944905709221, -147.61127952751443, -66.77925023327792
LBFGS Accumulation History: 3 points
Removed measurement b173a1 to history. Total: 3
th(0)=-621.5360257056706;dx=-0.02192224408635088
New Minimum: -621.5360257056706 > -762.5324993074066
WOLF (strong): th(108583.50837760697)=-762.5324993074066; dx=1.7221743519092348E-4 evalInputDelta=140.99647360173606
New Minimum: -762.5324993074066 > -969.2999084390755
END: th(54291.75418880348)=-969.2999084390755; dx=-0.0016509681639227717 evalInputDelta=347.7638827334049
Fitness changed from -621.5360257056706 to -969.2999084390755
Iteration 4 complete. Error: -969.2999084390755 Total: 4.0763; Orientation: 0.2831; Line Search: 2.7453
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a8621283-9dcb-4700-a15a-9ede71ec61a4.jpg)
Adding measurement 5c72976e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.844e+05, gradient 1.723e-01, dot -0.129; [14279596-2df0-4675-8a07-3d72ca7d57cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -969.2999084390755, -321.0944905709221, -147.61127952751443, -66.77925023327792
LBFGS Accumulation History: 3 points
Removed measurement 5c72976e to history. Total: 3
th(0)=-969.2999084390755;dx=-0.02942254909486657
Armijo: th(116968.03860704206)=-951.1717444815106; dx=0.0014484226883508728 evalInputDelta=-18.12816395756488
New Minimum: -969.2999084390755 > -1327.3608213293023
WOLF (strong): th(58484.01930352103)=-1327.3608213293023; dx=5.51990413439967E-4 evalInputDelta=358.06091289022686
New Minimum: -1327.3608213293023 > -1370.8141741315633
END: th(19494.673101173677)=-1370.8141741315633; dx=-0.008286062925170156 evalInputDelta=401.5142656924878
Fitness changed from -969.2999084390755 to -1370.8141741315633
Iteration 5 complete. Error: -1370.8141741315633 Total: 4.5560; Orientation: 0.2742; Line Search: 3.3687
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/bbbe2f50-f39f-4882-9a62-c0973966754e.jpg)
Adding measurement 2b80d2c2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.208e+05, gradient 1.497e-01, dot -0.080; [14279596-2df0-4675-8a07-3d72ca7d57cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1370.8141741315633, -321.0944905709221, -147.61127952751443, -66.77925023327792
LBFGS Accumulation History: 3 points
Removed measurement 2b80d2c2 to history. Total: 3
th(0)=-1370.8141741315633;dx=-0.022280711465992212
New Minimum: -1370.8141741315633 > -1750.9298957982298
END: th(42000.000000000015)=-1750.9298957982298; dx=-0.003559782167096383 evalInputDelta=380.11572166666656
Fitness changed from -1370.8141741315633 to -1750.9298957982298
Iteration 6 complete. Error: -1750.9298957982298 Total: 3.1107; Orientation: 0.2824; Line Search: 1.9095
Adding measurement 503e9dc8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.189e+06, gradient 1.866e-01, dot -0.116; [14279596-2df0-4675-8a07-3d72ca7d57cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1750.9298957982298, -321.0944905709221, -147.61127952751443, -66.77925023327792
LBFGS Accumulation History: 3 points
Removed measurement 503e9dc8 to history. Total: 3
th(0)=-1750.9298957982298;dx=-0.034633546853978736
Armijo: th(90486.25698133915)=-1675.444344047274; dx=0.0024350086571866174 evalInputDelta=-75.48555175095589
New Minimum: -1750.9298957982298 > -2046.058955651083
END: th(45243.12849066957)=-2046.058955651083; dx=-3.061566569055078E-4 evalInputDelta=295.12905985285306
Fitness changed from -1750.9298957982298 to -2046.058955651083
Iteration 7 complete. Error: -2046.058955651083 Total: 3.7120; Orientation: 0.2685; Line Search: 2.6100
Adding measurement 99a7baa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.800e+05, gradient 1.826e-01, dot -0.065; [14279596-2df0-4675-8a07-3d72ca7d57cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2046.058955651083, -321.0944905709221, -147.61127952751443, -66.77925023327792
LBFGS Accumulation History: 3 points
Removed measurement 99a7baa to history. Total: 3
th(0)=-2046.058955651083;dx=-0.03311599198081497
Armijo: th(97473.3655058684)=-1604.2194363614972; dx=0.005193799535873957 evalInputDelta=-441.8395192895857
New Minimum: -2046.058955651083 > -2306.231232985973
WOLF (strong): th(48736.6827529342)=-2306.231232985973; dx=0.003233839086555737 evalInputDelta=260.17227733488994
New Minimum: -2306.231232985973 > -2416.549296000394
END: th(16245.560917644732)=-2416.549296000394; dx=-0.010578725516595274 evalInputDelta=370.49034034931105
Fitness changed from -2046.058955651083 to -2416.549296000394
Iteration 8 complete. Error: -2416.549296000394 Total: 4.5348; Orientation: 0.2700; Line Search: 3.4003
Adding measurement 59f72e2e to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.817e+05, gradient 1.539e-01, dot 0.130; [14279596-2df0-4675-8a07-3d72ca7d57cc = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-2416.549296000394;dx=-3609.0926309528622
Armijo: th(35000.000000000015)=-166.46185397298987; dx=0.0011758117190491608 evalInputDelta=-2250.087442027404
Armijo: th(17500.000000000007)=-166.20871785386288; dx=0.0026219779682272173 evalInputDelta=-2250.3405781465312
Armijo: th(5833.333333333336)=-165.8548169710485; dx=0.0068139710185275955 evalInputDelta=-2250.6944790293455
Armijo: th(1458.333333333334)=-166.04004011645804; dx=0.02680220494269181 evalInputDelta=-2250.509255883936
Armijo: th(291.6666666666668)=-167.22741345993487; dx=0.14059416007497383 evalInputDelta=-2249.3218825404592
Armijo: th(48.611111111111136)=-170.88982424723247; dx=0.9812110336431445 evalInputDelta=-2245.6594717531616
Armijo: th(6.944444444444448)=-199.66043439424848; dx=10.368105629285871 evalInputDelta=-2216.8888616061454
Armijo: th(0.868055555555556)=-404.5282167228882; dx=200.36011242579968 evalInputDelta=-2012.0210792775058
Armijo: th(0.09645061728395067)=-1692.6816003017225; dx=3933.9618881411698 evalInputDelta=-723.8676956986715
Armijo: th(0.009645061728395066)=-2403.4308810531666; dx=779.0449056851439 evalInputDelta=-13.118414947227393
New Minimum: -2416.549296000394 > -2417.4471038680454
END: th(8.768237934904606E-4)=-2417.4471038680454; dx=-901.1842931037986 evalInputDelta=0.8978078676514087
Fitness changed from -2416.549296000394 to -2417.4471038680454
Iteration 9 complete. Error: -2417.4471038680454 Total: 11.6459; Orientation: 0.2800; Line Search: 10.5491
Adding measurement 4c6b46de to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.020e+07, gradient 1.542e-01, dot -0.090; [14279596-2df0-4675-8a07-3d72ca7d57cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2417.4471038680454, -2416.549296000394, -321.0944905709221, -147.61127952751443, -66.77925023327792
Rejected: LBFGS Orientation magnitude: 1.182e+07, gradient 1.542e-01, dot -0.245; [14279596-2df0-4675-8a07-3d72ca7d57cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2417.4471038680454, -2416.549296000394, -321.0944905709221, -147.61127952751443
LBFGS Accumulation History: 3 points
Removed measurement 4c6b46de to history. Total: 4
Removed measurement 59f72e2e to history. Total: 3
th(0)=-2417.4471038680454;dx=-0.023509431687576465
Armijo: th(0.001889059597741201)=-2417.4471038680454; dx=-0.01671121268755818 evalInputDelta=0.0
Armijo: th(9.445297988706005E-4)=-2417.4471038680454; dx=-0.01681325452845792 evalInputDelta=0.0
Armijo: th(3.1484326629020016E-4)=-2417.4471038680454; dx=-0.016744787183572737 evalInputDelta=0.0
Armijo: th(7.871081657255004E-5)=-2417.446897038278; dx=-0.016813497927026112 evalInputDelta=-2.0682976719399448E-4
Armijo: th(1.5742163314510007E-5)=-2417.4471038680454; dx=-0.01675055523711951 evalInputDelta=0.0
Armijo: th(2.6236938857516678E-6)=-2417.447000453164; dx=-0.016754731136786258 evalInputDelta=-1.0341488132326049E-4
END: th(3.7481341225023825E-7)=-2417.4471038680454; dx=-0.01687264365925642 evalInputDelta=0.0
Fitness changed from -2417.4471038680454 to -2417.4471038680454
Static Iteration Total: 8.4825; Orientation: 0.5952; Line Search: 6.8774
Iteration 10 failed. Error: -2417.4471038680454
Previous Error: 0.0 -> -2417.4471038680454
Retrying iteration 10
Reset training subject: 142318518524800
Adding measurement 556ce41 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-2417.4471038680454;dx=-0.02358213456004702
END: th(8.075110176411347E-7)=-2417.4471038680454; dx=-0.01673223579759701 evalInputDelta=0.0
Fitness changed from -2417.4471038680454 to -2417.4471038680454
Static Iteration Total: 3.5224; Orientation: 0.0153; Line Search: 1.8962
Iteration 11 failed. Error: -2417.4471038680454
Previous Error: 0.0 -> -2417.4471038680454
Optimization terminated 11
Final threshold in iteration 11: -2417.4471038680454 (> -Infinity) after 59.096s (< 5400.000s)

Returns

    -2417.4471038680454