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 88.26 seconds (1.143 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: 308468144101900
Reset training subject: 308469884225000
Adding measurement 6b0ed28d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-140.99576141143217;dx=-2.5142642744840808E-5
New Minimum: -140.99576141143217 > -140.9958052033716
END: th(2.154434690031884)=-140.9958052033716; dx=-1.676000348225883E-5 evalInputDelta=4.3791939418724724E-5
Fitness changed from -140.99576141143217 to -140.9958052033716
Iteration 1 complete. Error: -140.9958052033716 Total: 8.2218; Orientation: 0.0637; Line Search: 3.2469
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/1c10b7f6-f6e8-431c-8ab8-d69714e45a16.jpg)
Adding measurement 155686c8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-140.9958052033716;dx=-1.6649487666676812E-5
New Minimum: -140.9958052033716 > -140.9958854885585
WOLFE (weak): th(4.641588833612779)=-140.9958854885585; dx=-1.6643235165555665E-5 evalInputDelta=8.028518692526632E-5
New Minimum: -140.9958854885585 > -140.99597307234663
WOLFE (weak): th(9.283177667225559)=-140.99597307234663; dx=-1.6628714530388535E-5 evalInputDelta=1.6786897504061926E-4
New Minimum: -140.99597307234663 > -140.99630880969715
WOLFE (weak): th(27.849533001676676)=-140.99630880969715; dx=-1.662618223512907E-5 evalInputDelta=5.036063255658974E-4
New Minimum: -140.99630880969715 > -140.9978561106324
WOLFE (weak): th(111.3981320067067)=-140.9978561106324; dx=-1.661308341433784E-5 evalInputDelta=0.002050907260809254
New Minimum: -140.9978561106324 > -141.00608863387063
WOLFE (weak): th(556.9906600335335)=-141.00608863387063; dx=-1.6609529735042652E-5 evalInputDelta=0.010283430499043789
New Minimum: -141.00608863387063 > -141.05753101837686
WOLFE (weak): th(3341.9439602012008)=-141.05753101837686; dx=-1.6585809323632367E-5 evalInputDelta=0.06172581500527485
New Minimum: -141.05753101837686 > -141.4271891909297
WOLFE (weak): th(23393.607721408407)=-141.4271891909297; dx=-1.653398317965806E-5 evalInputDelta=0.4313839875581209
New Minimum: -141.4271891909297 > -144.39247057397503
WOLFE (weak): th(187148.86177126726)=-144.39247057397503; dx=-1.602410338523008E-5 evalInputDelta=3.3966653706034435
New Minimum: -144.39247057397503 > -166.11658334341655
END: th(1684339.7559414054)=-166.11658334341655; dx=-9.85033465533741E-6 evalInputDelta=25.120778140044962
Fitness changed from -140.9958052033716 to -166.11658334341655
Iteration 2 complete. Error: -166.11658334341655 Total: 19.1791; Orientation: 0.0606; Line Search: 16.9143
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/8169c96e-cbfb-47ba-bcf2-20b3cac6df4d.jpg)
Adding measurement 4fce6f6a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-166.11658334341655;dx=-1.1549507944456492E-5
New Minimum: -166.11658334341655 > -195.34916493053726
END: th(3628800.0000000005)=-195.34916493053726; dx=-4.115084633606889E-6 evalInputDelta=29.232581587120706
Fitness changed from -166.11658334341655 to -195.34916493053726
Iteration 3 complete. Error: -195.34916493053726 Total: 5.8301; Orientation: 0.0650; Line Search: 3.4647
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/81533416-2363-41fe-983a-4e1500d7eea9.jpg)
Adding measurement da2d8a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.233e+04, gradient 3.044e-03, dot -0.413; [93f9888f-beb1-46c2-a20b-fc3131f980c5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -195.34916493053726, -166.11658334341655, -140.9958052033716, -140.99576141143217
LBFGS Accumulation History: 3 points
Removed measurement da2d8a1 to history. Total: 3
th(0)=-195.34916493053726;dx=-9.254533998861856E-6
New Minimum: -195.34916493053726 > -215.9968176820537
WOLF (strong): th(7818012.603187701)=-215.9968176820537; dx=5.12841878566371E-7 evalInputDelta=20.647652751516432
END: th(3909006.3015938504)=-215.16865715878754; dx=-1.6646857176469973E-6 evalInputDelta=19.819492228250283
Fitness changed from -195.34916493053726 to -215.9968176820537
Iteration 4 complete. Error: -215.9968176820537 Total: 8.3004; Orientation: 1.0903; Line Search: 4.7074
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/839941dd-87a2-4354-baf9-25d1834a7925.jpg)
Adding measurement 6a418561 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.408e+03, gradient 3.912e-03, dot -0.136; [93f9888f-beb1-46c2-a20b-fc3131f980c5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -215.9968176820537, -166.11658334341655, -140.9958052033716, -140.99576141143217
LBFGS Accumulation History: 3 points
Removed measurement 6a418561 to history. Total: 3
th(0)=-215.9968176820537;dx=-1.5282282747307884E-5
New Minimum: -215.9968176820537 > -220.38599233857866
WOLF (strong): th(8421698.779707028)=-220.38599233857866; dx=5.727257928509657E-6 evalInputDelta=4.389174656524972
New Minimum: -220.38599233857866 > -244.12745435346508
WOLF (strong): th(4210849.389853514)=-244.12745435346508; dx=1.8828347387494588E-6 evalInputDelta=28.130636671411395
END: th(1403616.4632845046)=-235.2221924454798; dx=-9.12296990447391E-6 evalInputDelta=19.225374763426117
Fitness changed from -215.9968176820537 to -244.12745435346508
Iteration 5 complete. Error: -244.12745435346508 Total: 9.5306; Orientation: 1.0546; Line Search: 6.4241
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/baa341c4-72b3-4ab0-8534-a5d58d6b231c.jpg)
Adding measurement 2964ff51 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.730e+04, gradient 3.249e-03, dot -0.226; [93f9888f-beb1-46c2-a20b-fc3131f980c5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -244.12745435346508, -166.11658334341655, -140.9958052033716, -140.99576141143217
LBFGS Accumulation History: 3 points
Removed measurement 2964ff51 to history. Total: 3
th(0)=-244.12745435346508;dx=-1.0528946089439824E-5
New Minimum: -244.12745435346508 > -262.6723094510178
END: th(3024000.0000000005)=-262.6723094510178; dx=-9.280921657792022E-7 evalInputDelta=18.5448550975527
Fitness changed from -244.12745435346508 to -262.6723094510178
Iteration 6 complete. Error: -262.6723094510178 Total: 6.2614; Orientation: 1.0258; Line Search: 3.1897
Adding measurement 7539a831 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.104e+04, gradient 2.432e-03, dot -0.408; [93f9888f-beb1-46c2-a20b-fc3131f980c5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -262.6723094510178, -166.11658334341655, -140.9958052033716, -140.99576141143217
LBFGS Accumulation History: 3 points
Removed measurement 7539a831 to history. Total: 3
th(0)=-262.6723094510178;dx=-5.8937796174577445E-6
New Minimum: -262.6723094510178 > -273.1918861633986
WOLF (strong): th(6515010.502656418)=-273.1918861633986; dx=1.195243592081899E-6 evalInputDelta=10.519576712380797
New Minimum: -273.1918861633986 > -274.5780152155903
END: th(3257505.251328209)=-274.5780152155903; dx=-1.232144647553931E-6 evalInputDelta=11.90570576457253
Fitness changed from -262.6723094510178 to -274.5780152155903
Iteration 7 complete. Error: -274.5780152155903 Total: 7.5693; Orientation: 1.0919; Line Search: 4.9159
Adding measurement 58fe5d5b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.416e+04, gradient 2.279e-03, dot -0.420; [93f9888f-beb1-46c2-a20b-fc3131f980c5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -274.5780152155903, -166.11658334341655, -140.9958052033716, -140.99576141143217
LBFGS Accumulation History: 3 points
Removed measurement 58fe5d5b to history. Total: 3
th(0)=-274.5780152155903;dx=-5.184535195410594E-6
New Minimum: -274.5780152155903 > -281.759432179103
WOLF (strong): th(7018082.316422524)=-281.759432179103; dx=1.219749942739791E-6 evalInputDelta=7.181416963512675
New Minimum: -281.759432179103 > -284.4549204297137
END: th(3509041.158211262)=-284.4549204297137; dx=-5.899780250575602E-7 evalInputDelta=9.876905214123383
Fitness changed from -274.5780152155903 to -284.4549204297137
Iteration 8 complete. Error: -284.4549204297137 Total: 7.9989; Orientation: 1.0479; Line Search: 5.3988
Adding measurement 3e34b63f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.596e+04, gradient 2.310e-03, dot -0.392; [93f9888f-beb1-46c2-a20b-fc3131f980c5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -284.4549204297137, -166.11658334341655, -140.9958052033716, -140.99576141143217
LBFGS Accumulation History: 3 points
Removed measurement 3e34b63f to history. Total: 3
th(0)=-284.4549204297137;dx=-5.3236072591480295E-6
New Minimum: -284.4549204297137 > -286.03152617672856
WOLF (strong): th(7560000.000000003)=-286.03152617672856; dx=2.149088782412645E-6 evalInputDelta=1.5766057470148667
New Minimum: -286.03152617672856 > -293.1289372513176
WOLF (strong): th(3780000.0000000014)=-293.1289372513176; dx=3.57788014161129E-7 evalInputDelta=8.674016821603914
END: th(1260000.0000000005)=-290.19428007576767; dx=-3.1547014261248577E-6 evalInputDelta=5.73935964605397
Fitness changed from -284.4549204297137 to -293.1289372513176
Iteration 9 complete. Error: -293.1289372513176 Total: 9.2604; Orientation: 1.0287; Line Search: 6.6543
Adding measurement 3d5f9639 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.497e+04, gradient 2.408e-03, dot -0.338; [93f9888f-beb1-46c2-a20b-fc3131f980c5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -293.1289372513176, -166.11658334341655, -140.9958052033716, -140.99576141143217
LBFGS Accumulation History: 3 points
Removed measurement 3d5f9639 to history. Total: 3
th(0)=-293.1289372513176;dx=-5.789800239623098E-6
New Minimum: -293.1289372513176 > -301.92212099001875
END: th(2714587.7094401745)=-301.92212099001875; dx=-4.0370101143338293E-7 evalInputDelta=8.793183738701146
Fitness changed from -293.1289372513176 to -301.92212099001875
Iteration 10 complete. Error: -301.92212099001875 Total: 5.8238; Orientation: 1.0287; Line Search: 3.2392
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/008f58e9-6e0a-4d3c-a5b8-39db6472e0a2.jpg)
Final threshold in iteration 11: -301.92212099001875 (> -Infinity) after 88.259s (< 5400.000s)

Returns

    -301.92212099001875