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 388.00 seconds (3.719 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: 2176276685490
Reset training subject: 2177660384029
Adding measurement 43d70f90 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.173561668835105;dx=-1.5967087931965297E-4
New Minimum: -2.173561668835105 > -2.173966788391353
WOLFE (weak): th(2.154434690031884)=-2.173966788391353; dx=-1.596516569205011E-4 evalInputDelta=4.051195562482235E-4
New Minimum: -2.173966788391353 > -2.1743722897326654
WOLFE (weak): th(4.308869380063768)=-2.1743722897326654; dx=-1.581777645501232E-4 evalInputDelta=8.106208975604545E-4
New Minimum: -2.1743722897326654 > -2.1759901451385395
WOLFE (weak): th(12.926608140191302)=-2.1759901451385395; dx=-1.6017808508020105E-4 evalInputDelta=0.002428476303434568
New Minimum: -2.1759901451385395 > -2.183280640457799
WOLFE (weak): th(51.70643256076521)=-2.183280640457799; dx=-1.5959385736434697E-4 evalInputDelta=0.009718971622694195
New Minimum: -2.183280640457799 > -2.2219798333701077
WOLFE (weak): th(258.53216280382605)=-2.2219798333701077; dx=-1.5768726903032978E-4 evalInputDelta=0.048418164535002806
New Minimum: -2.2219798333701077 > -2.4570222745509476
WOLFE (weak): th(1551.1929768229563)=-2.4570222745509476; dx=-1.4402696374693578E-4 evalInputDelta=0.28346060571584264
New Minimum: -2.4570222745509476 > -3.40409694942766
END: th(10858.350837760694)=-3.40409694942766; dx=-2.5317067770136245E-5 evalInputDelta=1.2305352805925551
Fitness changed from -2.173561668835105 to -3.40409694942766
Iteration 1 complete. Error: -3.40409694942766 Total: 15.1298; Orientation: 0.0182; Line Search: 11.0463
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bf40cd1e-d4ad-412b-a5fc-0edee5f61323.jpg)
Adding measurement 48cd863b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-3.40409694942766;dx=-1.739952585398728E-4
New Minimum: -3.40409694942766 > -4.032911524871419
END: th(23393.607721408407)=-4.032911524871419; dx=-9.579843501054666E-7 evalInputDelta=0.6288145754437586
Fitness changed from -3.40409694942766 to -4.032911524871419
Iteration 2 complete. Error: -4.032911524871419 Total: 4.8151; Orientation: 0.0170; Line Search: 3.3348
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/eb1306b2-9cac-4227-84f9-5c336a7e96bf.jpg)
Adding measurement 6f0184fb to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-4.032911524871419;dx=-4.3573100316104854E-4
New Minimum: -4.032911524871419 > -4.966735609537378
WOLF (strong): th(50400.00000000001)=-4.966735609537378; dx=2.527163314975749E-5 evalInputDelta=0.9338240846659591
WOLF (strong): th(25200.000000000004)=-4.954592774039546; dx=2.893686863340565E-5 evalInputDelta=0.9216812491681274
New Minimum: -4.966735609537378 > -5.238355024215892
END: th(8400.000000000002)=-5.238355024215892; dx=-4.4254314535105196E-5 evalInputDelta=1.2054434993444731
Fitness changed from -4.032911524871419 to -5.238355024215892
Iteration 3 complete. Error: -5.238355024215892 Total: 7.0232; Orientation: 0.0190; Line Search: 5.5353
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/85a5e953-1d87-4125-826e-dd1439810cd8.jpg)
Adding measurement 141ec8db to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.046e+02, gradient 1.434e-02, dot -0.390; [c07c640d-0f89-4749-a308-1ff578654fa7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.238355024215892, -4.032911524871419, -3.40409694942766, -2.173561668835105
LBFGS Accumulation History: 3 points
Removed measurement 141ec8db to history. Total: 3
th(0)=-5.238355024215892;dx=-2.0235032032609465E-4
New Minimum: -5.238355024215892 > -7.076389296277245
END: th(18097.251396267828)=-7.076389296277245; dx=-1.5253333102676025E-5 evalInputDelta=1.8380342720613534
Fitness changed from -5.238355024215892 to -7.076389296277245
Iteration 4 complete. Error: -7.076389296277245 Total: 4.7126; Orientation: 0.4532; Line Search: 2.7843
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/234cbc6f-46a3-477e-b538-4d5e6f89a8a4.jpg)
Adding measurement 10f50e8b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.011e+03, gradient 2.340e-02, dot -0.273; [c07c640d-0f89-4749-a308-1ff578654fa7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.076389296277245, -4.032911524871419, -3.40409694942766, -2.173561668835105
LBFGS Accumulation History: 3 points
Removed measurement 10f50e8b to history. Total: 3
th(0)=-7.076389296277245;dx=-5.445586532935075E-4
New Minimum: -7.076389296277245 > -8.439425679404378
WOLF (strong): th(38989.346202347355)=-8.439425679404378; dx=5.438566956384789E-6 evalInputDelta=1.3630363831271328
New Minimum: -8.439425679404378 > -9.256174613779539
END: th(19494.673101173677)=-9.256174613779539; dx=-2.9684894919565613E-5 evalInputDelta=2.1797853175022937
Fitness changed from -7.076389296277245 to -9.256174613779539
Iteration 5 complete. Error: -9.256174613779539 Total: 6.0588; Orientation: 0.4538; Line Search: 4.1467
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/96090613-df2f-4066-825e-813f06b419dc.jpg)
Adding measurement 63593301 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.926e+03, gradient 3.197e-02, dot -0.213; [c07c640d-0f89-4749-a308-1ff578654fa7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.256174613779539, -4.032911524871419, -3.40409694942766, -2.173561668835105
LBFGS Accumulation History: 3 points
Removed measurement 63593301 to history. Total: 3
th(0)=-9.256174613779539;dx=-0.0010101609747248826
New Minimum: -9.256174613779539 > -10.24076250335483
WOLF (strong): th(42000.000000000015)=-10.24076250335483; dx=4.138882105099495E-5 evalInputDelta=0.9845878895752911
New Minimum: -10.24076250335483 > -12.139138125895997
WOLF (strong): th(21000.000000000007)=-12.139138125895997; dx=3.39290682329543E-5 evalInputDelta=2.882963512116458
New Minimum: -12.139138125895997 > -13.514399802192555
END: th(7000.000000000003)=-13.514399802192555; dx=-1.9572375197104492E-4 evalInputDelta=4.258225188413016
Fitness changed from -9.256174613779539 to -13.514399802192555
Iteration 6 complete. Error: -13.514399802192555 Total: 7.5041; Orientation: 0.4566; Line Search: 5.5573
Adding measurement 1dc5e1df to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.344e+04, gradient 3.042e-02, dot -0.239; [c07c640d-0f89-4749-a308-1ff578654fa7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.514399802192555, -4.032911524871419, -3.40409694942766, -2.173561668835105
LBFGS Accumulation History: 3 points
Removed measurement 1dc5e1df to history. Total: 3
th(0)=-13.514399802192555;dx=-9.14789131009354E-4
New Minimum: -13.514399802192555 > -16.283296944046775
WOLF (strong): th(15081.042830223192)=-16.283296944046775; dx=2.325922982727848E-5 evalInputDelta=2.76889714185422
New Minimum: -16.283296944046775 > -16.98410900049995
END: th(7540.521415111596)=-16.98410900049995; dx=-1.7848752100088172E-4 evalInputDelta=3.4697091983073935
Fitness changed from -13.514399802192555 to -16.98410900049995
Iteration 7 complete. Error: -16.98410900049995 Total: 5.9469; Orientation: 0.4643; Line Search: 4.1565
Adding measurement 7f53b70d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.258e+04, gradient 3.716e-02, dot -0.156; [c07c640d-0f89-4749-a308-1ff578654fa7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.98410900049995, -4.032911524871419, -3.40409694942766, -2.173561668835105
LBFGS Accumulation History: 3 points
Removed measurement 7f53b70d to history. Total: 3
th(0)=-16.98410900049995;dx=-0.0013699415622799626
Armijo: th(16245.560917644734)=-15.66474634288678; dx=1.2780662574924667E-4 evalInputDelta=-1.3193626576131692
New Minimum: -16.98410900049995 > -19.059955228893894
WOLF (strong): th(8122.780458822367)=-19.059955228893894; dx=7.436012120390679E-5 evalInputDelta=2.075846228393946
New Minimum: -19.059955228893894 > -19.71615155969978
END: th(2707.5934862741224)=-19.71615155969978; dx=-5.162988161903138E-4 evalInputDelta=2.732042559199833
Fitness changed from -16.98410900049995 to -19.71615155969978
Iteration 8 complete. Error: -19.71615155969978 Total: 7.3705; Orientati

...skipping 26917 bytes...

14364212E-6
Armijo: th(1.6301900832642928E-9)=-42.17548364348726; dx=-64.00925486617459 evalInputDelta=0.0
Armijo: th(1.6272732421610365E-9)=-42.17548364348726; dx=-64.32231219186414 evalInputDelta=0.0
WOLFE (weak): th(1.6258148216094085E-9)=-42.1754870920952; dx=-63.95840142942413 evalInputDelta=3.4486079414364212E-6
WOLFE (weak): th(1.6265440318852224E-9)=-42.17548536779127; dx=-65.38906328814475 evalInputDelta=1.7243040062453474E-6
WOLFE (weak): th(1.6269086370231294E-9)=-42.17548536779127; dx=-62.503491195259784 evalInputDelta=1.7243040062453474E-6
WOLFE (weak): th(1.627090939592083E-9)=-42.17548536779127; dx=-60.194818920824176 evalInputDelta=1.7243040062453474E-6
Armijo: th(1.6271820908765597E-9)=-42.17548364348726; dx=-64.53361059793157 evalInputDelta=0.0
WOLFE (weak): th(1.6271365152343214E-9)=-42.17548536779127; dx=-56.28377646852328 evalInputDelta=1.7243040062453474E-6
WOLFE (weak): th(1.6271593030554406E-9)=-42.17548536779127; dx=-63.09362041173431 evalInputDelta=1.7243040062453474E-6
Armijo: th(1.627170696966E-9)=-42.17548364348726; dx=-59.94918117772297 evalInputDelta=0.0
mu ~= nu (1.6271593030554406E-9): th(1.5660195789926567E-9)=-42.1754870920952
Fitness changed from -42.17548364348726 to -42.1754870920952
Iteration 25 complete. Error: -42.1754870920952 Total: 42.7701; Orientation: 0.7343; Line Search: 40.6951
<a id="p-19"></a>Iteration 25
<a id="p-18"></a>![Iteration 25](etc/eadd6bd1-7197-4538-bf8b-0055a5569340.jpg)
Adding measurement 44ab0ec4 to history. Total: 6
Accepted: LBFGS Orientation magnitude: 8.966e+04, gradient 3.857e-02, dot 0.080; [c07c640d-0f89-4749-a308-1ff578654fa7 = 1.000/1.000e+00]
th(0)=-42.1754870920952;dx=-277.3482814532397
Armijo: th(3.505620722428826E-9)=-42.17548536779127; dx=-277.50898844816487 evalInputDelta=-1.7243039351910738E-6
Armijo: th(1.752810361214413E-9)=-42.1754870920952; dx=-279.2507457162319 evalInputDelta=0.0
Armijo: th(5.842701204048043E-10)=-42.17548364348726; dx=-279.4920108760582 evalInputDelta=-3.4486079414364212E-6
WOLFE (weak): th(1.4606753010120108E-10)=-42.1754870920952; dx=-273.33297775829203 evalInputDelta=0.0
Armijo: th(3.651688252530027E-10)=-42.17548364348726; dx=-275.57062072703013 evalInputDelta=-3.4486079414364212E-6
Armijo: th(2.556181776771019E-10)=-42.17548536779127; dx=-278.1801027980933 evalInputDelta=-1.7243039351910738E-6
WOLFE (weak): th(2.008428538891515E-10)=-42.1754870920952; dx=-278.2991977438644 evalInputDelta=0.0
Armijo: th(2.282305157831267E-10)=-42.17548364348726; dx=-277.74595778017454 evalInputDelta=-3.4486079414364212E-6
Armijo: th(2.145366848361391E-10)=-42.17548364348726; dx=-275.61234577728294 evalInputDelta=-3.4486079414364212E-6
Armijo: th(2.0768976936264528E-10)=-42.17548364348726; dx=-276.254740162193 evalInputDelta=-3.4486079414364212E-6
WOLFE (weak): th(2.042663116258984E-10)=-42.1754870920952; dx=-275.06491385230765 evalInputDelta=0.0
Armijo: th(2.0597804049427185E-10)=-42.17548364348726; dx=-273.3105347024755 evalInputDelta=-3.4486079414364212E-6
Armijo: th(2.0512217606008513E-10)=-42.17548536779127; dx=-279.19889475009217 evalInputDelta=-1.7243039351910738E-6
Armijo: th(2.0469424384299175E-10)=-42.17548364348726; dx=-276.31008464214887 evalInputDelta=-3.4486079414364212E-6
Armijo: th(2.0448027773444506E-10)=-42.17548364348726; dx=-277.83115206913794 evalInputDelta=-3.4486079414364212E-6
Armijo: th(2.0437329468017174E-10)=-42.17548536779127; dx=-277.1519008726409 evalInputDelta=-1.7243039351910738E-6
Armijo: th(2.0431980315303508E-10)=-42.17548536779127; dx=-278.69960648768694 evalInputDelta=-1.7243039351910738E-6
Armijo: th(2.0429305738946675E-10)=-42.17548536779127; dx=-277.75471182593583 evalInputDelta=-1.7243039351910738E-6
Armijo: th(2.0427968450768256E-10)=-42.17548536779127; dx=-276.1286455294268 evalInputDelta=-1.7243039351910738E-6
Armijo: th(2.0427299806679049E-10)=-42.17548536779127; dx=-275.7405745938876 evalInputDelta=-1.7243039351910738E-6
Armijo: th(2.0426965484634445E-10)=-42.17548536779127; dx=-273.9798640013274 evalInputDelta=-1.7243039351910738E-6
WOLFE (weak): th(2.0426798323612143E-10)=-42.1754870920952; dx=-278.4102562894433 evalInputDelta=0.0
mu ~= nu (2.0426798323612143E-10): th(0.0)=-42.1754870920952
Fitness changed from -42.1754870920952 to -42.1754870920952
Static Iteration Total: 36.1704; Orientation: 0.7852; Line Search: 33.9178
Iteration 26 failed. Error: -42.1754870920952
Previous Error: 0.0 -> -42.1754870920952
Retrying iteration 26
Reset training subject: 2517952431009
Adding measurement 11943795 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-42.1754870920952;dx=-0.001470346865205439
WOLFE (weak): th(4.4008382983427767E-10)=-42.1754870920952; dx=-0.0014682007249268733 evalInputDelta=0.0
WOLFE (weak): th(8.801676596685553E-10)=-42.1754870920952; dx=-0.0014708344268695376 evalInputDelta=0.0
WOLFE (weak): th(2.6405029790056662E-9)=-42.1754870920952; dx=-0.0014691156297987728 evalInputDelta=0.0
WOLFE (weak): th(1.0562011916022665E-8)=-42.1754870920952; dx=-0.0014604757777199435 evalInputDelta=0.0
WOLFE (weak): th(5.281005958011333E-8)=-42.1754870920952; dx=-0.0014630198576752154 evalInputDelta=0.0
WOLFE (weak): th(3.1686035748067994E-7)=-42.1754870920952; dx=-0.0014655658804402895 evalInputDelta=0.0
WOLFE (weak): th(2.2180225023647598E-6)=-42.1754870920952; dx=-0.0014577928364817854 evalInputDelta=0.0
WOLFE (weak): th(1.7744180018918078E-5)=-42.1754870920952; dx=-0.0014713050658146367 evalInputDelta=0.0
Armijo: th(1.596976201702627E-4)=-42.17548536779127; dx=-0.0014707590526343852 evalInputDelta=-1.7243039351910738E-6
Armijo: th(8.872090009459039E-5)=-42.17548364348726; dx=-0.0014714883331794415 evalInputDelta=-3.4486079414364212E-6
Armijo: th(5.3232540056754235E-5)=-42.17548364348726; dx=-0.0014699848511742267 evalInputDelta=-3.4486079414364212E-6
Armijo: th(3.5488360037836157E-5)=-42.17548364348726; dx=-0.0014703911753962099 evalInputDelta=-3.4486079414364212E-6
Armijo: th(2.6616270028377117E-5)=-42.17548536779127; dx=-0.0014622505238948839 evalInputDelta=-1.7243039351910738E-6
WOLFE (weak): th(2.2180225023647598E-5)=-42.1754870920952; dx=-0.0014678071053692227 evalInputDelta=0.0
WOLFE (weak): th(2.4398247526012358E-5)=-42.1754870920952; dx=-0.0014682037325360218 evalInputDelta=0.0
WOLFE (weak): th(2.550725877719474E-5)=-42.1754870920952; dx=-0.0014714405758740644 evalInputDelta=0.0
WOLFE (weak): th(2.606176440278593E-5)=-42.1754870920952; dx=-0.0014718016046335145 evalInputDelta=0.0
Armijo: th(2.6339017215581523E-5)=-42.17548536779127; dx=-0.0014586917448554087 evalInputDelta=-1.7243039351910738E-6
Armijo: th(2.6200390809183727E-5)=-42.17548536779127; dx=-0.0014713137238818823 evalInputDelta=-1.7243039351910738E-6
WOLFE (weak): th(2.6131077605984828E-5)=-42.1754870920952; dx=-0.0014721624607780253 evalInputDelta=0.0
Armijo: th(2.6165734207584278E-5)=-42.17548536779127; dx=-0.00147004222136416 evalInputDelta=-1.7243039351910738E-6
WOLFE (weak): th(2.614840590678455E-5)=-42.1754870920952; dx=-0.0014607027671129 evalInputDelta=0.0
WOLFE (weak): th(2.6157070057184413E-5)=-42.1754870920952; dx=-0.0014649835261803918 evalInputDelta=0.0
Armijo: th(2.6161402132384347E-5)=-42.17548536779127; dx=-0.0014653607694648646 evalInputDelta=-1.7243039351910738E-6
WOLFE (weak): th(2.615923609478438E-5)=-42.1754870920952; dx=-0.0014720767340558264 evalInputDelta=0.0
Armijo: th(2.6160319113584363E-5)=-42.17548536779127; dx=-0.0014697393589613564 evalInputDelta=-1.7243039351910738E-6
Armijo: th(2.615977760418437E-5)=-42.17548536779127; dx=-0.001471420546921893 evalInputDelta=-1.7243039351910738E-6
Armijo: th(2.6159506849484375E-5)=-42.17548536779127; dx=-0.00147017972907635 evalInputDelta=-1.7243039351910738E-6
WOLFE (weak): th(2.6159371472134375E-5)=-42.1754870920952; dx=-0.0014630412792072903 evalInputDelta=0.0
mu ~= nu (2.6159371472134375E-5): th(0.0)=-42.1754870920952
Fitness changed from -42.1754870920952 to -42.1754870920952
Static Iteration Total: 46.3261; Orientation: 0.0168; Line Search: 43.6216
Iteration 27 failed. Error: -42.1754870920952
Previous Error: 0.0 -> -42.1754870920952
Optimization terminated 27
Final threshold in iteration 27: -42.1754870920952 (> -Infinity) after 388.002s (< 3600.000s)

Returns

    -42.1754870920952