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

Iteration 20 Iteration 20

Iteration 25 Iteration 25

BasicOptimizer.scala:89 executed in 326.75 seconds (3.202 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: 1843574981590
Reset training subject: 1844988524600
Adding measurement b3ea126 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.01617445872656431;dx=-4.459754621454251E-4
New Minimum: -0.01617445872656431 > -0.016818602596701246
WOLFE (weak): th(2.154434690031884)=-0.016818602596701246; dx=-4.4766691004933374E-4 evalInputDelta=6.441438701369345E-4
New Minimum: -0.016818602596701246 > -0.017462650871698772
WOLFE (weak): th(4.308869380063768)=-0.017462650871698772; dx=-4.5219711546475136E-4 evalInputDelta=0.0012881921451344605
New Minimum: -0.017462650871698772 > -0.020012800684812166
WOLFE (weak): th(12.926608140191302)=-0.020012800684812166; dx=-4.4840170336416825E-4 evalInputDelta=0.0038383419582478547
New Minimum: -0.020012800684812166 > -0.03153792762258871
WOLFE (weak): th(51.70643256076521)=-0.03153792762258871; dx=-4.4489675490667294E-4 evalInputDelta=0.015363468896024399
New Minimum: -0.03153792762258871 > -0.09206045564581582
WOLFE (weak): th(258.53216280382605)=-0.09206045564581582; dx=-4.3151521444315425E-4 evalInputDelta=0.0758859969192515
New Minimum: -0.09206045564581582 > -0.40744908284514175
END: th(1551.1929768229563)=-0.40744908284514175; dx=-3.5032565744851915E-4 evalInputDelta=0.39127462411857744
Fitness changed from -0.01617445872656431 to -0.40744908284514175
Iteration 1 complete. Error: -0.40744908284514175 Total: 14.2621; Orientation: 0.0187; Line Search: 10.1163
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/51b79943-d5be-4061-b915-eab369959c89.jpg)
Adding measurement 56d4e72a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.40744908284514175;dx=-3.5168379950361364E-4
New Minimum: -0.40744908284514175 > -1.2083654255130947
WOLFE (weak): th(3341.943960201201)=-1.2083654255130947; dx=-3.186612022641835E-4 evalInputDelta=0.8009163426679529
New Minimum: -1.2083654255130947 > -1.8571327357838692
END: th(6683.887920402402)=-1.8571327357838692; dx=-2.18652637602178E-4 evalInputDelta=1.4496836529387274
Fitness changed from -0.40744908284514175 to -1.8571327357838692
Iteration 2 complete. Error: -1.8571327357838692 Total: 5.6376; Orientation: 0.0182; Line Search: 4.1718
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/877bdd4b-8852-4e4b-9f59-f4858e5f5032.jpg)
Adding measurement 75ca2bc2 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.8571327357838692;dx=-0.0017478721656831943
New Minimum: -1.8571327357838692 > -3.520334655823013
WOLF (strong): th(14400.000000000002)=-3.520334655823013; dx=1.3450483677600357E-4 evalInputDelta=1.6632019200391437
New Minimum: -3.520334655823013 > -4.564566385271638
WOLF (strong): th(7200.000000000001)=-4.564566385271638; dx=2.0929205833576238E-4 evalInputDelta=2.7074336494877684
END: th(2400.0000000000005)=-4.1480104715580035; dx=-8.403226903163387E-4 evalInputDelta=2.290877735774134
Fitness changed from -1.8571327357838692 to -4.564566385271638
Iteration 3 complete. Error: -4.564566385271638 Total: 7.0926; Orientation: 0.0175; Line Search: 5.5883
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ac0645bd-cacb-42a7-88de-3395523cd44e.jpg)
Adding measurement 234f64f1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.501e+03, gradient 8.589e-02, dot -0.130; [0d4c7077-1f41-47cd-8fcf-e55a527237fe = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.564566385271638, -1.8571327357838692, -0.40744908284514175, -0.01617445872656431
LBFGS Accumulation History: 3 points
Removed measurement 234f64f1 to history. Total: 3
th(0)=-4.564566385271638;dx=-0.0072223682153596805
New Minimum: -4.564566385271638 > -7.707727577406457
WOLF (strong): th(5170.643256076522)=-7.707727577406457; dx=6.837297758146562E-5 evalInputDelta=3.1431611921348193
New Minimum: -7.707727577406457 > -8.032617580430138
WOLF (strong): th(2585.321628038261)=-8.032617580430138; dx=3.192051373805742E-7 evalInputDelta=3.4680511951585
END: th(861.7738760127537)=-7.958574677174508; dx=-0.002178013096215948 evalInputDelta=3.3940082919028702
Fitness changed from -4.564566385271638 to -8.032617580430138
Iteration 4 complete. Error: -8.032617580430138 Total: 7.6135; Orientation: 0.5472; Line Search: 5.6042
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7531c79d-27ee-4e55-a5cb-6e499cf236fa.jpg)
Adding measurement 749a63a3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.137e+04, gradient 7.748e-02, dot -0.155; [0d4c7077-1f41-47cd-8fcf-e55a527237fe = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.032617580430138, -1.8571327357838692, -0.40744908284514175, -0.01617445872656431
LBFGS Accumulation History: 3 points
Removed measurement 749a63a3 to history. Total: 3
th(0)=-8.032617580430138;dx=-0.005923137473122107
New Minimum: -8.032617580430138 > -13.220243703327597
END: th(1856.635533445112)=-13.220243703327597; dx=-8.917731407521083E-4 evalInputDelta=5.187626122897459
Fitness changed from -8.032617580430138 to -13.220243703327597
Iteration 5 complete. Error: -13.220243703327597 Total: 4.7002; Orientation: 0.4593; Line Search: 2.7814
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e285c26c-1335-4498-a331-355ad53cfa73.jpg)
Adding measurement 2c3c57ca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.460e+04, gradient 8.913e-02, dot -0.128; [0d4c7077-1f41-47cd-8fcf-e55a527237fe = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.220243703327597, -1.8571327357838692, -0.40744908284514175, -0.01617445872656431
LBFGS Accumulation History: 3 points
Removed measurement 2c3c57ca to history. Total: 3
th(0)=-13.220243703327597;dx=-0.007865920948909769
New Minimum: -13.220243703327597 > -18.435718875011293
WOLF (strong): th(4000.0000000000014)=-18.435718875011293; dx=1.695681900039767E-4 evalInputDelta=5.215475171683696
New Minimum: -18.435718875011293 > -19.026880315000863
END: th(2000.0000000000007)=-19.026880315000863; dx=-7.650949798463922E-4 evalInputDelta=5.806636611673266
Fitness changed from -13.220243703327597 to -19.026880315000863
Iteration 6 complete. Error: -19.026880315000863 Total: 6.0853; Orientation: 0.4580; Line Search: 4.1374
Adding measurement 4f7c5f7f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.473e+04, gradient 9.219e-02, dot -0.154; [0d4c7077-1f41-47cd-8fcf-e55a527237fe = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.026880315000863, -1.8571327357838692, -0.40744908284514175, -0.01617445872656431
LBFGS Accumulation History: 3 points
Removed measurement 4f7c5f7f to history. Total: 3
th(0)=-19.026880315000863;dx=-0.008263506605177315
New Minimum: -19.026880315000863 > -27.384517776259422
WOLF (strong): th(4308.869380063769)=-27.384517776259422; dx=9.209076064662855E-4 evalInputDelta=8.357637461258559
New Minimum: -27.384517776259422 > -29.130820559539995
END: th(2154.4346900318847)=-29.130820559539995; dx=-0.001715938694372897 evalInputDelta=10.103940244539132
Fitness changed from -19.026880315000863 to -29.130820559539995
Iteration 7 complete. Error: -29.130820559539995 Total: 6.5845; Orientation: 0.4663; Line Search: 4.7863
Adding measurement 18848493 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.324e+07, gradient 1.567e-01, dot -0.072; [0d4c7077-1f41-47cd-8fcf-e55a527237fe = 1.000/1.000e+00]
Orientation rejected. Popping history element from -29.130820559539995, -1.8571327357838692, -0.40744908284514175, -0.01617445872656431
LBFGS Accumulation History: 3 points
Removed measurement 18848493 to history. Total: 3
th(0)=-29.130820559539995;dx=-0.02394158145138739
New Minimum: -29.130820559539995 > -47.91126166610611
WOLF (strong): th(4641.588833612781)=-47.91126166610611; dx=1.2327765108639083E-4 evalInputDelta=18.780441106566112
New Minimum: -47.91126166610611 > -50.63783904306914
END: th(2320.7944168063905)=-50.63783904306914; dx=-0.0018887661102489814 evalInputDelta=21.507018483529148
Fitness changed from -29.130820559539995 to -50.63783904306914
Iteration 8 complete. Error: -50.63783904306914 Total: 5.9899; Orientation: 0.4490; Line Search: 4.1945
Adding measurement 392d4fa5 to hi

...skipping 24281 bytes...

mijo: th(39.65455890202004)=-8.838036898244017; dx=0.09470482308782659 evalInputDelta=-626.8233448553851
Armijo: th(7.930911780404008)=-4.711938138699224; dx=-0.5437531081884968 evalInputDelta=-630.9494436149299
Armijo: th(1.3218186300673347)=-34.919515041688335; dx=8.762554445174143 evalInputDelta=-600.7418667119408
Armijo: th(0.1888312328667621)=-423.6865185101233; dx=194.75646564669648 evalInputDelta=-211.97486324350587
Armijo: th(0.023603904108345262)=-630.740704616438; dx=-504.1102794612242 evalInputDelta=-4.920677137191092
Armijo: th(0.0026226560120383626)=-635.6133110494733; dx=-759.8235766680347 evalInputDelta=-0.04807070415586168
New Minimum: -635.6613817536291 > -635.6633488553169
WOLFE (weak): th(2.6226560120383625E-4)=-635.6633488553169; dx=-786.0271066886296 evalInputDelta=0.0019671016877964576
Armijo: th(0.0014424608066210994)=-635.6545147327475; dx=-768.1547160211185 evalInputDelta=-0.006867020881600183
Armijo: th(8.523632039124678E-4)=-635.6610956292402; dx=-772.2745063624458 evalInputDelta=-2.8612438893560466E-4
New Minimum: -635.6633488553169 > -635.6636707441045
WOLFE (weak): th(5.57314402558152E-4)=-635.6636707441045; dx=-777.6937069174804 evalInputDelta=0.002288990475335595
WOLFE (weak): th(7.048388032353099E-4)=-635.66249048442; dx=-784.4346861515216 evalInputDelta=0.0011087307908610455
WOLFE (weak): th(7.786010035738889E-4)=-635.6617394089343; dx=-764.3214570591194 evalInputDelta=3.5765530515163846E-4
WOLFE (weak): th(8.154821037431783E-4)=-635.6614890502418; dx=-784.7498249228536 evalInputDelta=1.0729661266850599E-4
Armijo: th(8.33922653827823E-4)=-635.6612744569984; dx=-781.4554127111059 evalInputDelta=-1.0729663074471318E-4
Armijo: th(8.247023787855007E-4)=-635.6612386914509; dx=-784.3809982965089 evalInputDelta=-1.4306217826742795E-4
Armijo: th(8.200922412643395E-4)=-635.6612744569984; dx=-780.8320957886244 evalInputDelta=-1.0729663074471318E-4
Armijo: th(8.177871725037588E-4)=-635.661310222544; dx=-779.4773616035302 evalInputDelta=-7.153108515467466E-5
Armijo: th(8.166346381234686E-4)=-635.6613459880876; dx=-780.7193362528549 evalInputDelta=-3.576554149731237E-5
WOLFE (weak): th(8.160583709333235E-4)=-635.6614532847063; dx=-781.5454230555524 evalInputDelta=7.153107719659602E-5
WOLFE (weak): th(8.16346504528396E-4)=-635.6614890502418; dx=-780.5049972706643 evalInputDelta=1.0729661266850599E-4
WOLFE (weak): th(8.164905713259323E-4)=-635.6614890502418; dx=-780.9817325131431 evalInputDelta=1.0729661266850599E-4
WOLFE (weak): th(8.165626047247005E-4)=-635.6614175191687; dx=-774.577416867157 evalInputDelta=3.576553956463613E-5
WOLFE (weak): th(8.165986214240845E-4)=-635.6614175191687; dx=-784.5698756669275 evalInputDelta=3.576553956463613E-5
Armijo: th(8.166166297737766E-4)=-635.6613817536291; dx=-786.9321532645931 evalInputDelta=0.0
WOLFE (weak): th(8.166076255989305E-4)=-635.6614175191687; dx=-778.2014240309562 evalInputDelta=3.576553956463613E-5
WOLFE (weak): th(8.166121276863535E-4)=-635.6614175191687; dx=-776.3944485381833 evalInputDelta=3.576553956463613E-5
mu ~= nu (8.166121276863535E-4): th(5.57314402558152E-4)=-635.6636707441045
Fitness changed from -635.6613817536291 to -635.6636707441045
Iteration 29 complete. Error: -635.6636707441045 Total: 46.2187; Orientation: 0.4361; Line Search: 44.4291
Adding measurement 5366548 to history. Total: 4
Accepted: LBFGS Orientation magnitude: 1.325e+06, gradient 4.177e-01, dot 0.091; [0d4c7077-1f41-47cd-8fcf-e55a527237fe = 1.000/1.000e+00]
th(0)=-635.6636707441045;dx=-50164.233193135864
Armijo: th(0.0017593423459148871)=-425.5703105294554; dx=34748.00614693595 evalInputDelta=-210.09336021464907
Armijo: th(8.796711729574436E-4)=-560.314384368553; dx=15217.075546741504 evalInputDelta=-75.34928637555151
Armijo: th(2.9322372431914785E-4)=-622.9366447196716; dx=-20138.302029709153 evalInputDelta=-12.727026024432917
Armijo: th(7.330593107978696E-5)=-633.6608355613769; dx=-41814.95500343584 evalInputDelta=-2.0028351827276083
Armijo: th(1.4661186215957392E-5)=-635.3358319703468; dx=-47788.53077145965 evalInputDelta=-0.32783877375766224
Armijo: th(2.443531035992899E-6)=-635.6104138149866; dx=-49146.023591970625 evalInputDelta=-0.053256929117878826
Armijo: th(3.490758622846998E-7)=-635.6562314949227; dx=-48859.445135424845 evalInputDelta=-0.007439249181743435
Armijo: th(4.363448278558748E-8)=-635.6625977808454; dx=-49858.48328042796 evalInputDelta=-0.0010729632590482652
Armijo: th(4.848275865065275E-9)=-635.6634561515975; dx=-49870.09704530222 evalInputDelta=-2.145925069498844E-4
Armijo: th(4.848275865065275E-10)=-635.6635992132769; dx=-49333.78957526025 evalInputDelta=-7.153082754030038E-5
MIN ALPHA (4.4075235136957044E-11): th(0.0)=-635.6636707441045
Fitness changed from -635.6636707441045 to -635.6636707441045
Static Iteration Total: 19.1089; Orientation: 0.5686; Line Search: 17.2105
Iteration 30 failed. Error: -635.6636707441045
Previous Error: 0.0 -> -635.6636707441045
Retrying iteration 30
Reset training subject: 2129304265952
Adding measurement d0ec27 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-635.6636707441045;dx=-0.16961930474267045
WOLFE (weak): th(2.1544346900318838E-10)=-635.6636707441045; dx=-0.1689378319496825 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-635.6636707441045; dx=-0.16976120451553472 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-635.6636707441045; dx=-0.16926762990622246 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-635.6636707441045; dx=-0.1700204574561753 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-635.6636707441045; dx=-0.16940475246043674 evalInputDelta=0.0
Armijo: th(1.5511929768229565E-7)=-635.6636349786917; dx=-0.16942684223582127 evalInputDelta=-3.576541280381207E-5
Armijo: th(9.048625698133912E-8)=-635.6636349786917; dx=-0.16747342198817172 evalInputDelta=-3.576541280381207E-5
Armijo: th(5.816973663086087E-8)=-635.6636349786917; dx=-0.16988074963564342 evalInputDelta=-3.576541280381207E-5
Armijo: th(4.201147645562173E-8)=-635.6636349786917; dx=-0.16971612514500517 evalInputDelta=-3.576541280381207E-5
WOLFE (weak): th(3.393234636800217E-8)=-635.6636707441045; dx=-0.16964704036869382 evalInputDelta=0.0
WOLFE (weak): th(3.797191141181195E-8)=-635.6636707441045; dx=-0.16989490709976812 evalInputDelta=0.0
Armijo: th(3.9991693933716846E-8)=-635.6636349786917; dx=-0.16813504248325212 evalInputDelta=-3.576541280381207E-5
WOLFE (weak): th(3.8981802672764396E-8)=-635.6636707441045; dx=-0.1687960993508392 evalInputDelta=0.0
WOLFE (weak): th(3.948674830324062E-8)=-635.6636707441045; dx=-0.16988437985810934 evalInputDelta=0.0
Armijo: th(3.973922111847874E-8)=-635.6636349786917; dx=-0.1699156845698357 evalInputDelta=-3.576541280381207E-5
WOLFE (weak): th(3.9612984710859676E-8)=-635.6636707441045; dx=-0.1698918509135537 evalInputDelta=0.0
WOLFE (weak): th(3.9676102914669207E-8)=-635.6636707441045; dx=-0.16838099846017363 evalInputDelta=0.0
Armijo: th(3.970766201657397E-8)=-635.6636349786917; dx=-0.16984877423193948 evalInputDelta=-3.576541280381207E-5
WOLFE (weak): th(3.9691882465621586E-8)=-635.6636707441045; dx=-0.16996948374816315 evalInputDelta=0.0
WOLFE (weak): th(3.9699772241097776E-8)=-635.6636707441045; dx=-0.16816961385444162 evalInputDelta=0.0
WOLFE (weak): th(3.970371712883587E-8)=-635.6636707441045; dx=-0.1671041266013792 evalInputDelta=0.0
WOLFE (weak): th(3.9705689572704924E-8)=-635.6636707441045; dx=-0.1699710724890207 evalInputDelta=0.0
Armijo: th(3.9706675794639445E-8)=-635.6636349786917; dx=-0.17000773905343003 evalInputDelta=-3.576541280381207E-5
WOLFE (weak): th(3.9706182683672185E-8)=-635.6636707441045; dx=-0.168119290485314 evalInputDelta=0.0
Armijo: th(3.9706429239155815E-8)=-635.6636349786917; dx=-0.16912326908551262 evalInputDelta=-3.576541280381207E-5
mu ~= nu (3.9706182683672185E-8): th(0.0)=-635.6636707441045
Fitness changed from -635.6636707441045 to -635.6636707441045
Static Iteration Total: 41.0213; Orientation: 0.0192; Line Search: 38.3120
Iteration 31 failed. Error: -635.6636707441045
Previous Error: 0.0 -> -635.6636707441045
Optimization terminated 31
Final threshold in iteration 31: -635.6636707441045 (> -Infinity) after 326.750s (< 3600.000s)

Returns

    -635.6636707441045