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.89 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: 141374967657600
Reset training subject: 141375149364500
Adding measurement 7507716 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-13.540925898709288;dx=-0.05319188050166916
New Minimum: -13.540925898709288 > -13.57951728873018
WOLFE (weak): th(2.154434690031884)=-13.57951728873018; dx=-0.05317092260019207 evalInputDelta=0.03859139002089229
New Minimum: -13.57951728873018 > -13.617429537435884
WOLFE (weak): th(4.308869380063768)=-13.617429537435884; dx=-0.05398464437870367 evalInputDelta=0.07650363872659582
New Minimum: -13.617429537435884 > -13.771396150307744
WOLFE (weak): th(12.926608140191302)=-13.771396150307744; dx=-0.05405517010614902 evalInputDelta=0.23047025159845624
New Minimum: -13.771396150307744 > -14.572849247167284
WOLFE (weak): th(51.70643256076521)=-14.572849247167284; dx=-0.050886313084450616 evalInputDelta=1.0319233484579957
New Minimum: -14.572849247167284 > -19.981764300006535
END: th(258.53216280382605)=-19.981764300006535; dx=-0.03286840075463689 evalInputDelta=6.440838401297247
Fitness changed from -13.540925898709288 to -19.981764300006535
Iteration 1 complete. Error: -19.981764300006535 Total: 1.1671; Orientation: 0.0016; Line Search: 0.6982
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5dc4509a-8b2e-45d6-a939-c43cf7c4747b.jpg)
Adding measurement 5be66a2 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-19.981764300006535;dx=-0.05607797147048349
New Minimum: -19.981764300006535 > -29.507802157795382
END: th(556.9906600335335)=-29.507802157795382; dx=-0.012168295808324493 evalInputDelta=9.526037857788847
Fitness changed from -19.981764300006535 to -29.507802157795382
Iteration 2 complete. Error: -29.507802157795382 Total: 0.3648; Orientation: 0.0016; Line Search: 0.2411
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3130b740-a6fe-415a-af12-686ac41d5702.jpg)
Adding measurement 3cdbe2c1 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-29.507802157795382;dx=-0.066679156106384
New Minimum: -29.507802157795382 > -42.60666904453237
END: th(1200.0)=-42.60666904453237; dx=-0.004594045613708698 evalInputDelta=13.098866886736985
Fitness changed from -29.507802157795382 to -42.60666904453237
Iteration 3 complete. Error: -42.60666904453237 Total: 0.3578; Orientation: 0.0016; Line Search: 0.2343
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5f1d43ab-630d-41af-af08-5b56c9fefee8.jpg)
Adding measurement 7af9e45 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.313e+03, gradient 2.832e-01, dot -0.361; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -42.60666904453237, -29.507802157795382, -19.981764300006535, -13.540925898709288
LBFGS Accumulation History: 3 points
Removed measurement 7af9e45 to history. Total: 3
th(0)=-42.60666904453237;dx=-0.07775743743318828
New Minimum: -42.60666904453237 > -79.85558559538119
END: th(2585.3216280382608)=-79.85558559538119; dx=-3.4489849832233213E-4 evalInputDelta=37.24891655084882
Fitness changed from -42.60666904453237 to -79.85558559538119
Iteration 4 complete. Error: -79.85558559538119 Total: 0.3835; Orientation: 0.0310; Line Search: 0.2271
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7cbfb181-4fdb-4985-bcd2-7a236a2d9fc3.jpg)
Adding measurement 76479261 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.907e+02, gradient 3.005e-01, dot -0.154; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.85558559538119, -29.507802157795382, -19.981764300006535, -13.540925898709288
LBFGS Accumulation History: 3 points
Removed measurement 76479261 to history. Total: 3
th(0)=-79.85558559538119;dx=-0.08778957046821205
New Minimum: -79.85558559538119 > -120.9696097554051
WOLF (strong): th(5569.9066003353355)=-120.9696097554051; dx=0.0033381297311903518 evalInputDelta=41.11402416002392
New Minimum: -120.9696097554051 > -157.95947982196256
END: th(2784.9533001676677)=-157.95947982196256; dx=-0.003938865646990085 evalInputDelta=78.10389422658137
Fitness changed from -79.85558559538119 to -157.95947982196256
Iteration 5 complete. Error: -157.95947982196256 Total: 0.5037; Orientation: 0.0306; Line Search: 0.3493
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e86a5649-94a9-4312-94f6-fb16d9b6b6b9.jpg)
Adding measurement 30b6ee96 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.999e+03, gradient 3.774e-01, dot -0.182; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -157.95947982196256, -29.507802157795382, -19.981764300006535, -13.540925898709288
LBFGS Accumulation History: 3 points
Removed measurement 30b6ee96 to history. Total: 3
th(0)=-157.95947982196256;dx=-0.13922999642633727
Armijo: th(6000.000000000001)=-136.87574200712118; dx=0.005235477754694507 evalInputDelta=-21.083737814841385
New Minimum: -157.95947982196256 > -228.05104965774657
WOLF (strong): th(3000.0000000000005)=-228.05104965774657; dx=0.004009882122566221 evalInputDelta=70.09156983578401
New Minimum: -228.05104965774657 > -248.61142496876525
END: th(1000.0000000000001)=-248.61142496876525; dx=-0.036774114516217836 evalInputDelta=90.65194514680269
Fitness changed from -157.95947982196256 to -248.61142496876525
Iteration 6 complete. Error: -248.61142496876525 Total: 0.6220; Orientation: 0.0293; Line Search: 0.4707
Adding measurement 3dc5a27d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.892e+03, gradient 3.060e-01, dot -0.246; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -248.61142496876525, -29.507802157795382, -19.981764300006535, -13.540925898709288
LBFGS Accumulation History: 3 points
Removed measurement 3dc5a27d to history. Total: 3
th(0)=-248.61142496876525;dx=-0.09162137730220964
New Minimum: -248.61142496876525 > -317.23129623746144
END: th(2154.434690031884)=-317.23129623746144; dx=-0.013596276820746697 evalInputDelta=68.61987126869619
Fitness changed from -248.61142496876525 to -317.23129623746144
Iteration 7 complete. Error: -317.23129623746144 Total: 0.3653; Orientation: 0.0273; Line Search: 0.2279
Adding measurement 6a95462 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.367e+04, gradient 3.399e-01, dot -0.269; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -317.23129623746144, -29.507802157795382, -19.981764300006535, -13.540925898709288
LBFGS Accumulation History: 3 points
Removed measurement 6a95462 to history. Total: 3
th(0)=-317.23129623746144;dx=-0.11379515182509375
Armijo: th(4641.58883361278)=-303.5963731873291; dx=0.003690754260851169 evalInputDelta=-13.634923050132329
New Minimum: -317.23129623746144 > -376.8320041809082
END: th(2320.79441680639)=-376.8320041809082; dx=-0.00414004572436015 evalInputDelta=59.600707943446764
Fitness changed from -317.23129623746144 to -376.8320041809082
Iteration 8 complete. Error: -376.8320041809082 Total: 0.4969; Orientation: 0.0292; Line Search: 0.3591
Adding measurement 53a61c58 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 5.853e+03, gradient 3.349e-01, dot 0.368; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-376.8320041809082;dx=-720.799474138307
Armijo: th(5000.000000000002)=-371.5781588374107; dx=0.023510698485969463 evalInputDelta=-5.253845343497517
Armijo: th(2500.000000000001)=-372.12999660736835; dx=0.046224100905753046 evalInputDelta=-4.702007573539845
Armijo: th(833.3333333333336)=-374.2244271490037; dx=0.13790616772749742 evalInputDelta=-2.6075770319044977
New Minimum: -376.8320041809082 > -377.116547800544
WOLF (strong): th(208.3333333333334)=-377.116547800544; dx=0.5651264075787755 evalInputDelta=0.2845436196358264
New Minimum: -377.116547800544 > -386.98322395809356
WOLF (strong): th(41.66666666666668)=-386.98322395809356; dx=2.7976310820899553 evalInputDelta=10.15121977718536
New Minimum: -386.98322395809356 > -418.0170637964436
WOLF (strong): th(6.944444444444446)=-418.0170637964436; dx=13.158421061133327 evalInputDelta=41.18505961553541
New Minimum: -418.0170637964436 > -655.0531466988003
END: th(0.9920634920634923)=-655.0531466988003; dx=-158.6474248374111 evalInputDelta=278.22114251789213
Fitness changed from -376.8320041809082 to -655.0531466988003
Iteration 9 complete. Error: -655.0531466988003 Total: 1.0673; Orientation: 0.0282; Line Search: 0.9274
Adding measurement 1cd2a589 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.582e+04, gradient 3.099e-01, dot -0.072; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -655.0531466988003, -376.8320041809082, -29.507802157795382, -19.981764300006535, -13.540925898709288
Rejected: LBFGS Orientation magnitude: 3.473e+04, gradient 3.099e-01, dot -0.227; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -655.0531466988003, -376.8320041809082, -29.507802157795382, -19.981764300006535
LBFGS Accumulation History: 3 points
Removed measurement 1cd2a589 to history. Total: 4
Removed measurement 53a61c58 to history. Total: 3
th(0)=-655.0531466988003;dx=-0.09527621941824992
New Minimum: -655.0531466988003 > -655.2918958372674
END: th(2.137336002015758)=-655.2918958372674; dx=-0.08434900580929709 evalInputDelta=0.2387491384670284
Fitness changed from -655.0531466988003 to -655.2918958372674
Iteration 10 complete. Error: -655.2918958372674 Total: 0.4368; Orientation: 0.0614; Line Search: 0.2367
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/03653fb6-61e1-4382-b9c7-bc3180983d39.jpg)
Adding measurement 5e34b7c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.607e+04, gradient 3.109e-01, dot -0.217; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -655.2918958372674, -29.507802157795382, -19.981764300006535, -13.540925898709288
LBFGS Accumulation History: 3 points
Removed measurement 5e34b7c1 to history. Total: 3
th(0)=-655.2918958372674;dx=-0.09430221048585258
New Minimum: -655.2918958372674 > -655.8149272088887
END: th(4.604750826996805)=-655.8149272088887; dx=-0.08423229014436065 evalInputDelta=0.5230313716213004
Fitness changed from -655.2918958372674 to -655.8149272088887
Iteration 11 complete. Error: -655.8149272088887 Total: 0.3855; Orientation: 0.0298; Line Search: 0.2347
Adding measurement 13b66d95 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.755e+04, gradient 3.111e-01, dot -0.221; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -655.8149272088887, -29.507802157795382, -19.981764300006535, -13.540925898709288
LBFGS Accumulation History: 3 points
Removed measurement 13b66d95 to history. Total: 3
th(0)=-655.8149272088887;dx=-0.09520861720148158
New Minimum: -655.8149272088887 > -656.9407555099623
END: th(9.920634920634923)=-656.9407555099623; dx=-0.08324778362616908 evalInputDelta=1.125828301073625
Fitness changed from -655.8149272088887 to -656.9407555099623
Iteration 12 complete. Error: -656.9407555099623 Total: 0.5910; Orientation: 0.2527; Line Search: 0.2253
Adding measurement 31938ebd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.771e+04, gradient 3.127e-01, dot -0.221; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -656.9407555099623, -29.507802157795382, -19.981764300006535, -13.540925898709288
LBFGS Accumulation History: 3 points
Removed measurement 31938ebd to history. Total: 3
th(0)=-656.9407555099623;dx=-0.09636249370766142
New Minimum: -656.9407555099623 > -659.3793720234203
END: th(21.37336002015758)=-659.3793720234203; dx=-0.08516415311477302 evalInputDelta=2.438616513457987
Fitness changed from -656.9407555099623 to -659.3793720234203
Iteration 13 complete. Error: -659.3793720234203 Total: 0.3774; Orientation: 0.0278; Line Search: 0.2364
Adding measurement 27799623 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.795e+04, gradient 3.144e-01, dot -0.220; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -659.3793720234203, -29.507802157795382, -19.981764300006535, -13.540925898709288
LBFGS Accumulation History: 3 points
Removed measurement 27799623 to history. Total: 3
th(0)=-659.3793720234203;dx=-0.09711729627062243
New Minimum: -659.3793720234203 > -664.6604866396076
END: th(46.047508269968056)=-664.6604866396076; dx=-0.08564867828799427 evalInputDelta=5.281114616187324
Fitness changed from -659.3793720234203 to -664.6604866396076
Iteration 14 complete. Error: -664.6604866396076 Total: 0.3777; Orientation: 0.0283; Line Search: 0.2376
Adding measurement 4c265835 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.694e+04, gradient 3.113e-01, dot -0.219; [bfd1f785-9711-491b-bae7-7bc7b411fcd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -664.6604866396076, -29.507802157795382, -19.981764300006535, -13.540925898709288
LBFGS Accumulation History: 3 points
Removed measurement 4c265835 to history. Total: 3
th(0)=-664.6604866396076;dx=-0.09637299059715294
New Minimum: -664.6604866396076 > -675.741537127917
END: th(99.20634920634923)=-675.741537127917; dx=-0.08275234088375284 evalInputDelta=11.081050488309415
Fitness changed from -664.6604866396076 to -675.741537127917
Iteration 15 complete. Error: -675.741537127917 Total: 0.3769; Orientation: 0.0289; Line Search: 0.2324
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/7d92ce5e-0233-43ba-86a2-f0a50094887c.jpg)
Final threshold in iteration 16: -675.741537127917 (> -Infinity) after 7.886s (< 5400.000s)

Returns

    -675.741537127917