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 60.49 seconds (0.835 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: 146917362439000
Reset training subject: 146918392497300
Adding measurement 6d3ca9d4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-132.23029744540395;dx=-0.015473314381510294
New Minimum: -132.23029744540395 > -132.25897890124511
WOLFE (weak): th(2.154434690031884)=-132.25897890124511; dx=-0.01478826114359654 evalInputDelta=0.028681455841166326
New Minimum: -132.25897890124511 > -132.28769843129783
WOLFE (weak): th(4.308869380063768)=-132.28769843129783; dx=-0.014788685953577078 evalInputDelta=0.05740098589387799
New Minimum: -132.28769843129783 > -132.4024036200816
WOLFE (weak): th(12.926608140191302)=-132.4024036200816; dx=-0.014726708538473934 evalInputDelta=0.17210617467765132
New Minimum: -132.4024036200816 > -132.91746587403404
WOLFE (weak): th(51.70643256076521)=-132.91746587403404; dx=-0.014719297242580153 evalInputDelta=0.6871684286300876
New Minimum: -132.91746587403404 > -135.64623969631447
WOLFE (weak): th(258.53216280382605)=-135.64623969631447; dx=-0.014626401889216493 evalInputDelta=3.4159422509105184
New Minimum: -135.64623969631447 > -152.2950146405817
WOLFE (weak): th(1551.1929768229563)=-152.2950146405817; dx=-0.014239455591870795 evalInputDelta=20.064717195177764
New Minimum: -152.2950146405817 > -232.71403958238102
END: th(10858.350837760694)=-232.71403958238102; dx=-0.007217042529677696 evalInputDelta=100.48374213697707
Fitness changed from -132.23029744540395 to -232.71403958238102
Iteration 1 complete. Error: -232.71403958238102 Total: 9.8933; Orientation: 0.0146; Line Search: 7.2059
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f529ce30-7222-40ba-bad9-0bdec1cd1b6e.jpg)
Adding measurement 7d1e1cad to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-232.71403958238102;dx=-0.012366828419007542
New Minimum: -232.71403958238102 > -366.4386672759849
END: th(23393.607721408407)=-366.4386672759849; dx=-0.004451356478811631 evalInputDelta=133.7246276936039
Fitness changed from -232.71403958238102 to -366.4386672759849
Iteration 2 complete. Error: -366.4386672759849 Total: 2.7273; Orientation: 0.0143; Line Search: 1.7977
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7ed8eb61-d9cb-4a97-8f13-2644d9484099.jpg)
Adding measurement 6cf5f69e to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-366.4386672759849;dx=-0.013723444465032025
New Minimum: -366.4386672759849 > -490.29598840904254
END: th(50400.00000000001)=-490.29598840904254; dx=-0.0011956001452071744 evalInputDelta=123.85732113305761
Fitness changed from -366.4386672759849 to -490.29598840904254
Iteration 3 complete. Error: -490.29598840904254 Total: 2.6254; Orientation: 0.0143; Line Search: 1.7066
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a04136bd-1bd9-423a-83ba-3e305738c96d.jpg)
Adding measurement 2f814fc5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.353e+04, gradient 1.305e-01, dot -0.263; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -490.29598840904254, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 2f814fc5 to history. Total: 3
th(0)=-490.29598840904254;dx=-0.01689199587756855
Armijo: th(108583.50837760697)=-478.85532457622315; dx=9.931141082903062E-4 evalInputDelta=-11.440663832819382
New Minimum: -490.29598840904254 > -638.8395485174661
END: th(54291.75418880348)=-638.8395485174661; dx=-1.5601469780999127E-4 evalInputDelta=148.5435601084236
Fitness changed from -490.29598840904254 to -638.8395485174661
Iteration 4 complete. Error: -638.8395485174661 Total: 3.9429; Orientation: 0.3186; Line Search: 2.6784
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/680aaa36-f073-40a9-8d64-1f67471b29dc.jpg)
Adding measurement 36a4db74 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.554e+04, gradient 1.320e-01, dot -0.245; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -638.8395485174661, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 36a4db74 to history. Total: 3
th(0)=-638.8395485174661;dx=-0.01739923210071577
Armijo: th(116968.03860704206)=-570.1836052974515; dx=0.0019178410656567686 evalInputDelta=-68.65594322001459
New Minimum: -638.8395485174661 > -790.0311307157459
WOLF (strong): th(58484.01930352103)=-790.0311307157459; dx=8.832749899528056E-4 evalInputDelta=151.19158219827978
New Minimum: -790.0311307157459 > -820.9896847707649
END: th(19494.673101173677)=-820.9896847707649; dx=-0.006073954477376011 evalInputDelta=182.1501362532988
Fitness changed from -638.8395485174661 to -820.9896847707649
Iteration 5 complete. Error: -820.9896847707649 Total: 4.5856; Orientation: 0.2744; Line Search: 3.3691
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/3be3aff0-0aff-4c8e-a066-49ef1bbd68d3.jpg)
Adding measurement 2b9a282 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.528e+04, gradient 1.051e-01, dot -0.322; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -820.9896847707649, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 2b9a282 to history. Total: 3
th(0)=-820.9896847707649;dx=-0.01093281087215799
New Minimum: -820.9896847707649 > -982.518670306066
END: th(42000.000000000015)=-982.518670306066; dx=-0.0026579065618436352 evalInputDelta=161.5289855353011
Fitness changed from -820.9896847707649 to -982.518670306066
Iteration 6 complete. Error: -982.518670306066 Total: 3.0391; Orientation: 0.2899; Line Search: 1.8583
Adding measurement 64fe6587 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.183e+04, gradient 1.149e-01, dot -0.285; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -982.518670306066, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 64fe6587 to history. Total: 3
th(0)=-982.518670306066;dx=-0.013167546359392567
Armijo: th(90486.25698133915)=-946.3646561975992; dx=0.0012885735259640894 evalInputDelta=-36.15401410846687
New Minimum: -982.518670306066 > -1082.5534051491409
END: th(45243.12849066957)=-1082.5534051491409; dx=-5.300598573751371E-4 evalInputDelta=100.03473484307483
Fitness changed from -982.518670306066 to -1082.5534051491409
Iteration 7 complete. Error: -1082.5534051491409 Total: 3.6836; Orientation: 0.2712; Line Search: 2.5848
Adding measurement 5ae4046a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.043e+04, gradient 1.256e-01, dot -0.260; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1082.5534051491409, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 5ae4046a to history. Total: 3
th(0)=-1082.5534051491409;dx=-0.015619018846667283
Armijo: th(97473.3655058684)=-930.1109476831246; dx=0.0027308569716463275 evalInputDelta=-152.44245746601632
New Minimum: -1082.5534051491409 > -1167.8407960848087
WOLF (strong): th(48736.6827529342)=-1167.8407960848087; dx=0.001685728894641717 evalInputDelta=85.28739093566787
New Minimum: -1167.8407960848087 > -1211.192284486654
END: th(16245.560917644732)=-1211.192284486654; dx=-0.004946519663653564 evalInputDelta=128.63887933751312
Fitness changed from -1082.5534051491409 to -1211.192284486654
Iteration 8 complete. Error: -1211.192284486654 Total: 4.5054; Orientation: 0.2712; Line Search: 3.4433
Adding measurement 4c4d3459 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.939e+04, gradient 9.951e-02, dot -0.353; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1211.192284486654, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 4c4d3459 to history. Total: 3
th(0)=-1211.192284486654;dx=-0.009881006111930813
New Minimum: -1211.192284486654 > -1323.6978507197177
END: th(35000.000000000015)=-1323.6978507197177; dx=-0.0028984276992745257 evalInputDelta=112.50556623306375
Fitness changed from -1211.192284486654 to -1323.6978507197177
Iteration 9 complete. Error: -1323.6978507197177 Total: 3.0292; Orientation: 0.2743; Line Search: 1.9586
Adding measurement 60b4c8a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.337e+05, gradient 1.047e-01, dot -0.360; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1323.6978507197177, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 60b4c8a0 to history. Total: 3
th(0)=-1323.6978507197177;dx=-0.01095485611730185
New Minimum: -1323.6978507197177 > -1343.6107137113786
WOLF (strong): th(75405.21415111597)=-1343.6107137113786; dx=4.437232046500271E-4 evalInputDelta=19.91286299166086
New Minimum: -1343.6107137113786 > -1416.623273845238
END: th(37702.607075557986)=-1416.623273845238; dx=-0.0014417446155841722 evalInputDelta=92.92542312552018
Fitness changed from -1323.6978507197177 to -1416.623273845238
Iteration 10 complete. Error: -1416.623273845238 Total: 3.6617; Orientation: 0.2694; Line Search: 2.5657
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/54f0e1fa-98a5-4d13-9238-983fea6adc3b.jpg)
Adding measurement 219c962c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.555e+05, gradient 1.133e-01, dot -0.315; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1416.623273845238, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 219c962c to history. Total: 3
th(0)=-1416.623273845238;dx=-0.012733806426248722
Armijo: th(81227.80458822368)=-1306.656994011818; dx=0.002327400131324815 evalInputDelta=-109.96627983342
New Minimum: -1416.623273845238 > -1485.3799177314872
WOLF (strong): th(40613.90229411184)=-1485.3799177314872; dx=6.423260609662156E-4 evalInputDelta=68.75664388624932
New Minimum: -1485.3799177314872 > -1499.627620444489
END: th(13537.967431370613)=-1499.627620444489; dx=-0.004385992939346709 evalInputDelta=83.004346599251
Fitness changed from -1416.623273845238 to -1499.627620444489
Iteration 11 complete. Error: -1499.627620444489 Total: 4.6508; Orientation: 0.2821; Line Search: 3.4686
Adding measurement 1a6ff9af to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.550e+05, gradient 9.266e-02, dot -0.402; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1499.627620444489, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 1a6ff9af to history. Total: 3
th(0)=-1499.627620444489;dx=-0.008571266270877795
New Minimum: -1499.627620444489 > -1588.1197215575405
END: th(29166.666666666686)=-1588.1197215575405; dx=-0.003178970884748393 evalInputDelta=88.4921011130516
Fitness changed from -1499.627620444489 to -1588.1197215575405
Iteration 12 complete. Error: -1588.1197215575405 Total: 3.0031; Orientation: 0.2892; Line Search: 1.7749
Adding measurement 2c89fbe9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.873e+05, gradient 9.547e-02, dot -0.395; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1588.1197215575405, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 2c89fbe9 to history. Total: 3
th(0)=-1588.1197215575405;dx=-0.009069761824438138
New Minimum: -1588.1197215575405 > -1654.8660821951726
END: th(62837.67845926332)=-1654.8660821951726; dx=-0.0010092519343764031 evalInputDelta=66.74636063763205
Fitness changed from -1588.1197215575405 to -1654.8660821951726
Iteration 13 complete. Error: -1654.8660821951726 Total: 2.7440; Orientation: 0.2736; Line Search: 1.6806
Adding measurement 11abbcee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.300e+06, gradient 1.239e-01, dot -0.293; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1654.8660821951726, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 11abbcee to history. Total: 3
th(0)=-1654.8660821951726;dx=-0.015304532814129223
Armijo: th(135379.67431370614)=-1221.7246007181816; dx=0.0027002101366469045 evalInputDelta=-433.141481476991
Armijo: th(67689.83715685307)=-1591.706395664728; dx=0.002795033603063838 evalInputDelta=-63.15968653044456
New Minimum: -1654.8660821951726 > -1773.1010969485073
END: th(22563.279052284357)=-1773.1010969485073; dx=-0.0018550874419849682 evalInputDelta=118.23501475333478
Fitness changed from -1654.8660821951726 to -1773.1010969485073
Iteration 14 complete. Error: -1773.1010969485073 Total: 4.5600; Orientation: 0.2725; Line Search: 3.4475
Adding measurement 35589e23 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.939e+06, gradient 1.048e-01, dot -0.342; [721185ae-86c1-4ba8-8948-608e0f8f1cab = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1773.1010969485073, -366.4386672759849, -232.71403958238102, -132.23029744540395
LBFGS Accumulation History: 3 points
Removed measurement 35589e23 to history. Total: 3
th(0)=-1773.1010969485073;dx=-0.01089916268782756
New Minimum: -1773.1010969485073 > -1814.2685165101664
WOLF (strong): th(48611.111111111146)=-1814.2685165101664; dx=4.963900111644509E-5 evalInputDelta=41.16741956165902
New Minimum: -1814.2685165101664 > -1845.6514432579083
END: th(24305.555555555573)=-1845.6514432579083; dx=-0.0018430300452820353 evalInputDelta=72.550346309401
Fitness changed from -1773.1010969485073 to -1845.6514432579083
Iteration 15 complete. Error: -1845.6514432579083 Total: 3.7466; Orientation: 0.2608; Line Search: 2.5689
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/5e3f91d7-d39f-47b4-b0d4-82658184f05a.jpg)
Final threshold in iteration 16: -1845.6514432579083 (> -Infinity) after 60.494s (< 5400.000s)

Returns

    -1845.6514432579083