Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 48.66 seconds (1.122 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: 217000319260600
Reset training subject: 217000919808900
Adding measurement 5533001b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-82.90146165026283;dx=-0.23293024228467296
New Minimum: -82.90146165026283 > -83.32440860678999
WOLFE (weak): th(2.154434690031884)=-83.32440860678999; dx=-0.23530699075512 evalInputDelta=0.42294695652715575
New Minimum: -83.32440860678999 > -83.75455118632055
WOLFE (weak): th(4.308869380063768)=-83.75455118632055; dx=-0.23914916470921793 evalInputDelta=0.8530895360577233
New Minimum: -83.75455118632055 > -85.5109333394627
WOLFE (weak): th(12.926608140191302)=-85.5109333394627; dx=-0.24491553403223323 evalInputDelta=2.6094716891998644
New Minimum: -85.5109333394627 > -94.12643378525169
WOLFE (weak): th(51.70643256076521)=-94.12643378525169; dx=-0.27272127829617254 evalInputDelta=11.22497213498886
New Minimum: -94.12643378525169 > -135.8922985680616
END: th(258.53216280382605)=-135.8922985680616; dx=-0.17272885645820996 evalInputDelta=52.99083691779876
Fitness changed from -82.90146165026283 to -135.8922985680616
Iteration 1 complete. Error: -135.8922985680616 Total: 5.6137; Orientation: 0.0154; Line Search: 3.8813
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/43e31477-c67e-4e07-9baf-912a7609396b.jpg)
Adding measurement e03ca1e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-135.8922985680616;dx=-0.24500322391865945
New Minimum: -135.8922985680616 > -195.3387491469771
END: th(556.9906600335335)=-195.3387491469771; dx=-0.10192953237053509 evalInputDelta=59.44645057891552
Fitness changed from -135.8922985680616 to -195.3387491469771
Iteration 2 complete. Error: -195.3387491469771 Total: 1.7982; Orientation: 0.0157; Line Search: 1.2100
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2c4c03da-5503-4e17-b1da-219b385e9486.jpg)
Adding measurement 16520463 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-195.3387491469771;dx=-0.1617993876251521
New Minimum: -195.3387491469771 > -259.2904990116642
END: th(1200.0)=-259.2904990116642; dx=-0.06899905592406835 evalInputDelta=63.951749864687116
Fitness changed from -195.3387491469771 to -259.2904990116642
Iteration 3 complete. Error: -259.2904990116642 Total: 1.7798; Orientation: 0.0166; Line Search: 1.1753
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/24d0ce89-8172-4a78-ae4e-5a0b0e6de5e3.jpg)
Adding measurement 15626ef6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.462e+03, gradient 4.249e-01, dot -0.329; [bd640a44-f77d-462a-97b6-ade47ced3f07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -259.2904990116642, -195.3387491469771, -135.8922985680616, -82.90146165026283
LBFGS Accumulation History: 3 points
Removed measurement 15626ef6 to history. Total: 3
th(0)=-259.2904990116642;dx=-0.18008290209174377
New Minimum: -259.2904990116642 > -327.92223860838476
END: th(2585.3216280382608)=-327.92223860838476; dx=-0.03716903691171593 evalInputDelta=68.63173959672054
Fitness changed from -259.2904990116642 to -327.92223860838476
Iteration 4 complete. Error: -327.92223860838476 Total: 2.0339; Orientation: 0.2855; Line Search: 1.1805
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/96be377c-26d7-48e6-a60c-bc2ba6b14915.jpg)
Adding measurement 6d68c379 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.653e+03, gradient 4.367e-01, dot -0.239; [bd640a44-f77d-462a-97b6-ade47ced3f07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -327.92223860838476, -195.3387491469771, -135.8922985680616, -82.90146165026283
LBFGS Accumulation History: 3 points
Removed measurement 6d68c379 to history. Total: 3
th(0)=-327.92223860838476;dx=-0.1905823852607649
New Minimum: -327.92223860838476 > -374.05201215978514
END: th(5569.9066003353355)=-374.05201215978514; dx=-0.016702959710774616 evalInputDelta=46.129773551400376
Fitness changed from -327.92223860838476 to -374.05201215978514
Iteration 5 complete. Error: -374.05201215978514 Total: 2.0304; Orientation: 0.2860; Line Search: 1.1799
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ef8a924c-29ed-4d53-955d-c128b41d7e03.jpg)
Adding measurement 5badd373 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.547e+03, gradient 2.652e-01, dot -0.245; [bd640a44-f77d-462a-97b6-ade47ced3f07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -374.05201215978514, -195.3387491469771, -135.8922985680616, -82.90146165026283
LBFGS Accumulation History: 3 points
Removed measurement 5badd373 to history. Total: 3
th(0)=-374.05201215978514;dx=-0.0700890500119632
New Minimum: -374.05201215978514 > -488.5109683422061
END: th(12000.000000000002)=-488.5109683422061; dx=-0.010912417008183321 evalInputDelta=114.45895618242099
Fitness changed from -374.05201215978514 to -488.5109683422061
Iteration 6 complete. Error: -488.5109683422061 Total: 2.0937; Orientation: 0.2846; Line Search: 1.2180
Adding measurement 77b5e047 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.213e+03, gradient 2.637e-01, dot -0.204; [bd640a44-f77d-462a-97b6-ade47ced3f07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -488.5109683422061, -195.3387491469771, -135.8922985680616, -82.90146165026283
LBFGS Accumulation History: 3 points
Removed measurement 77b5e047 to history. Total: 3
th(0)=-488.5109683422061;dx=-0.06934802066233288
New Minimum: -488.5109683422061 > -514.527984016482
END: th(25853.21628038261)=-514.527984016482; dx=-0.003938903450871972 evalInputDelta=26.01701567427591
Fitness changed from -488.5109683422061 to -514.527984016482
Iteration 7 complete. Error: -514.527984016482 Total: 2.3136; Orientation: 0.2698; Line Search: 1.2317
Adding measurement e8a4caf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.134e+03, gradient 2.299e-01, dot -0.140; [bd640a44-f77d-462a-97b6-ade47ced3f07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -514.527984016482, -195.3387491469771, -135.8922985680616, -82.90146165026283
LBFGS Accumulation History: 3 points
Removed measurement e8a4caf to history. Total: 3
th(0)=-514.527984016482;dx=-0.05273814004210026
New Minimum: -514.527984016482 > -595.1028695407193
END: th(55699.066003353364)=-595.1028695407193; dx=-9.775294380538644E-4 evalInputDelta=80.57488552423729
Fitness changed from -514.527984016482 to -595.1028695407193
Iteration 8 complete. Error: -595.1028695407193 Total: 2.0436; Orientation: 0.2837; Line Search: 1.2086
Adding measurement 50ac4c8b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.715e+03, gradient 2.604e-01, dot -0.064; [bd640a44-f77d-462a-97b6-ade47ced3f07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -595.1028695407193, -195.3387491469771, -135.8922985680616, -82.90146165026283
LBFGS Accumulation History: 3 points
Removed measurement 50ac4c8b to history. Total: 3
th(0)=-595.1028695407193;dx=-0.06771652883121401
Armijo: th(120000.00000000004)=-418.9756670642694; dx=9.689059494768647E-4 evalInputDelta=-176.12720247644995
New Minimum: -595.1028695407193 > -801.4588057023141
END: th(60000.00000000002)=-801.4588057023141; dx=-0.0019104757234800571 evalInputDelta=206.35593616159474
Fitness changed from -595.1028695407193 to -801.4588057023141
Iteration 9 complete. Error: -801.4588057023141 Total: 2.6264; Orientation: 0.2817; Line Search: 1.7804
Adding measurement 35388bcc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.017e+04, gradient 1.933e-01, dot -0.084; [bd640a44-f77d-462a-97b6-ade47ced3f07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -801.4588057023141, -195.3387491469771, -135.8922985680616, -82.90146165026283
LBFGS Accumulation History: 3 points
Removed measurement 35388bcc to history. Total: 3
th(0)=-801.4588057023141;dx=-0.037288794726401384
Armijo: th(129266.08140191308)=-591.5973793745992; dx=4.608879697818826E-4 evalInputDelta=-209.86142632771487
New Minimum: -801.4588057023141 > -1070.8328143220324
END: th(64633.04070095654)=-1070.8328143220324; dx=-0.0031942976849998832 evalInputDelta=269.3740086197183
Fitness changed from -801.4588057023141 to -1070.8328143220324
Iteration 10 complete. Error: -1070.8328143220324 Total: 2.6509; Orientation: 0.2811; Line Search: 1.7938
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/896771fc-9454-44b0-aa53-30cdb77fe813.jpg)
Adding measurement 5a55973d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.561e+04, gradient 2.114e-01, dot -0.101; [bd640a44-f77d-462a-97b6-ade47ced3f07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1070.8328143220324, -195.3387491469771, -135.8922985680616, -82.90146165026283
LBFGS Accumulation History: 3 points
Removed measurement 5a55973d to history. Total: 3
th(0)=-1070.8328143220324;dx=-0.04464311093544591
Armijo: th(139247.66500838342)=-744.9374262585243; dx=0.0011752812040524527 evalInputDelta=-325.8953880635081
New Minimum: -1070.8328143220324 > -1369.4699376121657
END: th(69623.83250419171)=-1369.4699376121657; dx=-0.003567504938541787 evalInputDelta=298.63712329013333
Fitness changed from -1070.8328143220324 to -1369.4699376121657
Iteration 11 complete. Error: -1369.4699376121657 Total: 2.8918; Orientation: 0.2864; Line Search: 2.0292
Adding measurement 979842b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.580e+04, gradient 2.301e-01, dot -0.111; [bd640a44-f77d-462a-97b6-ade47ced3f07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1369.4699376121657, -195.3387491469771, -135.8922985680616, -82.90146165026283
LBFGS Accumulation History: 3 points
Removed measurement 979842b to history. Total: 3
th(0)=-1369.4699376121657;dx=-0.05290489841151516
Armijo: th(150000.00000000006)=-779.1334113187296; dx=0.0014646547986419305 evalInputDelta=-590.3365262934361
New Minimum: -1369.4699376121657 > -1585.8280065130157
END: th(75000.00000000003)=-1585.8280065130157; dx=-0.0028320198380590127 evalInputDelta=216.35806890084996
Fitness changed from -1369.4699376121657 to -1585.8280065130157
Iteration 12 complete. Error: -1585.8280065130157 Total: 2.6015; Orientation: 0.2716; Line Search: 1.7738
Adding measurement 5510b8b7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.644e+05, gradient 2.475e-01, dot -0.103; [bd640a44-f77d-462a-97b6-ade47ced3f07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1585.8280065130157, -195.3387491469771, -135.8922985680616, -82.90146165026283
LBFGS Accumulation History: 3 points
Removed measurement 5510b8b7 to history. Total: 3
th(0)=-1585.8280065130157;dx=-0.061185384087189654
Armijo: th(161582.60175239135)=-807.1559182443493; dx=0.0026378019426321966 evalInputDelta=-778.6720882686664
New Minimum: -1585.8280065130157 > -1844.0300756763402
END: th(80791.30087619567)=-1844.0300756763402; dx=-0.0027345439706955243 evalInputDelta=258.2020691633245
Fitness changed from -1585.8280065130157 to -1844.0300756763402
Iteration 13 complete. Error: -1844.0300756763402 Total: 2.6697; Orientation: 0.2807; Line Search: 1.8372
Adding measurement 7e5972aa to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.333e+05, gradient 2.707e-01, dot 0.107; [bd640a44-f77d-462a-97b6-ade47ced3f07 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1844.0300756763402;dx=-3850.149398907355
Armijo: th(174059.5812604793)=-52.547219143343455; dx=0.004519925655660783 evalInputDelta=-1791.4828565329967
Armijo: th(87029.79063023964)=-52.5625144078341; dx=0.00899688546016509 evalInputDelta=-1791.467561268506
Armijo: th(29009.93021007988)=-52.58582191977803; dx=0.02713227419919177 evalInputDelta=-1791.4442537565621
Armijo: th(7252.48255251997)=-52.5872740720572; dx=0.10838815248976139 evalInputDelta=-1791.442801604283
Armijo: th(1450.4965105039942)=-53.271498483105574; dx=0.5432240421166482 evalInputDelta=-1790.7585771932345
Armijo: th(241.74941841733235)=-57.36800128853429; dx=3.2371319345665426 evalInputDelta=-1786.662074387806
Armijo: th(34.53563120247605)=-76.88097414180527; dx=22.159136253831058 evalInputDelta=-1767.149101534535
Armijo: th(4.316953900309506)=-203.95461592793436; dx=158.971819899075 evalInputDelta=-1640.0754597484058
Armijo: th(0.47966154447883397)=-869.0321193822163; dx=822.2492033217832 evalInputDelta=-974.9979562941239
Armijo: th(0.047966154447883394)=-1751.0056866001153; dx=-89.27582214445336 evalInputDelta=-93.0243890762249
Armijo: th(0.004360559495262126)=-1837.8689014206045; dx=-719.330915658132 evalInputDelta=-6.161174255735659
Armijo: th(3.633799579385105E-4)=-1843.5436674687019; dx=-789.2987282316923 evalInputDelta=-0.4864082076383056
Armijo: th(2.79523044568085E-5)=-1843.9928840123491; dx=-798.3121446745145 evalInputDelta=-0.03719166399105234
Armijo: th(1.9965931754863214E-6)=-1844.027467606168; dx=-794.815767977698 evalInputDelta=-0.002608070172072985
Armijo: th(1.331062116990881E-7)=-1844.0299180679117; dx=-795.0461327242513 evalInputDelta=-1.5760842848067114E-4
Armijo: th(8.319138231193007E-9)=-1844.0300756763402; dx=-793.5290507581057 evalInputDelta=0.0
Armijo: th(4.89361072423118E-10)=-1844.0300756763402; dx=-796.9032207411717 evalInputDelta=0.0
MIN ALPHA (2.718672624572878E-11): th(0.0)=-1844.0300756763402
Fitness changed from -1844.0300756763402 to -1844.0300756763402
Static Iteration Total: 13.1593; Orientation: 0.2775; Line Search: 12.3101
Iteration 14 failed. Error: -1844.0300756763402
Previous Error: 0.0 -> -1844.0300756763402
Retrying iteration 14
Reset training subject: 217046626097100
Adding measurement 787f7d5b to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-1844.0300756763402;dx=-0.07319157437400756
END: th(2.1544346900318838E-10)=-1844.0300756763402; dx=-0.061244049654508706 evalInputDelta=0.0
Fitness changed from -1844.0300756763402 to -1844.0300756763402
Static Iteration Total: 2.3535; Orientation: 0.0167; Line Search: 1.2445
Iteration 15 failed. Error: -1844.0300756763402
Previous Error: 0.0 -> -1844.0300756763402
Optimization terminated 15
Final threshold in iteration 15: -1844.0300756763402 (> -Infinity) after 48.660s (< 5400.000s)

Returns

    -1844.0300756763402