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 9.29 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: 139701000053300
Reset training subject: 139701148638999
Adding measurement 30514cc2 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-6.504281614543536;dx=-0.08008172940239061
New Minimum: -6.504281614543536 > -6.653987302932572
WOLFE (weak): th(2.154434690031884)=-6.653987302932572; dx=-0.08066649350405133 evalInputDelta=0.14970568838903642
New Minimum: -6.653987302932572 > -6.805004511039186
WOLFE (weak): th(4.308869380063768)=-6.805004511039186; dx=-0.07990046696984951 evalInputDelta=0.30072289649565054
New Minimum: -6.805004511039186 > -7.410387131105995
WOLFE (weak): th(12.926608140191302)=-7.410387131105995; dx=-0.08104445370832684 evalInputDelta=0.9061055165624587
New Minimum: -7.410387131105995 > -9.971730519117454
WOLFE (weak): th(51.70643256076521)=-9.971730519117454; dx=-0.07886258941683882 evalInputDelta=3.467448904573918
New Minimum: -9.971730519117454 > -23.87999221776072
END: th(258.53216280382605)=-23.87999221776072; dx=-0.06886209025442316 evalInputDelta=17.375710603217183
Fitness changed from -6.504281614543536 to -23.87999221776072
Iteration 1 complete. Error: -23.87999221776072 Total: 1.0989; Orientation: 0.0018; Line Search: 0.7008
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a8c3c578-58e0-45af-99a7-71553969ceb7.jpg)
Adding measurement 356b8a5c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-23.87999221776072;dx=-0.14196238753073984
New Minimum: -23.87999221776072 > -63.2542785886111
END: th(556.9906600335335)=-63.2542785886111; dx=-0.05241612419514207 evalInputDelta=39.374286370850385
Fitness changed from -23.87999221776072 to -63.2542785886111
Iteration 2 complete. Error: -63.2542785886111 Total: 0.3596; Orientation: 0.0017; Line Search: 0.2315
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/388a19ef-dbb3-480c-b988-06d361ca3e69.jpg)
Adding measurement 7aaa62e9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-63.2542785886111;dx=-0.21143508415998316
New Minimum: -63.2542785886111 > -102.86960799964196
END: th(1200.0)=-102.86960799964196; dx=-0.006784015247065685 evalInputDelta=39.61532941103086
Fitness changed from -63.2542785886111 to -102.86960799964196
Iteration 3 complete. Error: -102.86960799964196 Total: 0.3529; Orientation: 0.0016; Line Search: 0.2314
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d60f87f7-b91a-468c-aa83-29a1e6283d0a.jpg)
Adding measurement 29e5fcbc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.049e+03, gradient 5.334e-01, dot -0.125; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.86960799964196, -63.2542785886111, -23.87999221776072, -6.504281614543536
LBFGS Accumulation History: 3 points
Removed measurement 29e5fcbc to history. Total: 3
th(0)=-102.86960799964196;dx=-0.27790898979175316
New Minimum: -102.86960799964196 > -116.01638572982912
WOLF (strong): th(2585.3216280382608)=-116.01638572982912; dx=0.013955594197895292 evalInputDelta=13.146777730187168
New Minimum: -116.01638572982912 > -190.26749262551394
WOLF (strong): th(1292.6608140191304)=-190.26749262551394; dx=0.010391197031879329 evalInputDelta=87.39788462587198
END: th(430.8869380063768)=-180.74977848361254; dx=-0.10891048938820469 evalInputDelta=77.88017048397059
Fitness changed from -102.86960799964196 to -190.26749262551394
Iteration 4 complete. Error: -190.26749262551394 Total: 0.6153; Orientation: 0.0288; Line Search: 0.4652
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/007ce195-b0cd-44e4-85dd-10da157867c8.jpg)
Adding measurement 347c76bc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.148e+03, gradient 5.313e-01, dot -0.046; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -190.26749262551394, -63.2542785886111, -23.87999221776072, -6.504281614543536
LBFGS Accumulation History: 3 points
Removed measurement 347c76bc to history. Total: 3
th(0)=-190.26749262551394;dx=-0.27442065500117935
New Minimum: -190.26749262551394 > -259.2618729200266
END: th(928.3177667225559)=-259.2618729200266; dx=-0.04425454436376894 evalInputDelta=68.99438029451264
Fitness changed from -190.26749262551394 to -259.2618729200266
Iteration 5 complete. Error: -259.2618729200266 Total: 0.3781; Orientation: 0.0285; Line Search: 0.2301
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/51afca37-cca2-4f01-a1df-c2cafa559d3b.jpg)
Adding measurement 3422b6d2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.821e+03, gradient 4.741e-01, dot -0.087; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -259.2618729200266, -63.2542785886111, -23.87999221776072, -6.504281614543536
LBFGS Accumulation History: 3 points
Removed measurement 3422b6d2 to history. Total: 3
th(0)=-259.2618729200266;dx=-0.21674712880995012
New Minimum: -259.2618729200266 > -280.932487441378
WOLF (strong): th(2000.0000000000005)=-280.932487441378; dx=0.00951538251099461 evalInputDelta=21.67061452135141
New Minimum: -280.932487441378 > -331.6632681463234
END: th(1000.0000000000002)=-331.6632681463234; dx=-0.042894800924341475 evalInputDelta=72.40139522629681
Fitness changed from -259.2618729200266 to -331.6632681463234
Iteration 6 complete. Error: -331.6632681463234 Total: 0.5019; Orientation: 0.0293; Line Search: 0.3488
Adding measurement 7d5ddee4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.385e+03, gradient 5.228e-01, dot -0.047; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -331.6632681463234, -63.2542785886111, -23.87999221776072, -6.504281614543536
LBFGS Accumulation History: 3 points
Removed measurement 7d5ddee4 to history. Total: 3
th(0)=-331.6632681463234;dx=-0.268619289607016
Armijo: th(2154.434690031884)=-275.80371190395533; dx=0.02942888514343948 evalInputDelta=-55.85955624236806
New Minimum: -331.6632681463234 > -368.6583360647091
END: th(1077.217345015942)=-368.6583360647091; dx=-0.0014385319730868176 evalInputDelta=36.9950679183857
Fitness changed from -331.6632681463234 to -368.6583360647091
Iteration 7 complete. Error: -368.6583360647091 Total: 0.4845; Orientation: 0.0287; Line Search: 0.3446
Adding measurement 1483190f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.068e+04, gradient 4.788e-01, dot -0.105; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -368.6583360647091, -63.2542785886111, -23.87999221776072, -6.504281614543536
LBFGS Accumulation History: 3 points
Removed measurement 1483190f to history. Total: 3
th(0)=-368.6583360647091;dx=-0.219574496328238
Armijo: th(2320.79441680639)=-368.06434135216085; dx=0.01188507198259853 evalInputDelta=-0.5939947125482377
New Minimum: -368.6583360647091 > -439.7512080711092
END: th(1160.397208403195)=-439.7512080711092; dx=-0.020857956211535543 evalInputDelta=71.09287200640011
Fitness changed from -368.6583360647091 to -439.7512080711092
Iteration 8 complete. Error: -439.7512080711092 Total: 0.4876; Orientation: 0.0279; Line Search: 0.3480
Adding measurement 51662b2e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.486e+04, gradient 4.524e-01, dot -0.128; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -439.7512080711092, -63.2542785886111, -23.87999221776072, -6.504281614543536
LBFGS Accumulation History: 3 points
Removed measurement 51662b2e to history. Total: 3
th(0)=-439.7512080711092;dx=-0.1998114560487973
Armijo: th(2500.000000000001)=-399.5385033072532; dx=0.006626112938677381 evalInputDelta=-40.21270476385598
New Minimum: -439.7512080711092 > -489.84000895700626
END: th(1250.0000000000005)=-489.84000895700626; dx=-0.020910471986019693 evalInputDelta=50.08880088589706
Fitness changed from -439.7512080711092 to -489.84000895700626
Iteration 9 complete. Error: -489.84000895700626 Total: 0.4826; Orientation: 0.0275; Line Search: 0.3443
Adding measurement 2b2259a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.519e+04, gradient 4.539e-01, dot -0.091; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -489.84000895700626, -63.2542785886111, -23.87999221776072, -6.504281614543536
LBFGS Accumulation History: 3 points
Removed measurement 2b2259a0 to history. Total: 3
th(0)=-489.84000895700626;dx=-0.19710392653893935
Armijo: th(2693.043362539856)=-400.27281711977395; dx=0.017372508527341235 evalInputDelta=-89.56719183723231
New Minimum: -489.84000895700626 > -525.5496527446289
END: th(1346.521681269928)=-525.5496527446289; dx=-0.0016064001771101072 evalInputDelta=35.70964378762267
Fitness changed from -489.84000895700626 to -525.5496527446289
Iteration 10 complete. Error: -525.5496527446289 Total: 0.4913; Orientation: 0.0283; Line Search: 0.3522
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/5b9003c5-b1ff-46c6-b6a5-4a06cdd2ed9a.jpg)
Adding measurement 15761a2e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.820e+04, gradient 4.624e-01, dot -0.117; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -525.5496527446289, -63.2542785886111, -23.87999221776072, -6.504281614543536
LBFGS Accumulation History: 3 points
Removed measurement 15761a2e to history. Total: 3
th(0)=-525.5496527446289;dx=-0.21009054593721427
Armijo: th(2900.9930210079883)=-488.8085323007363; dx=0.035166945582602624 evalInputDelta=-36.74112044389261
New Minimum: -525.5496527446289 > -622.6646117694501
END: th(1450.4965105039942)=-622.6646117694501; dx=-0.008028062869953308 evalInputDelta=97.11495902482113
Fitness changed from -525.5496527446289 to -622.6646117694501
Iteration 11 complete. Error: -622.6646117694501 Total: 0.5031; Orientation: 0.0289; Line Search: 0.3466
Adding measurement 79da40da to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.815e+04, gradient 4.438e-01, dot -0.132; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -622.6646117694501, -63.2542785886111, -23.87999221776072, -6.504281614543536
LBFGS Accumulation History: 3 points
Removed measurement 79da40da to history. Total: 3
th(0)=-622.6646117694501;dx=-0.19255160925631948
Armijo: th(3125.000000000002)=-569.123860640195; dx=0.01690212800483819 evalInputDelta=-53.54075112925511
New Minimum: -622.6646117694501 > -679.9852020448681
WOLF (strong): th(1562.500000000001)=-679.9852020448681; dx=0.007262134886782613 evalInputDelta=57.320590275418
New Minimum: -679.9852020448681 > -689.1047634431212
END: th(520.8333333333336)=-689.1047634431212; dx=-0.09375078414381122 evalInputDelta=66.44015167367115
Fitness changed from -622.6646117694501 to -689.1047634431212
Iteration 12 complete. Error: -689.1047634431212 Total: 0.6105; Orientation: 0.0285; Line Search: 0.4723
Adding measurement 66eb60b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.347e+05, gradient 3.498e-01, dot -0.171; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -689.1047634431212, -63.2542785886111, -23.87999221776072, -6.504281614543536
LBFGS Accumulation History: 3 points
Removed measurement 66eb60b1 to history. Total: 3
th(0)=-689.1047634431212;dx=-0.11797024287719819
New Minimum: -689.1047634431212 > -745.9430273150892
END: th(1122.1014010582735)=-745.9430273150892; dx=-0.06582540729909367 evalInputDelta=56.838263871968024
Fitness changed from -689.1047634431212 to -745.9430273150892
Iteration 13 complete. Error: -745.9430273150892 Total: 0.3951; Orientation: 0.0323; Line Search: 0.2424
Adding measurement 777861b0 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 4.484e+04, gradient 3.412e-01, dot 0.222; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-745.9430273150892;dx=-3376.1253698788414
Armijo: th(2417.494184173324)=0.0; dx=0.0 evalInputDelta=-745.9430273150892
Armijo: th(1208.747092086662)=0.0; dx=0.0 evalInputDelta=-745.9430273150892
Armijo: th(402.91569736222067)=0.0; dx=0.0 evalInputDelta=-745.9430273150892
Armijo: th(100.72892434055517)=0.0; dx=0.0 evalInputDelta=-745.9430273150892
Armijo: th(20.145784868111033)=0.0; dx=0.0 evalInputDelta=-745.9430273150892
Armijo: th(3.357630811351839)=0.0; dx=0.0 evalInputDelta=-745.9430273150892
Armijo: th(0.47966154447883413)=0.0; dx=0.0 evalInputDelta=-745.9430273150892
Armijo: th(0.05995769305985427)=-472.2959215364875; dx=881.1161282466736 evalInputDelta=-273.6471057786017
New Minimum: -745.9430273150892 > -756.4862027823111
END: th(0.006661965895539363)=-756.4862027823111; dx=-1619.7524507822197 evalInputDelta=10.543175467221886
Fitness changed from -745.9430273150892 to -756.4862027823111
Iteration 14 complete. Error: -756.4862027823111 Total: 1.2988; Orientation: 0.0277; Line Search: 1.1584
Adding measurement 6e26dcdc to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.250e+05, gradient 3.525e-01, dot -0.114; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -756.4862027823111, -745.9430273150892, -63.2542785886111, -23.87999221776072, -6.504281614543536
Rejected: LBFGS Orientation magnitude: 3.866e+05, gradient 3.525e-01, dot -0.382; [1f37d759-d91c-4c15-aee4-a3fe3d4b9e4f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -756.4862027823111, -745.9430273150892, -63.2542785886111, -23.87999221776072
LBFGS Accumulation History: 3 points
Removed measurement 6e26dcdc to history. Total: 4
Removed measurement 777861b0 to history. Total: 3
th(0)=-756.4862027823111;dx=-0.12003708418001444
New Minimum: -756.4862027823111 > -756.4877725383272
WOLFE (weak): th(0.014352770429159329)=-756.4877725383272; dx=-0.11906831396311648 evalInputDelta=0.0015697560161243018
New Minimum: -756.4877725383272 > -756.4893009818447
WOLFE (weak): th(0.028705540858318657)=-756.4893009818447; dx=-0.11774742109800568 evalInputDelta=0.0030981995336105683
New Minimum: -756.4893009818447 > -756.4957451962305
WOLFE (weak): th(0.08611662257495598)=-756.4957451962305; dx=-0.11930370006867314 evalInputDelta=0.009542413919348292
New Minimum: -756.4957451962305 > -756.5244956377817
WOLFE (weak): th(0.3444664902998239)=-756.5244956377817; dx=-0.11869495656393594 evalInputDelta=0.03829285547055861
New Minimum: -756.5244956377817 > -756.6781845672571
WOLFE (weak): th(1.7223324514991196)=-756.6781845672571; dx=-0.1185187516243621 evalInputDelta=0.19198178494593776
New Minimum: -756.6781845672571 > -757.6356726685987
WOLFE (weak): th(10.333994708994718)=-757.6356726685987; dx=-0.11758048917132773 evalInputDelta=1.1494698862875339
New Minimum: -757.6356726685987 > -764.4077364208188
WOLFE (weak): th(72.33796296296302)=-764.4077364208188; dx=-0.11357763331882528 evalInputDelta=7.92153363850764
New Minimum: -764.4077364208188 > -809.2886150811712
END: th(578.7037037037042)=-809.2886150811712; dx=-0.08602583570253564 evalInputDelta=52.80241229886008
Fitness changed from -756.4862027823111 to -809.2886150811712
Iteration 15 complete. Error: -809.2886150811712 Total: 1.2180; Orientation: 0.0641; Line Search: 1.0385
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/88584684-e9de-4856-ae8a-5d6e368be112.jpg)
Final threshold in iteration 16: -809.2886150811712 (> -Infinity) after 9.291s (< 5400.000s)

Returns

    -809.2886150811712