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 1572.33 seconds (17.028 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: 564649490133400
Reset training subject: 564671665420600
Adding measurement 194d5ffc to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-56.787819227416136;dx=-8.91729735541252E-6
New Minimum: -56.787819227416136 > -56.787845827483835
WOLFE (weak): th(2.154434690031884)=-56.787845827483835; dx=-8.9153651482483E-6 evalInputDelta=2.660006769872325E-5
New Minimum: -56.787845827483835 > -56.78787577122661
WOLFE (weak): th(4.308869380063768)=-56.78787577122661; dx=-8.916736187431924E-6 evalInputDelta=5.6543810472931E-5
New Minimum: -56.78787577122661 > -56.78799147116151
WOLFE (weak): th(12.926608140191302)=-56.78799147116151; dx=-8.906481291390426E-6 evalInputDelta=1.7224374537505582E-4
New Minimum: -56.78799147116151 > -56.78851745686559
WOLFE (weak): th(51.70643256076521)=-56.78851745686559; dx=-8.896244051254353E-6 evalInputDelta=6.982294494548569E-4
New Minimum: -56.78851745686559 > -56.791318155897095
WOLFE (weak): th(258.53216280382605)=-56.791318155897095; dx=-8.898392437173695E-6 evalInputDelta=0.003498928480958341
New Minimum: -56.791318155897095 > -56.80881556161245
WOLFE (weak): th(1551.1929768229563)=-56.80881556161245; dx=-8.8991629310255E-6 evalInputDelta=0.02099633419631175
New Minimum: -56.80881556161245 > -56.9348297502133
WOLFE (weak): th(10858.350837760694)=-56.9348297502133; dx=-8.903576942791123E-6 evalInputDelta=0.1470105227971601
New Minimum: -56.9348297502133 > -57.965388256491465
WOLFE (weak): th(86866.80670208555)=-57.965388256491465; dx=-8.905187854684018E-6 evalInputDelta=1.177569029075329
New Minimum: -57.965388256491465 > -67.2377203958041
WOLFE (weak): th(781801.26031877)=-67.2377203958041; dx=-8.458670698915949E-6 evalInputDelta=10.449901168387967
New Minimum: -67.2377203958041 > -103.50057661834586
END: th(7818012.6031877)=-103.50057661834586; dx=-1.6476651216821641E-7 evalInputDelta=46.712757390929724
Fitness changed from -56.787819227416136 to -103.50057661834586
Iteration 1 complete. Error: -103.50057661834586 Total: 312.7220; Orientation: 0.1581; Line Search: 245.3067
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a170454b-beb0-4797-9111-5bac03c19b13.jpg)
Adding measurement bee2c68 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-103.50057661834586;dx=-1.2609305991495607E-5
New Minimum: -103.50057661834586 > -119.76506583916226
WOLF (strong): th(1.684339755941405E7)=-119.76506583916226; dx=1.4660485894016698E-6 evalInputDelta=16.2644892208164
New Minimum: -119.76506583916226 > -146.23219079563157
WOLF (strong): th(8421698.779707026)=-146.23219079563157; dx=1.9635209976333263E-6 evalInputDelta=42.73161417728571
END: th(2807232.9265690087)=-143.82287240726194; dx=-5.080756240685789E-6 evalInputDelta=40.32229578891608
Fitness changed from -103.50057661834586 to -146.23219079563157
Iteration 2 complete. Error: -146.23219079563157 Total: 114.7740; Orientation: 0.1429; Line Search: 90.0824
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3c8e7be1-e8d8-4ad9-b39e-a7bb86c70a87.jpg)
Adding measurement 33804b36 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-146.23219079563157;dx=-1.3652789764468501E-5
New Minimum: -146.23219079563157 > -205.14180999001536
WOLF (strong): th(6048000.0)=-205.14180999001536; dx=8.432163502790421E-7 evalInputDelta=58.909619194383794
END: th(3024000.0)=-194.8456013142073; dx=-6.061922988560014E-6 evalInputDelta=48.61341051857573
Fitness changed from -146.23219079563157 to -205.14180999001536
Iteration 3 complete. Error: -205.14180999001536 Total: 91.0293; Orientation: 0.1532; Line Search: 67.5383
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/788db0d8-3b4b-4a9d-b351-5978750beb59.jpg)
Adding measurement 74e4b482 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.255e+04, gradient 2.914e-03, dot -0.512; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -205.14180999001536, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement 74e4b482 to history. Total: 3
th(0)=-205.14180999001536;dx=-8.493852698299585E-6
New Minimum: -205.14180999001536 > -239.0521868532468
WOLF (strong): th(6515010.502656417)=-239.0521868532468; dx=8.947848710714727E-7 evalInputDelta=33.91037686323145
END: th(3257505.2513282085)=-235.03763801288463; dx=-3.0623164169836735E-6 evalInputDelta=29.895828022869267
Fitness changed from -205.14180999001536 to -239.0521868532468
Iteration 4 complete. Error: -239.0521868532468 Total: 93.5045; Orientation: 2.7942; Line Search: 67.3448
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e66c7c15-5225-4af3-b903-b5808e35bca4.jpg)
Adding measurement 1b78c761 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.393e+04, gradient 2.757e-03, dot -0.507; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -239.0521868532468, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement 1b78c761 to history. Total: 3
th(0)=-239.0521868532468;dx=-7.591645595899789E-6
New Minimum: -239.0521868532468 > -266.08125322540883
WOLF (strong): th(7018082.316422523)=-266.08125322540883; dx=1.5605603434281645E-6 evalInputDelta=27.02906637216202
New Minimum: -266.08125322540883 > -266.37529285300707
END: th(3509041.1582112615)=-266.37529285300707; dx=-2.1287441798750794E-6 evalInputDelta=27.32310599976026
Fitness changed from -239.0521868532468 to -266.37529285300707
Iteration 5 complete. Error: -266.37529285300707 Total: 93.4134; Orientation: 2.8477; Line Search: 66.8802
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/cd4e6c1f-c58f-4ccb-be08-90a4202c2b0c.jpg)
Adding measurement 7603bf4b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.147e+04, gradient 1.839e-03, dot -0.655; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -266.37529285300707, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement 7603bf4b to history. Total: 3
th(0)=-266.37529285300707;dx=-3.3369771572507967E-6
New Minimum: -266.37529285300707 > -292.2233195815263
END: th(7560000.000000002)=-292.2233195815263; dx=-1.2890932700873228E-6 evalInputDelta=25.848026728519244
Fitness changed from -266.37529285300707 to -292.2233195815263
Iteration 6 complete. Error: -292.2233195815263 Total: 72.2694; Orientation: 2.9024; Line Search: 45.3905
Adding measurement 207d6eb4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.639e+04, gradient 2.059e-03, dot -0.565; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -292.2233195815263, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement 207d6eb4 to history. Total: 3
th(0)=-292.2233195815263;dx=-4.204819305141926E-6
New Minimum: -292.2233195815263 > -301.36163202675664
WOLF (strong): th(1.6287526256641045E7)=-301.36163202675664; dx=9.011063533039703E-7 evalInputDelta=9.138312445230326
New Minimum: -301.36163202675664 > -310.85223327068434
WOLF (strong): th(8143763.128320523)=-310.85223327068434; dx=2.6418707972047604E-7 evalInputDelta=18.628913689158026
END: th(2714587.709440174)=-305.62348162630724; dx=-2.0574701836918456E-6 evalInputDelta=13.400162044780927
Fitness changed from -292.2233195815263 to -310.85223327068434
Iteration 7 complete. Error: -310.85223327068434 Total: 115.0699; Orientation: 2.7803; Line Search: 89.8434
Adding measurement 1465e0e5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.626e+04, gradient 2.339e-03, dot -0.470; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -310.85223327068434, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement 1465e0e5 to history. Total: 3
th(0)=-310.85223327068434;dx=-5.442594261985773E-6
New Minimum: -310.85223327068434 > -335.63854684492026
WOLF (strong): th(5848401.930352103)=-335.63854684492026; dx=1.1732443498316483E-7 evalInputDelta=24.78631357423592
END: th(2924200.9651760515)=-330.08224265266745; dx=-2.7655084212981234E-6 evalInputDelta=19.23000938198311
Fitness changed from -310.85223327068434 to -335.63854684492026
Iteration 8 complete. Error: -335.63854684492026 Total: 92.7333; Orientation: 2.7789; Line Search: 67.4456
Adding measurement b6dd458 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.871e+04, gradient 1.848e-03, dot -0.543; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -335.63854684492026, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement b6dd458 to history. Total: 3
th(0)=-335.63854684492026;dx=-3.395582059064126E-6
New Minimum: -335.63854684492026 > -352.5395381244662
END: th(6300000.000000002)=-352.5395381244662; dx=-2.332037698265917E-7 evalInputDelta=16.900991279545963
Fitness changed from -335.63854684492026 to -352.5395381244662
Iteration 9 complete. Error: -352.5395381244662 Total: 70.6159; Orientation: 2.7648; Line Search: 45.2133
Adding measurement 13166b06 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.919e+04, gradient 1.787e-03, dot -0.532; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -352.5395381244662, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement 13166b06 to history. Total: 3
th(0)=-352.5395381244662;dx=-3.1995658186653665E-6
New Minimum: -352.5395381244662 > -360.0547870780334
WOLF (strong): th(1.3572938547200872E7)=-360.0547870780334; dx=1.0344776730382651E-6 evalInputDelta=7.515248953567209
New Minimum: -360.0547870780334 > -368.0616518994716
WOLF (strong): th(6786469.273600436)=-368.0616518994716; dx=1.0063647567427312E-8 evalInputDelta=15.52211377500538
END: th(2262156.4245334785)=-361.9267071403828; dx=-1.9832344492034597E-6 evalInputDelta=9.387169015916584
Fitness changed from -352.5395381244662 to -368.0616518994716
Iteration 10 complete. Error: -368.0616518994716 Total: 114.8163; Orientation: 2.7120; Line Search: 89.8881
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/adfb51ff-1eb3-4dbb-b88b-9b48f4602451.jpg)
Adding measurement 48ed690f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.070e+05, gradient 1.803e-03, dot -0.507; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -368.0616518994716, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement 48ed690f to history. Total: 3
th(0)=-368.0616518994716;dx=-3.226956140812752E-6
New Minimum: -368.0616518994716 > -382.77698737536474
END: th(4873668.275293419)=-382.77698737536474; dx=-5.810630136295593E-7 evalInputDelta=14.715335475893141
Fitness changed from -368.0616518994716 to -382.77698737536474
Iteration 11 complete. Error: -382.77698737536474 Total: 70.9393; Orientation: 2.7532; Line Search: 45.1182
Adding measurement 751bf4fd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.036e+05, gradient 1.397e-03, dot -0.600; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -382.77698737536474, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement 751bf4fd to history. Total: 3
th(0)=-382.77698737536474;dx=-1.945693209611222E-6
New Minimum: -382.77698737536474 > -398.24154001203397
END: th(1.0500000000000004E7)=-398.24154001203397; dx=-2.594117335061199E-7 evalInputDelta=15.464552636669225
Fitness changed from -382.77698737536474 to -398.24154001203397
Iteration 12 complete. Error: -398.24154001203397 Total: 69.4206; Orientation: 2.7841; Line Search: 44.7744
Adding measurement 4b805677 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.103e+05, gradient 1.790e-03, dot -0.462; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -398.24154001203397, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement 4b805677 to history. Total: 3
th(0)=-398.24154001203397;dx=-3.195610198480712E-6
Armijo: th(2.262156424533479E7)=-375.4421862516927; dx=1.6507609256491154E-6 evalInputDelta=-22.799353760341262
New Minimum: -398.24154001203397 > -406.75108743213605
WOLF (strong): th(1.1310782122667395E7)=-406.75108743213605; dx=1.1719437667670894E-6 evalInputDelta=8.50954742010208
New Minimum: -406.75108743213605 > -411.8020376917344
END: th(3770260.7075557983)=-411.8020376917344; dx=-1.1629335090227033E-6 evalInputDelta=13.560497679700461
Fitness changed from -398.24154001203397 to -411.8020376917344
Iteration 13 complete. Error: -411.8020376917344 Total: 115.6945; Orientation: 2.8365; Line Search: 90.4703
Adding measurement 23898528 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.058e+05, gradient 1.174e-03, dot -0.635; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -411.8020376917344, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement 23898528 to history. Total: 3
th(0)=-411.8020376917344;dx=-1.376171034433364E-6
New Minimum: -411.8020376917344 > -425.31877353516563
END: th(8122780.458822368)=-425.31877353516563; dx=-8.262656332230886E-7 evalInputDelta=13.516735843431206
Fitness changed from -411.8020376917344 to -425.31877353516563
Iteration 14 complete. Error: -425.31877353516563 Total: 73.8865; Orientation: 2.7939; Line Search: 48.6854
Adding measurement 55da0d0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.086e+05, gradient 1.237e-03, dot -0.584; [546aec85-4fde-4c49-8006-52bd2dbe0042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -425.31877353516563, -146.23219079563157, -103.50057661834586, -56.787819227416136
LBFGS Accumulation History: 3 points
Removed measurement 55da0d0 to history. Total: 3
th(0)=-425.31877353516563;dx=-1.5237146732371644E-6
New Minimum: -425.31877353516563 > -439.6801755330457
END: th(1.750000000000001E7)=-439.6801755330457; dx=-5.1983239922621826E-8 evalInputDelta=14.36140199788008
Fitness changed from -425.31877353516563 to -439.6801755330457
Iteration 15 complete. Error: -439.6801755330457 Total: 70.2682; Orientation: 2.6939; Line Search: 45.6105
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/e7d4ac73-05d2-4963-ab2e-7a5667158239.jpg)
Final threshold in iteration 16: -439.6801755330457 (> -Infinity) after 1572.329s (< 5400.000s)

Returns

    -439.6801755330457