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:88 executed in 236.74 seconds (2.553 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: 5099479381642
Reset training subject: 5103974606624
Adding measurement 72d90d1c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=8.753742292523384;dx=-3.955544573530447E-7
New Minimum: 8.753742292523384 > 8.753738582134247
WOLFE (weak): th(2.154434690031884)=8.753738582134247; dx=-3.948293198509888E-7 evalInputDelta=3.7103891372680664E-6
New Minimum: 8.753738582134247 > 8.75373524427414
WOLFE (weak): th(4.308869380063768)=8.75373524427414; dx=-3.951559393261688E-7 evalInputDelta=7.048249244689941E-6
New Minimum: 8.75373524427414 > 8.753720119595528
WOLFE (weak): th(12.926608140191302)=8.753720119595528; dx=-3.9461737973388877E-7 evalInputDelta=2.2172927856445312E-5
New Minimum: 8.753720119595528 > 8.753654792904854
WOLFE (weak): th(51.70643256076521)=8.753654792904854; dx=-3.944524274597928E-7 evalInputDelta=8.749961853027344E-5
New Minimum: 8.753654792904854 > 8.753303349018097
WOLFE (weak): th(258.53216280382605)=8.753303349018097; dx=-3.918739713691675E-7 evalInputDelta=4.389435052871704E-4
New Minimum: 8.753303349018097 > 8.751108467578888
WOLFE (weak): th(1551.1929768229563)=8.751108467578888; dx=-3.9526815581040274E-7 evalInputDelta=0.002633824944496155
New Minimum: 8.751108467578888 > 8.735311806201935
WOLFE (weak): th(10858.350837760694)=8.735311806201935; dx=-3.9277840711719177E-7 evalInputDelta=0.01843048632144928
New Minimum: 8.735311806201935 > 8.60688978433609
WOLFE (weak): th(86866.80670208555)=8.60688978433609; dx=-3.8406775457805803E-7 evalInputDelta=0.146852508187294
New Minimum: 8.60688978433609 > 7.575455576181412
END: th(781801.26031877)=7.575455576181412; dx=-2.904216900571541E-7 evalInputDelta=1.1782867163419724
Fitness changed from 8.753742292523384 to 7.575455576181412
Iteration 1 complete. Error: 7.575455576181412 Total: 65.3399; Orientation: 0.0092; Line Search: 50.5105
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a0609289-dac5-4548-91ee-bf27407c55db.jpg)

    Adding measurement 6892cffc to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=7.575455576181412;dx=-2.7887764408198527E-7
    New Minimum: 7.575455576181412 > 6.0514127016067505
    END: th(1684339.7559414052)=6.0514127016067505; dx=-1.5883244246598725E-7 evalInputDelta=1.5240428745746613
    Fitness changed from 7.575455576181412 to 6.0514127016067505
    Iteration 2 complete. Error: 6.0514127016067505 Total: 15.5444; Orientation: 0.0093; Line Search: 10.5537
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/ad507dc6-91cd-493b-a90a-a35f3b56621a.jpg)

    Adding measurement b1cc747 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=6.0514127016067505;dx=-1.6803069089176176E-7
    New Minimum: 6.0514127016067505 > 4.509202390909195
    END: th(3628800.0)=4.509202390909195; dx=-7.925212193346452E-8 evalInputDelta=1.5422103106975555
    Fitness changed from 6.0514127016067505 to 4.509202390909195
    Iteration 3 complete. Error: 4.509202390909195 Total: 15.8732; Orientation: 0.0096; Line Search: 10.9001
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/fe4b6138-33eb-4815-8011-5179d7450232.jpg)

    Adding measurement 4da4fafe to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.479e+03, gradient 3.397e-04, dot -0.679; [8d75926f-6980-40b3-82be-4ad68b71847f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 4.509202390909195, 6.0514127016067505, 7.575455576181412, 8.753742292523384
    LBFGS Accumulation History: 3 points
    Removed measurement 4da4fafe to history. Total: 3
    th(0)=4.509202390909195;dx=-1.1408114884802136E-7
    New Minimum: 4.509202390909195 > 3.052197217941284
    END: th(7818012.6031877)=3.052197217941284; dx=-3.024170855918737E-8 evalInputDelta=1.4570051729679108
    Fitness changed from 4.509202390909195 to 3.052197217941284
    Iteration 4 complete. Error: 3.052197217941284 Total: 15.7785; Orientation: 0.2176; Line Search: 10.4990
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/e6e72b7c-23b8-4dfc-9f8a-8b3e006f6527.jpg)

    Adding measurement 4c7b1e5c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.046e+03, gradient 3.069e-04, dot -0.486; [8d75926f-6980-40b3-82be-4ad68b71847f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.052197217941284, 6.0514127016067505, 7.575455576181412, 8.753742292523384
    LBFGS Accumulation History: 3 points
    Removed measurement 4c7b1e5c to history. Total: 3
    th(0)=3.052197217941284;dx=-9.320212164296919E-8
    New Minimum: 3.052197217941284 > 2.37273171544075
    WOLF (strong): th(1.684339755941405E7)=2.37273171544075; dx=2.1270526434945314E-9 evalInputDelta=0.6794655025005341
    New Minimum: 2.37273171544075 > 2.0593131482601166
    END: th(8421698.779707026)=2.0593131482601166; dx=-1.1336311466016709E-8 evalInputDelta=0.9928840696811676
    Fitness changed from 3.052197217941284 to 2.0593131482601166
    Iteration 5 complete. Error: 2.0593131482601166 Total: 19.9810; Orientation: 0.2181; Line Search: 14.4771
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/fbcc95ad-91d0-420c-884a-d90f6778a4d3.jpg)

    Adding measurement 69838014 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.940e+03, gradient 2.559e-04, dot -0.440; [8d75926f-6980-40b3-82be-4ad68b71847f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.0593131482601166, 6.0514127016067505, 7.575455576181412, 8.753742292523384
    LBFGS Accumulation History: 3 points
    Removed measurement 69838014 to history. Total: 3
    th(0)=2.0593131482601166;dx=-6.493153635535966E-8
    New Minimum: 2.0593131482601166 > 1.5898796021938324
    WOLF (strong): th(1.8144E7)=1.5898796021938324; dx=4.631244174227516E-9 evalInputDelta=0.4694335460662842
    New Minimum: 1.5898796021938324 > 1.2842077016830444
    END: th(9072000.0)=1.2842077016830444; dx=-7.822151232589666E-9 evalInputDelta=0.7751054465770721
    Fitness changed from 2.0593131482601166 to 1.2842077016830444
    Iteration 6 complete. Error: 1.2842077016830444 Total: 20.7119; Orientation: 0.2184; Line Search: 15.4846
    Adding measurement 7659638a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.786e+03, gradient 2.158e-04, dot -0.419; [8d75926f-6980-40b3-82be-4ad68b71847f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.2842077016830444, 6.0514127016067505, 7.575455576181412, 8.753742292523384
    LBFGS Accumulation History: 3 points
    Removed measurement 7659638a to history. Total: 3
    th(0)=1.2842077016830444;dx=-4.6000558285749954E-8
    New Minimum: 1.2842077016830444 > 1.1274302750825882
    WOLF (strong): th(1.954503150796925E7)=1.1274302750825882; dx=5.684426601216011E-9 evalInputDelta=0.15677742660045624
    New Minimum: 1.1274302750825882 > 0.7662549018859863
    END: th(9772515.753984625)=0.7662549018859863; dx=-6.636605695002268E-9 evalInputDelta=0.5179527997970581
    Fitness changed from 1.2842077016830444 to 0.7662549018859863
    Iteration 7 complete. Error: 0.7662549018859863 Total: 21.5488; Orientation: 0.2171; Line Search: 16.2355
    Adding measurement 6c21ad39 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.164e+03, gradient 2.021e-04, dot -0.419; [8d75926f-6980-40b3-82be-4ad68b71847f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.7662549018859863, 6.0514127016067505, 7.575455576181412, 8.753742292523384
    LBFGS Accumulation History: 3 points
    Removed measurement 6c21ad39 to history. Total: 3
    th(0)=0.7662549018859863;dx=-4.007167453361802E-8
    Armijo: th(2.1054246949267566E7)=0.8781454861164093; dx=6.729571313197219E-9 evalInputDelta=-0.11189058423042297
    New Minimum: 0.7662549018859863 > 0.39300796389579773
    WOLF (strong): th(1.0527123474633783E7)=0.39300796389579773; dx=2.1290115963188887E-11 evalInputDelta=0.3732469379901886
    END: th(3509041.158211261)=0.4771772176027298; dx=-2.2524727262249296E-8 evalInputDelta=0.28907768428325653
    Fitness changed from 0.7662549018859863 to 0.39300796389579773
    Iteration 8 complete. Error: 0.39300796389579773 Total: 25.0575; Orientation: 0.2477; Line Search: 19.9464
    Adding measurement 692b18df to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.862e+03, gradient 2.008e-04, dot -0.353; [8d75926f-6980-40b3-82be-4ad68b71847f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.39300796389579773, 6.0514127016067505, 7.575455576181412, 8.753742292523384
    LBFGS Accumulation History: 3 points
    Removed measurement 692b18df to history. Total: 3
    th(0)=0.39300796389579773;dx=-3.980405031677383E-8
    New Minimum: 0.39300796389579773 > 0.07037600874900818
    END: th(7560000.000000001)=0.07037600874900818; dx=-5.2692493524467605E-9 evalInputDelta=0.32263195514678955
    Fitness changed from 0.39300796389579773 to 0.07037600874900818
    Iteration 9 complete. Error: 0.07037600874900818 Total: 16.1313; Orientation: 0.2183; Line Search: 10.6618
    Adding measurement 3f5a238e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.240e+03, gradient 1.685e-04, dot -0.407; [8d75926f-6980-40b3-82be-4ad68b71847f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.07037600874900818, 6.0514127016067505, 7.575455576181412, 8.753742292523384
    LBFGS Accumulation History: 3 points
    Removed measurement 3f5a238e to history. Total: 3
    th(0)=0.07037600874900818;dx=-2.8019350625106636E-8
    Armijo: th(1.6287526256641043E7)=0.21595841646194458; dx=5.327927587481393E-9 evalInputDelta=-0.1455824077129364
    New Minimum: 0.07037600874900818 > -0.08902059495449066
    END: th(8143763.128320522)=-0.08902059495449066; dx=-1.2986712151667714E-9 evalInputDelta=0.15939660370349884
    Fitness changed from 0.07037600874900818 to -0.08902059495449066
    Iteration 10 complete. Error: -0.08902059495449066 Total: 20.6746; Orientation: 0.2164; Line Search: 15.5471
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/5428e391-d062-400e-8722-c6400c22d9d7.jpg)

    Final threshold in iteration 11: -0.08902059495449066 (> -Infinity) after 236.739s (< 1800.000s)

Returns

    -0.08902059495449066