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 206.05 seconds (2.173 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: 7431886418682
Reset training subject: 7436755640385
Adding measurement 59e0ed9f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.5708063840866089;dx=-5.698910107218834E-7
New Minimum: -0.5708063840866089 > -0.5708068311214447
WOLFE (weak): th(2.154434690031884)=-0.5708068311214447; dx=-5.395514488205122E-7 evalInputDelta=4.470348358154297E-7
New Minimum: -0.5708068311214447 > -0.5708072334527969
WOLFE (weak): th(4.308869380063768)=-0.5708072334527969; dx=-5.395496701787855E-7 evalInputDelta=8.493661880493164E-7
New Minimum: -0.5708072334527969 > -0.5708098113536835
WOLFE (weak): th(12.926608140191302)=-0.5708098113536835; dx=-5.39545838246052E-7 evalInputDelta=3.427267074584961E-6
New Minimum: -0.5708098113536835 > -0.5708203017711639
WOLFE (weak): th(51.70643256076521)=-0.5708203017711639; dx=-5.395260141184275E-7 evalInputDelta=1.3917684555053711E-5
New Minimum: -0.5708203017711639 > -0.5708760768175125
WOLFE (weak): th(258.53216280382605)=-0.5708760768175125; dx=-5.395121691847404E-7 evalInputDelta=6.969273090362549E-5
New Minimum: -0.5708760768175125 > -0.5712248086929321
WOLFE (weak): th(1551.1929768229563)=-0.5712248086929321; dx=-5.393923832379509E-7 evalInputDelta=4.184246063232422E-4
New Minimum: -0.5712248086929321 > -0.5737318396568298
WOLFE (weak): th(10858.350837760694)=-0.5737318396568298; dx=-5.380914968496737E-7 evalInputDelta=0.0029254555702209473
New Minimum: -0.5737318396568298 > -0.5940009653568268
WOLFE (weak): th(86866.80670208555)=-0.5940009653568268; dx=-5.284170598135904E-7 evalInputDelta=0.023194581270217896
New Minimum: -0.5940009653568268 > -0.75957190990448
END: th(781801.26031877)=-0.75957190990448; dx=-4.236441765682275E-7 evalInputDelta=0.1887655258178711
Fitness changed from -0.5708063840866089 to -0.75957190990448
Iteration 1 complete. Error: -0.75957190990448 Total: 55.8052; Orientation: 0.0467; Line Search: 42.9262
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/778c0b28-6298-4588-8d4b-6cca8a1c7119.jpg)

    Adding measurement 12cd16f2 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.75957190990448;dx=-3.7706267591095924E-7
    New Minimum: -0.75957190990448 > -1.0227155238389969
    END: th(1684339.7559414052)=-1.0227155238389969; dx=-2.5236066547436015E-7 evalInputDelta=0.2631436139345169
    Fitness changed from -0.75957190990448 to -1.0227155238389969
    Iteration 2 complete. Error: -1.0227155238389969 Total: 12.7334; Orientation: 0.0449; Line Search: 8.5394
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/f168f642-10d0-4303-a3bd-2c897330d600.jpg)

    Adding measurement 10aa5b52 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-1.0227155238389969;dx=-2.2149061677375053E-7
    New Minimum: -1.0227155238389969 > -1.3258506059646606
    END: th(3628800.0)=-1.3258506059646606; dx=-1.2181135983651043E-7 evalInputDelta=0.30313508212566376
    Fitness changed from -1.0227155238389969 to -1.3258506059646606
    Iteration 3 complete. Error: -1.3258506059646606 Total: 13.3648; Orientation: 0.0545; Line Search: 8.9377
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/164b2702-5c30-4e2c-984c-0e25f72b3821.jpg)

    Adding measurement 41365555 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.967e+03, gradient 3.459e-04, dot -0.845; [066e56a0-58e4-418c-88c9-ecf0943615c5 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.3258506059646606, -1.0227155238389969, -0.75957190990448, -0.5708063840866089
    LBFGS Accumulation History: 3 points
    Removed measurement 41365555 to history. Total: 3
    th(0)=-1.3258506059646606;dx=-1.1963478116844547E-7
    New Minimum: -1.3258506059646606 > -1.6190321892499924
    END: th(7818012.6031877)=-1.6190321892499924; dx=-4.449646918862992E-8 evalInputDelta=0.2931815832853317
    Fitness changed from -1.3258506059646606 to -1.6190321892499924
    Iteration 4 complete. Error: -1.6190321892499924 Total: 14.1004; Orientation: 1.0486; Line Search: 8.7373
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/956b1f24-4970-47eb-b8a2-13c457460544.jpg)

    Adding measurement 15b9d377 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.290e+03, gradient 2.727e-04, dot -0.658; [066e56a0-58e4-418c-88c9-ecf0943615c5 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6190321892499924, -1.0227155238389969, -0.75957190990448, -0.5708063840866089
    LBFGS Accumulation History: 3 points
    Removed measurement 15b9d377 to history. Total: 3
    th(0)=-1.6190321892499924;dx=-7.435790982164602E-8
    New Minimum: -1.6190321892499924 > -1.8233114033937454
    END: th(1.684339755941405E7)=-1.8233114033937454; dx=-1.258529356500293E-9 evalInputDelta=0.20427921414375305
    Fitness changed from -1.6190321892499924 to -1.8233114033937454
    Iteration 5 complete. Error: -1.8233114033937454 Total: 14.4568; Orientation: 1.0405; Line Search: 9.0146
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/fd4b76ad-4247-493c-bb19-57aa226679fb.jpg)

    Adding measurement 71240e7a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.582e+03, gradient 2.783e-04, dot -0.415; [066e56a0-58e4-418c-88c9-ecf0943615c5 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.8233114033937454, -1.0227155238389969, -0.75957190990448, -0.5708063840866089
    LBFGS Accumulation History: 3 points
    Removed measurement 71240e7a to history. Total: 3
    th(0)=-1.8233114033937454;dx=-7.746803869092186E-8
    Armijo: th(3.6288E7)=-1.662738025188446; dx=3.285011273881021E-8 evalInputDelta=-0.16057337820529938
    New Minimum: -1.8233114033937454 > -1.9279118329286575
    WOLF (strong): th(1.8144E7)=-1.9279118329286575; dx=2.1841738085002232E-8 evalInputDelta=0.10460042953491211
    New Minimum: -1.9279118329286575 > -1.9615658223628998
    END: th(6048000.0)=-1.9615658223628998; dx=-1.9894792285350643E-8 evalInputDelta=0.13825441896915436
    Fitness changed from -1.8233114033937454 to -1.9615658223628998
    Iteration 6 complete. Error: -1.9615658223628998 Total: 22.7495; Orientation: 1.0150; Line Search: 17.2854
    Adding measurement 55620998 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.975e+03, gradient 1.775e-04, dot -0.511; [066e56a0-58e4-418c-88c9-ecf0943615c5 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.9615658223628998, -1.0227155238389969, -0.75957190990448, -0.5708063840866089
    LBFGS Accumulation History: 3 points
    Removed measurement 55620998 to history. Total: 3
    th(0)=-1.9615658223628998;dx=-3.151460611633137E-8
    New Minimum: -1.9615658223628998 > -2.074140541255474
    END: th(1.3030021005312834E7)=-2.074140541255474; dx=-4.8473357058964724E-9 evalInputDelta=0.11257471889257431
    Fitness changed from -1.9615658223628998 to -2.074140541255474
    Iteration 7 complete. Error: -2.074140541255474 Total: 13.9969; Orientation: 1.0054; Line Search: 8.9039
    Adding measurement 5efc7927 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.048e+03, gradient 1.817e-04, dot -0.446; [066e56a0-58e4-418c-88c9-ecf0943615c5 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.074140541255474, -1.0227155238389969, -0.75957190990448, -0.5708063840866089
    LBFGS Accumulation History: 3 points
    Removed measurement 5efc7927 to history. Total: 3
    th(0)=-2.074140541255474;dx=-3.302546160501122E-8
    Armijo: th(2.8072329265690092E7)=-2.0651646181941032; dx=1.2152466807817706E-8 evalInputDelta=-0.00897592306137085
    New Minimum: -2.074140541255474 > -2.1327980756759644
    WOLF (strong): th(1.4036164632845046E7)=-2.1327980756759644; dx=5.592222876572315E-9 evalInputDelta=0.058657534420490265
    END: th(4678721.544281682)=-2.1255049780011177; dx=-1.2247372863265826E-8 evalInputDelta=0.051364436745643616
    Fitness changed from -2.074140541255474 to -2.1327980756759644
    Iteration 8 complete. Error: -2.1327980756759644 Total: 22.3262; Orientation: 1.0741; Line Search: 17.1354
    Adding measurement 1c96b1a8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.927e+03, gradient 1.909e-04, dot -0.386; [066e56a0-58e4-418c-88c9-ecf0943615c5 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.1327980756759644, -1.0227155238389969, -0.75957190990448, -0.5708063840866089
    LBFGS Accumulation History: 3 points
    Removed measurement 1c96b1a8 to history. Total: 3
    th(0)=-2.1327980756759644;dx=-3.6444848836796194E-8
    New Minimum: -2.1327980756759644 > -2.212209992110729
    WOLF (strong): th(1.0080000000000002E7)=-2.212209992110729; dx=2.619050151315629E-9 evalInputDelta=0.07941191643476486
    END: th(5040000.000000001)=-2.1973088681697845; dx=-1.5006395832470736E-8 evalInputDelta=0.06451079249382019
    Fitness changed from -2.1327980756759644 to -2.212209992110729
    Iteration 9 complete. Error: -2.212209992110729 Total: 18.5006; Orientation: 1.5481; Line Search: 12.7553
    Adding measurement 4badfd6c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.185e+03, gradient 1.500e-04, dot -0.427; [066e56a0-58e4-418c-88c9-ecf0943615c5 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.212209992110729, -1.0227155238389969, -0.75957190990448, -0.5708063840866089
    LBFGS Accumulation History: 3 points
    Removed measurement 4badfd6c to history. Total: 3
    th(0)=-2.212209992110729;dx=-2.2497525014170462E-8
    New Minimum: -2.212209992110729 > -2.261200502514839
    WOLF (strong): th(1.0858350837760696E7)=-2.261200502514839; dx=1.3449428345818946E-9 evalInputDelta=0.048990510404109955
    END: th(5429175.418880348)=-2.252532407641411; dx=-8.094618848354155E-9 evalInputDelta=0.04032241553068161
    Fitness changed from -2.212209992110729 to -2.261200502514839
    Iteration 10 complete. Error: -2.261200502514839 Total: 17.9397; Orientation: 1.0598; Line Search: 12.3960
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/76f32e55-f075-456f-8e11-468a0f35023b.jpg)

    Final threshold in iteration 11: -2.261200502514839 (> -Infinity) after 206.045s (< 5400.000s)

Returns

    -2.261200502514839