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 69.36 seconds (1.137 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: 676189394631200
Reset training subject: 676190515906500
Adding measurement 799c87 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-48.06045539783071;dx=-0.0044888152414323985
New Minimum: -48.06045539783071 > -48.07689864783033
WOLFE (weak): th(2.154434690031884)=-48.07689864783033; dx=-0.004545031146044461 evalInputDelta=0.01644324999962521
New Minimum: -48.07689864783033 > -48.093343890423135
WOLFE (weak): th(4.308869380063768)=-48.093343890423135; dx=-0.004542676555557656 evalInputDelta=0.0328884925924271
New Minimum: -48.093343890423135 > -48.1591776973442
WOLFE (weak): th(12.926608140191302)=-48.1591776973442; dx=-0.004560274514739761 evalInputDelta=0.09872229951348999
New Minimum: -48.1591776973442 > -48.455470456776084
WOLFE (weak): th(51.70643256076521)=-48.455470456776084; dx=-0.004584904548131668 evalInputDelta=0.3950150589453756
New Minimum: -48.455470456776084 > -50.049279914119396
WOLFE (weak): th(258.53216280382605)=-50.049279914119396; dx=-0.00459097901988763 evalInputDelta=1.9888245162886875
New Minimum: -50.049279914119396 > -59.990526595871785
WOLFE (weak): th(1551.1929768229563)=-59.990526595871785; dx=-0.004611680517344721 evalInputDelta=11.930071198041077
New Minimum: -59.990526595871785 > -113.53278109344676
END: th(10858.350837760694)=-113.53278109344676; dx=-0.0024476528517049906 evalInputDelta=65.47232569561605
Fitness changed from -48.06045539783071 to -113.53278109344676
Iteration 1 complete. Error: -113.53278109344676 Total: 12.0961; Orientation: 0.0153; Line Search: 8.6508
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/45dafba3-75c5-4efe-9eb3-0ae19e4ea0da.jpg)
Adding measurement 6ec6adcc to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-113.53278109344676;dx=-0.006888781142884624
New Minimum: -113.53278109344676 > -247.38187679931204
END: th(23393.607721408407)=-247.38187679931204; dx=-0.0013140485223131456 evalInputDelta=133.8490957058653
Fitness changed from -113.53278109344676 to -247.38187679931204
Iteration 2 complete. Error: -247.38187679931204 Total: 3.0420; Orientation: 0.0120; Line Search: 2.0008
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/10bc3eed-b169-402e-a9fb-a1007cffe45a.jpg)
Adding measurement 67196a65 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-247.38187679931204;dx=-0.0049077600989606805
New Minimum: -247.38187679931204 > -362.6349964151281
END: th(50400.00000000001)=-362.6349964151281; dx=-5.98305434555015E-4 evalInputDelta=115.25311961581608
Fitness changed from -247.38187679931204 to -362.6349964151281
Iteration 3 complete. Error: -362.6349964151281 Total: 3.0694; Orientation: 0.0122; Line Search: 1.9844
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/486b8061-1f98-429f-b4ce-10b9c1385fee.jpg)
Adding measurement 4865a49f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.654e+03, gradient 7.179e-02, dot -0.210; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -362.6349964151281, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement 4865a49f to history. Total: 3
th(0)=-362.6349964151281;dx=-0.00512190453702943
New Minimum: -362.6349964151281 > -533.8877164254671
END: th(108583.50837760697)=-533.8877164254671; dx=-1.473449040097035E-4 evalInputDelta=171.25272001033903
Fitness changed from -362.6349964151281 to -533.8877164254671
Iteration 4 complete. Error: -533.8877164254671 Total: 3.4364; Orientation: 0.2166; Line Search: 2.0538
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/f2712851-6e9c-4c0f-aba8-f0a1707d236d.jpg)
Adding measurement 218e188e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.308e+03, gradient 5.435e-02, dot -0.150; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -533.8877164254671, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement 218e188e to history. Total: 3
th(0)=-533.8877164254671;dx=-0.00293019568749106
New Minimum: -533.8877164254671 > -727.23650726569
WOLF (strong): th(233936.07721408413)=-727.23650726569; dx=8.599438254847927E-5 evalInputDelta=193.34879084022282
New Minimum: -727.23650726569 > -851.9094362078636
END: th(116968.03860704206)=-851.9094362078636; dx=-2.4023788421097074E-4 evalInputDelta=318.0217197823964
Fitness changed from -533.8877164254671 to -851.9094362078636
Iteration 5 complete. Error: -851.9094362078636 Total: 4.5200; Orientation: 0.2531; Line Search: 3.1459
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d54132fa-ad03-4d45-a858-dbe6cf343bae.jpg)
Adding measurement 133e309a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.662e+03, gradient 5.074e-02, dot -0.163; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -851.9094362078636, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement 133e309a to history. Total: 3
th(0)=-851.9094362078636;dx=-0.0025453882602663328
Armijo: th(252000.0000000001)=-836.1199076687506; dx=1.7162687606701857E-4 evalInputDelta=-15.789528539113007
New Minimum: -851.9094362078636 > -1091.6097058930907
END: th(126000.00000000004)=-1091.6097058930907; dx=-4.742611041270218E-5 evalInputDelta=239.7002696852271
Fitness changed from -851.9094362078636 to -1091.6097058930907
Iteration 6 complete. Error: -1091.6097058930907 Total: 4.4797; Orientation: 0.2531; Line Search: 3.1566
Adding measurement 667ea550 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.182e+04, gradient 5.278e-02, dot -0.182; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1091.6097058930907, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement 667ea550 to history. Total: 3
th(0)=-1091.6097058930907;dx=-0.0027729024875029033
Armijo: th(271458.77094401745)=-1021.5591331391444; dx=2.5804998705901443E-4 evalInputDelta=-70.05057275394631
New Minimum: -1091.6097058930907 > -1303.526083360053
WOLF (strong): th(135729.38547200873)=-1303.526083360053; dx=1.5562264501038593E-4 evalInputDelta=211.91637746696233
New Minimum: -1303.526083360053 > -1328.107346941504
END: th(45243.12849066957)=-1328.107346941504; dx=-0.001287453092083221 evalInputDelta=236.49764104841324
Fitness changed from -1091.6097058930907 to -1328.107346941504
Iteration 7 complete. Error: -1328.107346941504 Total: 5.2785; Orientation: 0.2252; Line Search: 4.0613
Adding measurement 2b638e54 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.655e+04, gradient 4.239e-02, dot -0.251; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1328.107346941504, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement 2b638e54 to history. Total: 3
th(0)=-1328.107346941504;dx=-0.0017598698794870334
New Minimum: -1328.107346941504 > -1513.299705940631
END: th(97473.3655058684)=-1513.299705940631; dx=-6.485302719571852E-4 evalInputDelta=185.192358999127
Fitness changed from -1328.107346941504 to -1513.299705940631
Iteration 8 complete. Error: -1513.299705940631 Total: 3.1955; Orientation: 0.2156; Line Search: 2.0305
Adding measurement 2e407d06 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.083e+04, gradient 4.619e-02, dot -0.279; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1513.299705940631, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement 2e407d06 to history. Total: 3
th(0)=-1513.299705940631;dx=-0.002123890248900882
Armijo: th(210000.0000000001)=-1502.4303644428917; dx=3.365929564100865E-5 evalInputDelta=-10.869341497739242
New Minimum: -1513.299705940631 > -1637.6070194036174
END: th(105000.00000000004)=-1637.6070194036174; dx=-2.4111910985394973E-4 evalInputDelta=124.30731346298649
Fitness changed from -1513.299705940631 to -1637.6070194036174
Iteration 9 complete. Error: -1637.6070194036174 Total: 4.2074; Orientation: 0.2158; Line Search: 3.0373
Adding measurement 7daa8bc2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.730e+04, gradient 4.868e-02, dot -0.226; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1637.6070194036174, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement 7daa8bc2 to history. Total: 3
th(0)=-1637.6070194036174;dx=-0.0023615731711501935
Armijo: th(226215.6424533479)=-1442.0058512363948; dx=2.5926380777520537E-4 evalInputDelta=-195.60116816722257
New Minimum: -1637.6070194036174 > -1745.679953485174
WOLF (strong): th(113107.82122667394)=-1745.679953485174; dx=1.4841748160673897E-4 evalInputDelta=108.0729340815567
New Minimum: -1745.679953485174 > -1783.0285331424172
END: th(37702.60707555798)=-1783.0285331424172; dx=-0.001370518573775113 evalInputDelta=145.42151373879983
Fitness changed from -1637.6070194036174 to -1783.0285331424172
Iteration 10 complete. Error: -1783.0285331424172 Total: 5.1669; Orientation: 0.2145; Line Search: 3.9530
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c25febb5-ba55-46a3-a64c-b194edad90c3.jpg)
Adding measurement 49b7cd0e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.651e+04, gradient 3.976e-02, dot -0.326; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1783.0285331424172, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement 49b7cd0e to history. Total: 3
th(0)=-1783.0285331424172;dx=-0.0015615195863884358
New Minimum: -1783.0285331424172 > -1907.3082472426947
END: th(81227.80458822366)=-1907.3082472426947; dx=-7.250469884610367E-4 evalInputDelta=124.27971410027749
Fitness changed from -1783.0285331424172 to -1907.3082472426947
Iteration 11 complete. Error: -1907.3082472426947 Total: 3.4737; Orientation: 0.2135; Line Search: 2.0531
Adding measurement 3271658 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.897e+04, gradient 4.128e-02, dot -0.316; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1907.3082472426947, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement 3271658 to history. Total: 3
th(0)=-1907.3082472426947;dx=-0.0016740372598712892
New Minimum: -1907.3082472426947 > -1930.098961193441
END: th(175000.0000000001)=-1930.098961193441; dx=-2.101418691671417E-4 evalInputDelta=22.790713950746294
Fitness changed from -1907.3082472426947 to -1930.098961193441
Iteration 12 complete. Error: -1930.098961193441 Total: 3.1105; Orientation: 0.2135; Line Search: 1.9631
Adding measurement 3a127fa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.949e+04, gradient 5.024e-02, dot -0.225; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1930.098961193441, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement 3a127fa to history. Total: 3
th(0)=-1930.098961193441;dx=-0.0025064104639870694
Armijo: th(377026.07075557986)=-1471.194922503473; dx=3.6973735714067557E-4 evalInputDelta=-458.90403868996805
New Minimum: -1930.098961193441 > -1984.6174064539493
WOLF (strong): th(188513.03537778993)=-1984.6174064539493; dx=3.98297836926363E-4 evalInputDelta=54.518445260508315
New Minimum: -1984.6174064539493 > -2163.520510649252
END: th(62837.67845926331)=-2163.520510649252; dx=-0.0010461520518736413 evalInputDelta=233.42154945581115
Fitness changed from -1930.098961193441 to -2163.520510649252
Iteration 13 complete. Error: -2163.520510649252 Total: 5.2023; Orientation: 0.2115; Line Search: 4.0673
Adding measurement 4bb7a2b5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.724e+04, gradient 4.076e-02, dot -0.289; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2163.520510649252, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement 4bb7a2b5 to history. Total: 3
th(0)=-2163.520510649252;dx=-0.0016303307391822143
New Minimum: -2163.520510649252 > -2256.0570693136287
END: th(135379.67431370614)=-2256.0570693136287; dx=-2.4793526803253694E-4 evalInputDelta=92.53655866437657
Fitness changed from -2163.520510649252 to -2256.0570693136287
Iteration 14 complete. Error: -2256.0570693136287 Total: 3.5025; Orientation: 0.2879; Line Search: 2.2319
Adding measurement dbd0afa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.233e+05, gradient 4.921e-02, dot -0.245; [acd9a9df-81fd-4011-99fc-cd33e18755d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2256.0570693136287, -247.38187679931204, -113.53278109344676, -48.06045539783071
LBFGS Accumulation History: 3 points
Removed measurement dbd0afa to history. Total: 3
th(0)=-2256.0570693136287;dx=-0.0024131876038673205
Armijo: th(291666.66666666686)=-1863.820203238499; dx=4.522705201490492E-4 evalInputDelta=-392.2368660751297
New Minimum: -2256.0570693136287 > -2272.8397435807037
WOLF (strong): th(145833.33333333343)=-2272.8397435807037; dx=3.890215087796158E-4 evalInputDelta=16.78267426707498
New Minimum: -2272.8397435807037 > -2407.7597471508657
END: th(48611.111111111146)=-2407.7597471508657; dx=-9.563898864552003E-4 evalInputDelta=151.70267783723693
Fitness changed from -2256.0570693136287 to -2407.7597471508657
Iteration 15 complete. Error: -2407.7597471508657 Total: 5.4915; Orientation: 0.4104; Line Search: 3.9912
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/84e60c80-9d13-4a43-8b81-1bd0c66a6180.jpg)
Final threshold in iteration 16: -2407.7597471508657 (> -Infinity) after 69.362s (< 5400.000s)

Returns

    -2407.7597471508657