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 85.81 seconds (0.871 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: 305242468574300
Reset training subject: 305244275816800
Adding measurement 5abf4f34 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-149.58238879300384;dx=-3.0431695564917994E-5
New Minimum: -149.58238879300384 > -149.5824300711115
END: th(2.154434690031884)=-149.5824300711115; dx=-1.9626693258888113E-5 evalInputDelta=4.12781076590818E-5
Fitness changed from -149.58238879300384 to -149.5824300711115
Iteration 1 complete. Error: -149.5824300711115 Total: 8.4005; Orientation: 0.0670; Line Search: 3.3211
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/43b7f08e-f098-42a3-bd28-40daf35f202b.jpg)
Adding measurement 6eae7fb9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-149.5824300711115;dx=-1.9497271478727366E-5
New Minimum: -149.5824300711115 > -149.58253326633078
WOLFE (weak): th(4.641588833612779)=-149.58253326633078; dx=-1.9481862891149195E-5 evalInputDelta=1.031952192818153E-4
New Minimum: -149.58253326633078 > -149.58263646147887
WOLFE (weak): th(9.283177667225559)=-149.58263646147887; dx=-1.9453268500999722E-5 evalInputDelta=2.0639036736724847E-4
New Minimum: -149.58263646147887 > -149.58302860239235
WOLFE (weak): th(27.849533001676676)=-149.58302860239235; dx=-1.943782912994925E-5 evalInputDelta=5.985312808434173E-4
New Minimum: -149.58302860239235 > -149.58483106143893
WOLFE (weak): th(111.3981320067067)=-149.58483106143893; dx=-1.9420023842831505E-5 evalInputDelta=0.0024009903274304634
New Minimum: -149.58483106143893 > -149.59442087912606
WOLFE (weak): th(556.9906600335335)=-149.59442087912606; dx=-1.943754170593255E-5 evalInputDelta=0.011990808014559207
New Minimum: -149.59442087912606 > -149.6543398789125
WOLFE (weak): th(3341.9439602012008)=-149.6543398789125; dx=-1.9405947402413243E-5 evalInputDelta=0.07190980780100631
New Minimum: -149.6543398789125 > -150.08493806203762
WOLFE (weak): th(23393.607721408407)=-150.08493806203762; dx=-1.936228361921303E-5 evalInputDelta=0.5025079909261194
New Minimum: -150.08493806203762 > -153.54157824029778
WOLFE (weak): th(187148.86177126726)=-153.54157824029778; dx=-1.874572366640942E-5 evalInputDelta=3.959148169186278
New Minimum: -153.54157824029778 > -178.6602264529992
END: th(1684339.7559414054)=-178.6602264529992; dx=-1.1345067423608892E-5 evalInputDelta=29.07779638188771
Fitness changed from -149.5824300711115 to -178.6602264529992
Iteration 2 complete. Error: -178.6602264529992 Total: 18.0445; Orientation: 0.0648; Line Search: 16.0391
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d51c9ee6-1996-4ea9-bcf5-28707946ecc6.jpg)
Adding measurement 2174df1c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-178.6602264529992;dx=-1.3951003999974267E-5
New Minimum: -178.6602264529992 > -213.31506150916343
END: th(3628800.0000000005)=-213.31506150916343; dx=-4.9330875947789695E-6 evalInputDelta=34.65483505616422
Fitness changed from -178.6602264529992 to -213.31506150916343
Iteration 3 complete. Error: -213.31506150916343 Total: 5.1381; Orientation: 0.0642; Line Search: 3.2297
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/056d5c96-b2fa-4a5a-bcd5-addfd7b4aae8.jpg)
Adding measurement 60d61293 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.464e+04, gradient 3.215e-03, dot -0.427; [5e41b98f-6521-4cd9-a268-6701a878ec87 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -213.31506150916343, -178.6602264529992, -149.5824300711115, -149.58238879300384
LBFGS Accumulation History: 3 points
Removed measurement 60d61293 to history. Total: 3
th(0)=-213.31506150916343;dx=-1.0315329346747886E-5
New Minimum: -213.31506150916343 > -241.70179366704735
END: th(7818012.603187701)=-241.70179366704735; dx=-1.224256290124913E-7 evalInputDelta=28.386732157883927
Fitness changed from -213.31506150916343 to -241.70179366704735
Iteration 4 complete. Error: -241.70179366704735 Total: 6.2516; Orientation: 1.0585; Line Search: 3.2585
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/fbba032e-cd3b-4933-96c4-7c4f69599401.jpg)
Adding measurement 1c7b463c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.745e+03, gradient 3.697e-03, dot -0.160; [5e41b98f-6521-4cd9-a268-6701a878ec87 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -241.70179366704735, -178.6602264529992, -149.5824300711115, -149.58238879300384
LBFGS Accumulation History: 3 points
Removed measurement 1c7b463c to history. Total: 3
th(0)=-241.70179366704735;dx=-1.3663543124362812E-5
Armijo: th(1.6843397559414055E7)=-212.12560347487212; dx=3.4075122083158868E-6 evalInputDelta=-29.576190192175233
New Minimum: -241.70179366704735 > -252.90295956319844
WOLF (strong): th(8421698.779707028)=-252.90295956319844; dx=4.40282422333184E-6 evalInputDelta=11.201165896151082
New Minimum: -252.90295956319844 > -267.3534013262671
END: th(2807232.926569009)=-267.3534013262671; dx=-3.2054770454855562E-6 evalInputDelta=25.651607659219735
Fitness changed from -241.70179366704735 to -267.3534013262671
Iteration 5 complete. Error: -267.3534013262671 Total: 9.4625; Orientation: 1.0574; Line Search: 6.4505
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/001a5c8b-e251-4472-b162-96e95c64a3f8.jpg)
Adding measurement 3d6e8e66 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.218e+04, gradient 2.462e-03, dot -0.390; [5e41b98f-6521-4cd9-a268-6701a878ec87 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -267.3534013262671, -178.6602264529992, -149.5824300711115, -149.58238879300384
LBFGS Accumulation History: 3 points
Removed measurement 3d6e8e66 to history. Total: 3
th(0)=-267.3534013262671;dx=-6.042345148067884E-6
New Minimum: -267.3534013262671 > -285.0436964502243
END: th(6048000.000000001)=-285.0436964502243; dx=-3.594286084808255E-7 evalInputDelta=17.690295123957185
Fitness changed from -267.3534013262671 to -285.0436964502243
Iteration 6 complete. Error: -285.0436964502243 Total: 6.4074; Orientation: 1.0600; Line Search: 3.5029
Adding measurement 6fa56af to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.219e+04, gradient 2.845e-03, dot -0.272; [5e41b98f-6521-4cd9-a268-6701a878ec87 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -285.0436964502243, -178.6602264529992, -149.5824300711115, -149.58238879300384
LBFGS Accumulation History: 3 points
Removed measurement 6fa56af to history. Total: 3
th(0)=-285.0436964502243;dx=-8.085987692624897E-6
Armijo: th(1.3030021005312836E7)=-266.78066757258455; dx=3.002578624175376E-6 evalInputDelta=-18.263028877639726
New Minimum: -285.0436964502243 > -291.4992604533774
WOLF (strong): th(6515010.502656418)=-291.4992604533774; dx=2.9047505565310273E-6 evalInputDelta=6.4555640031531425
New Minimum: -291.4992604533774 > -297.4445058317552
END: th(2171670.167552139)=-297.4445058317552; dx=-2.4654735940316956E-6 evalInputDelta=12.400809381530905
Fitness changed from -285.0436964502243 to -297.4445058317552
Iteration 7 complete. Error: -297.4445058317552 Total: 8.9453; Orientation: 1.0054; Line Search: 6.3455
Adding measurement 28ede to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.906e+04, gradient 1.845e-03, dot -0.486; [5e41b98f-6521-4cd9-a268-6701a878ec87 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -297.4445058317552, -178.6602264529992, -149.5824300711115, -149.58238879300384
LBFGS Accumulation History: 3 points
Removed measurement 28ede to history. Total: 3
th(0)=-297.4445058317552;dx=-3.40379740396343E-6
New Minimum: -297.4445058317552 > -308.64981440647966
END: th(4678721.544281682)=-308.64981440647966; dx=-1.4138753948826376E-6 evalInputDelta=11.205308574724484
Fitness changed from -297.4445058317552 to -308.64981440647966
Iteration 8 complete. Error: -308.64981440647966 Total: 6.0411; Orientation: 0.9851; Line Search: 3.2463
Adding measurement 8caed15 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.908e+04, gradient 1.952e-03, dot -0.414; [5e41b98f-6521-4cd9-a268-6701a878ec87 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -308.64981440647966, -178.6602264529992, -149.5824300711115, -149.58238879300384
LBFGS Accumulation History: 3 points
Removed measurement 8caed15 to history. Total: 3
th(0)=-308.64981440647966;dx=-3.8051543241627865E-6
New Minimum: -308.64981440647966 > -312.2272790341546
WOLF (strong): th(1.0080000000000002E7)=-312.2272790341546; dx=9.93174327806574E-7 evalInputDelta=3.577464627674942
New Minimum: -312.2272790341546 > -316.46873191660217
END: th(5040000.000000001)=-316.46873191660217; dx=-1.7772282773666235E-8 evalInputDelta=7.818917510122503
Fitness changed from -308.64981440647966 to -316.46873191660217
Iteration 9 complete. Error: -316.46873191660217 Total: 7.5941; Orientation: 1.0553; Line Search: 5.0080
Adding measurement 109aa845 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.670e+04, gradient 2.257e-03, dot -0.306; [5e41b98f-6521-4cd9-a268-6701a878ec87 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -316.46873191660217, -178.6602264529992, -149.5824300711115, -149.58238879300384
LBFGS Accumulation History: 3 points
Removed measurement 109aa845 to history. Total: 3
th(0)=-316.46873191660217;dx=-5.091860000399064E-6
Armijo: th(1.0858350837760696E7)=-305.37096202068324; dx=2.796791481295451E-6 evalInputDelta=-11.09776989591893
New Minimum: -316.46873191660217 > -322.2388701243485
WOLF (strong): th(5429175.418880348)=-322.2388701243485; dx=1.873726412666396E-6 evalInputDelta=5.770138207746356
New Minimum: -322.2388701243485 > -323.61949063150934
END: th(1809725.1396267826)=-323.61949063150934; dx=-2.2596716355171766E-6 evalInputDelta=7.15075871490717
Fitness changed from -316.46873191660217 to -323.61949063150934
Iteration 10 complete. Error: -323.61949063150934 Total: 9.2445; Orientation: 1.0401; Line Search: 6.6511
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0b199321-557e-4d53-8e4c-da678a849435.jpg)
Final threshold in iteration 11: -323.61949063150934 (> -Infinity) after 85.810s (< 5400.000s)

Returns

    -323.61949063150934