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 599.47 seconds (4.877 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: 2789900272136
Reset training subject: 2802695806015
Adding measurement 51659e82 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-38.380260437726974;dx=-1.0860024035561188E-6
New Minimum: -38.380260437726974 > -38.380262434482574
END: th(2.154434690031884)=-38.380262434482574; dx=-7.036001146819912E-7 evalInputDelta=1.996755599975586E-6
Fitness changed from -38.380260437726974 to -38.380262434482574
Iteration 1 complete. Error: -38.380262434482574 Total: 62.8381; Orientation: 0.0739; Line Search: 25.1370
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/27a27538-c5d7-4d4d-83cd-2e3ea6ac95c4.jpg)

    Adding measurement 74c1ef1e to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-38.380262434482574;dx=-6.974113616698011E-7
    New Minimum: -38.380262434482574 > -38.3802652657032
    WOLFE (weak): th(4.641588833612779)=-38.3802652657032; dx=-6.968417567172847E-7 evalInputDelta=2.8312206268310547E-6
    New Minimum: -38.3802652657032 > -38.38027036190033
    WOLFE (weak): th(9.283177667225559)=-38.38027036190033; dx=-6.96392104672661E-7 evalInputDelta=7.927417755126953E-6
    New Minimum: -38.38027036190033 > -38.38028413057327
    WOLFE (weak): th(27.849533001676676)=-38.38028413057327; dx=-6.955183889074257E-7 evalInputDelta=2.1696090698242188E-5
    New Minimum: -38.38028413057327 > -38.380351066589355
    WOLFE (weak): th(111.3981320067067)=-38.380351066589355; dx=-6.946827595607732E-7 evalInputDelta=8.863210678100586E-5
    New Minimum: -38.380351066589355 > -38.38070484995842
    WOLFE (weak): th(556.9906600335335)=-38.38070484995842; dx=-6.94474694698429E-7 evalInputDelta=4.424154758453369E-4
    New Minimum: -38.38070484995842 > -38.38292106986046
    WOLFE (weak): th(3341.9439602012008)=-38.38292106986046; dx=-6.9416827938568E-7 evalInputDelta=0.002658635377883911
    New Minimum: -38.38292106986046 > -38.39884811639786
    WOLFE (weak): th(23393.607721408407)=-38.39884811639786; dx=-6.922983560264342E-7 evalInputDelta=0.018585681915283203
    New Minimum: -38.39884811639786 > -38.52697080373764
    WOLFE (weak): th(187148.86177126726)=-38.52697080373764; dx=-6.722993316396237E-7 evalInputDelta=0.14670836925506592
    New Minimum: -38.52697080373764 > -39.49361303448677
    END: th(1684339.7559414054)=-39.49361303448677; dx=-4.563154987117496E-7 evalInputDelta=1.1133506000041962
    Fitness changed from -38.380262434482574 to -39.49361303448677
    Iteration 2 complete. Error: -39.49361303448677 Total: 139.3909; Orientation: 0.0764; Line Search: 125.8504
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/ce91ab7d-5e1b-4416-a7e8-05a06eedd13b.jpg)

    Adding measurement 16936bfe to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-39.49361303448677;dx=-4.958995995570992E-7
    New Minimum: -39.49361303448677 > -40.91994360089302
    END: th(3628800.0000000005)=-40.91994360089302; dx=-2.590558970752798E-7 evalInputDelta=1.42633056640625
    Fitness changed from -39.49361303448677 to -40.91994360089302
    Iteration 3 complete. Error: -40.91994360089302 Total: 38.0754; Orientation: 0.0746; Line Search: 24.7574
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/93db5eb3-3db6-4082-827d-7b2b5a68fa44.jpg)

    Adding measurement 35e066de to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.239e+03, gradient 5.734e-04, dot -0.672; [1f355ea7-27ae-40c9-84b5-3200f9b6e63c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -40.91994360089302, -39.49361303448677, -38.380262434482574, -38.380260437726974
    LBFGS Accumulation History: 3 points
    Removed measurement 35e066de to history. Total: 3
    th(0)=-40.91994360089302;dx=-3.287426148675026E-7
    New Minimum: -40.91994360089302 > -42.60943081974983
    END: th(7818012.603187701)=-42.60943081974983; dx=-1.2033654882443228E-7 evalInputDelta=1.6894872188568115
    Fitness changed from -40.91994360089302 to -42.60943081974983
    Iteration 4 complete. Error: -42.60943081974983 Total: 40.3923; Orientation: 1.6279; Line Search: 25.2193
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/beacbd58-5b20-42fb-a898-b7120daaae04.jpg)

    Adding measurement 4be641c1 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.400e+03, gradient 5.449e-04, dot -0.484; [1f355ea7-27ae-40c9-84b5-3200f9b6e63c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -42.60943081974983, -39.49361303448677, -38.380262434482574, -38.380260437726974
    LBFGS Accumulation History: 3 points
    Removed measurement 4be641c1 to history. Total: 3
    th(0)=-42.60943081974983;dx=-2.968276523982885E-7
    New Minimum: -42.60943081974983 > -43.930353194475174
    END: th(1.6843397559414055E7)=-43.930353194475174; dx=-3.447056235883357E-9 evalInputDelta=1.3209223747253418
    Fitness changed from -42.60943081974983 to -43.930353194475174
    Iteration 5 complete. Error: -43.930353194475174 Total: 41.4386; Orientation: 1.5614; Line Search: 25.6389
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/fb22de52-2f63-4a45-a030-b56a90ee84d6.jpg)

    Adding measurement 517d4333 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.365e+03, gradient 6.265e-04, dot -0.200; [1f355ea7-27ae-40c9-84b5-3200f9b6e63c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -43.930353194475174, -39.49361303448677, -38.380262434482574, -38.380260437726974
    LBFGS Accumulation History: 3 points
    Removed measurement 517d4333 to history. Total: 3
    th(0)=-43.930353194475174;dx=-3.923966318808471E-7
    Armijo: th(3.628800000000001E7)=-43.16222167015076; dx=6.552138654732118E-8 evalInputDelta=-0.7681315243244171
    New Minimum: -43.930353194475174 > -44.8321168422699
    WOLF (strong): th(1.8144000000000004E7)=-44.8321168422699; dx=8.277352330196652E-8 evalInputDelta=0.9017636477947235
    New Minimum: -44.8321168422699 > -45.45633539557457
    END: th(6048000.000000001)=-45.45633539557457; dx=-7.203690756898854E-8 evalInputDelta=1.5259822010993958
    Fitness changed from -43.930353194475174 to -45.45633539557457
    Iteration 6 complete. Error: -45.45633539557457 Total: 66.3458; Orientation: 1.5928; Line Search: 51.3831
    Adding measurement 37285d8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.324e+03, gradient 4.239e-04, dot -0.405; [1f355ea7-27ae-40c9-84b5-3200f9b6e63c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -45.45633539557457, -39.49361303448677, -38.380262434482574, -38.380260437726974
    LBFGS Accumulation History: 3 points
    Removed measurement 37285d8 to history. Total: 3
    th(0)=-45.45633539557457;dx=-1.7969316653153812E-7
    New Minimum: -45.45633539557457 > -46.48597377538681
    WOLF (strong): th(1.3030021005312836E7)=-46.48597377538681; dx=4.870726881400924E-9 evalInputDelta=1.0296383798122406
    END: th(6515010.502656418)=-46.326380133628845; dx=-5.888720192357081E-8 evalInputDelta=0.8700447380542755
    Fitness changed from -45.45633539557457 to -46.48597377538681
    Iteration 7 complete. Error: -46.48597377538681 Total: 52.0419; Orientation: 1.5741; Line Search: 38.1844
    Adding measurement e77b135 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.453e+03, gradient 4.560e-04, dot -0.323; [1f355ea7-27ae-40c9-84b5-3200f9b6e63c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -46.48597377538681, -39.49361303448677, -38.380262434482574, -38.380260437726974
    LBFGS Accumulation History: 3 points
    Removed measurement e77b135 to history. Total: 3
    th(0)=-46.48597377538681;dx=-2.078781105240404E-7
    New Minimum: -46.48597377538681 > -47.27907007932663
    WOLF (strong): th(1.4036164632845048E7)=-47.27907007932663; dx=5.142525143336618E-8 evalInputDelta=0.7930963039398193
    New Minimum: -47.27907007932663 > -47.40934956073761
    END: th(7018082.316422524)=-47.40934956073761; dx=-3.4144714752326776E-8 evalInputDelta=0.9233757853507996
    Fitness changed from -46.48597377538681 to -47.40934956073761
    Iteration 8 complete. Error: -47.40934956073761 Total: 52.5298; Orientation: 1.6549; Line Search: 38.1259
    Adding measurement 7df79dd to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.322e+03, gradient 3.060e-04, dot -0.532; [1f355ea7-27ae-40c9-84b5-3200f9b6e63c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -47.40934956073761, -39.49361303448677, -38.380262434482574, -38.380260437726974
    LBFGS Accumulation History: 3 points
    Removed measurement 7df79dd to history. Total: 3
    th(0)=-47.40934956073761;dx=-9.360308098933395E-8
    New Minimum: -47.40934956073761 > -48.144991993904114
    END: th(1.5120000000000006E7)=-48.144991993904114; dx=-6.2943534998786155E-9 evalInputDelta=0.7356424331665039
    Fitness changed from -47.40934956073761 to -48.144991993904114
    Iteration 9 complete. Error: -48.144991993904114 Total: 40.0198; Orientation: 1.5591; Line Search: 25.3310
    Adding measurement 1f48a412 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.233e+03, gradient 3.660e-04, dot -0.382; [1f355ea7-27ae-40c9-84b5-3200f9b6e63c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -48.144991993904114, -39.49361303448677, -38.380262434482574, -38.380260437726974
    LBFGS Accumulation History: 3 points
    Removed measurement 1f48a412 to history. Total: 3
    th(0)=-48.144991993904114;dx=-1.339470096071421E-7
    Armijo: th(3.2575052513282094E7)=-47.73113411664963; dx=4.1279749051091796E-8 evalInputDelta=-0.4138578772544861
    New Minimum: -48.144991993904114 > -48.589761435985565
    WOLF (strong): th(1.6287526256641047E7)=-48.589761435985565; dx=3.9986193226471864E-8 evalInputDelta=0.4447694420814514
    New Minimum: -48.589761435985565 > -48.70840173959732
    END: th(5429175.418880349)=-48.70840173959732; dx=-4.833686388358854E-8 evalInputDelta=0.5634097456932068
    Fitness changed from -48.144991993904114 to -48.70840173959732
    Iteration 10 complete. Error: -48.70840173959732 Total: 65.6929; Orientation: 1.5932; Line Search: 51.2794
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/3b4482d8-6bf8-4b1f-824f-ae46d022f55f.jpg)

    Final threshold in iteration 11: -48.70840173959732 (> -Infinity) after 599.466s (< 5400.000s)

Returns

    -48.70840173959732