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 586.29 seconds (4.653 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: 5831362720344
Reset training subject: 5844573646674
Adding measurement 76e24957 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-38.2380550801754;dx=-1.110830578340804E-6
New Minimum: -38.2380550801754 > -38.238056778907776
END: th(2.154434690031884)=-38.238056778907776; dx=-6.906016475013045E-7 evalInputDelta=1.6987323760986328E-6
Fitness changed from -38.2380550801754 to -38.238056778907776
Iteration 1 complete. Error: -38.238056778907776 Total: 64.1100; Orientation: 0.0728; Line Search: 25.8868
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0a657e35-bf7d-422c-b0c6-a1a450894f57.jpg)

    Adding measurement 6570ca99 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-38.238056778907776;dx=-6.859467947509147E-7
    New Minimum: -38.238056778907776 > -38.2380608022213
    WOLFE (weak): th(4.641588833612779)=-38.2380608022213; dx=-6.852727676570327E-7 evalInputDelta=4.023313522338867E-6
    New Minimum: -38.2380608022213 > -38.23806491494179
    WOLFE (weak): th(9.283177667225559)=-38.23806491494179; dx=-6.848037287786544E-7 evalInputDelta=8.13603401184082E-6
    New Minimum: -38.23806491494179 > -38.23807933926582
    WOLFE (weak): th(27.849533001676676)=-38.23807933926582; dx=-6.840464402379838E-7 evalInputDelta=2.256035804748535E-5
    New Minimum: -38.23807933926582 > -38.238143771886826
    WOLFE (weak): th(111.3981320067067)=-38.238143771886826; dx=-6.834467363120771E-7 evalInputDelta=8.699297904968262E-5
    New Minimum: -38.238143771886826 > -38.23848482966423
    WOLFE (weak): th(556.9906600335335)=-38.23848482966423; dx=-6.832711218471535E-7 evalInputDelta=4.280507564544678E-4
    New Minimum: -38.23848482966423 > -38.24062821269035
    WOLFE (weak): th(3341.9439602012008)=-38.24062821269035; dx=-6.829540857409919E-7 evalInputDelta=0.0025714337825775146
    New Minimum: -38.24062821269035 > -38.25602862238884
    WOLFE (weak): th(23393.607721408407)=-38.25602862238884; dx=-6.811492343236055E-7 evalInputDelta=0.017971843481063843
    New Minimum: -38.25602862238884 > -38.37999126315117
    WOLFE (weak): th(187148.86177126726)=-38.37999126315117; dx=-6.636299840644396E-7 evalInputDelta=0.14193448424339294
    New Minimum: -38.37999126315117 > -39.32912105321884
    END: th(1684339.7559414054)=-39.32912105321884; dx=-4.5960524713887803E-7 evalInputDelta=1.0910642743110657
    Fitness changed from -38.238056778907776 to -39.32912105321884
    Iteration 2 complete. Error: -39.32912105321884 Total: 139.3468; Orientation: 0.0734; Line Search: 125.8182
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/0910979d-6e33-42f3-b5d0-c5161a6ec3ab.jpg)

    Adding measurement 74f6aa9f to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-39.32912105321884;dx=-4.908508305392709E-7
    New Minimum: -39.32912105321884 > -40.79003244638443
    END: th(3628800.0000000005)=-40.79003244638443; dx=-2.7736313553379887E-7 evalInputDelta=1.4609113931655884
    Fitness changed from -39.32912105321884 to -40.79003244638443
    Iteration 3 complete. Error: -40.79003244638443 Total: 38.5687; Orientation: 0.0741; Line Search: 25.4737
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/e393237d-a65d-4015-bc09-393b27834975.jpg)

    Adding measurement 20925ec7 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.181e+03, gradient 5.712e-04, dot -0.714; [6d3a7637-d1c1-4661-a444-4ce1f560b16c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -40.79003244638443, -39.32912105321884, -38.238056778907776, -38.2380550801754
    LBFGS Accumulation History: 3 points
    Removed measurement 20925ec7 to history. Total: 3
    th(0)=-40.79003244638443;dx=-3.2624536411469527E-7
    New Minimum: -40.79003244638443 > -42.59480941295624
    END: th(7818012.603187701)=-42.59480941295624; dx=-1.3267385855440133E-7 evalInputDelta=1.8047769665718079
    Fitness changed from -40.79003244638443 to -42.59480941295624
    Iteration 4 complete. Error: -42.59480941295624 Total: 39.9517; Orientation: 1.6525; Line Search: 24.6311
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/db5ae46b-3f22-4187-b6db-bd8021ecc60d.jpg)

    Adding measurement 72eb6092 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.962e+03, gradient 5.298e-04, dot -0.514; [6d3a7637-d1c1-4661-a444-4ce1f560b16c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -42.59480941295624, -39.32912105321884, -38.238056778907776, -38.2380550801754
    LBFGS Accumulation History: 3 points
    Removed measurement 72eb6092 to history. Total: 3
    th(0)=-42.59480941295624;dx=-2.806875129904722E-7
    New Minimum: -42.59480941295624 > -44.05582857131958
    END: th(1.6843397559414055E7)=-44.05582857131958; dx=-1.6365499969489455E-8 evalInputDelta=1.4610191583633423
    Fitness changed from -42.59480941295624 to -44.05582857131958
    Iteration 5 complete. Error: -44.05582857131958 Total: 40.3970; Orientation: 1.5819; Line Search: 25.2123
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/5a2512c4-773e-4563-bda2-b11b54c83c4b.jpg)

    Adding measurement 63a68521 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.256e+03, gradient 5.998e-04, dot -0.234; [6d3a7637-d1c1-4661-a444-4ce1f560b16c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -44.05582857131958, -39.32912105321884, -38.238056778907776, -38.2380550801754
    LBFGS Accumulation History: 3 points
    Removed measurement 63a68521 to history. Total: 3
    th(0)=-44.05582857131958;dx=-3.5970750488405764E-7
    Armijo: th(3.628800000000001E7)=-43.55370271205902; dx=7.110991819682031E-8 evalInputDelta=-0.5021258592605591
    New Minimum: -44.05582857131958 > -45.195563197135925
    WOLF (strong): th(1.8144000000000004E7)=-45.195563197135925; dx=6.707071833392648E-8 evalInputDelta=1.1397346258163452
    New Minimum: -45.195563197135925 > -45.44542008638382
    END: th(6048000.000000001)=-45.44542008638382; dx=-7.779781223464507E-8 evalInputDelta=1.3895915150642395
    Fitness changed from -44.05582857131958 to -45.44542008638382
    Iteration 6 complete. Error: -45.44542008638382 Total: 66.3266; Orientation: 1.5556; Line Search: 51.5311
    Adding measurement 6258fb7b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.734e+03, gradient 4.071e-04, dot -0.429; [6d3a7637-d1c1-4661-a444-4ce1f560b16c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -45.44542008638382, -39.32912105321884, -38.238056778907776, -38.2380550801754
    LBFGS Accumulation History: 3 points
    Removed measurement 6258fb7b to history. Total: 3
    th(0)=-45.44542008638382;dx=-1.6573147421773714E-7
    New Minimum: -45.44542008638382 > -46.555110812187195
    END: th(1.3030021005312836E7)=-46.555110812187195; dx=-1.1706551102516662E-8 evalInputDelta=1.1096907258033752
    Fitness changed from -45.44542008638382 to -46.555110812187195
    Iteration 7 complete. Error: -46.555110812187195 Total: 39.8320; Orientation: 1.5586; Line Search: 25.3833
    Adding measurement 16d07fef to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.203e+03, gradient 4.153e-04, dot -0.375; [6d3a7637-d1c1-4661-a444-4ce1f560b16c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -46.555110812187195, -39.32912105321884, -38.238056778907776, -38.2380550801754
    LBFGS Accumulation History: 3 points
    Removed measurement 16d07fef to history. Total: 3
    th(0)=-46.555110812187195;dx=-1.724671589476852E-7
    Armijo: th(2.8072329265690096E7)=-46.54784208536148; dx=5.258973573401984E-8 evalInputDelta=-0.007268726825714111
    New Minimum: -46.555110812187195 > -47.34595787525177
    WOLF (strong): th(1.4036164632845048E7)=-47.34595787525177; dx=2.9576283609106753E-8 evalInputDelta=0.7908470630645752
    END: th(4678721.544281683)=-47.21236276626587; dx=-7.745928110200736E-8 evalInputDelta=0.6572519540786743
    Fitness changed from -46.555110812187195 to -47.34595787525177
    Iteration 8 complete. Error: -47.34595787525177 Total: 64.7786; Orientation: 1.5551; Line Search: 50.5920
    Adding measurement 1bb9cdf3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.894e+03, gradient 4.064e-04, dot -0.322; [6d3a7637-d1c1-4661-a444-4ce1f560b16c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -47.34595787525177, -39.32912105321884, -38.238056778907776, -38.2380550801754
    LBFGS Accumulation History: 3 points
    Removed measurement 1bb9cdf3 to history. Total: 3
    th(0)=-47.34595787525177;dx=-1.6509265678527816E-7
    New Minimum: -47.34595787525177 > -48.273979127407074
    END: th(1.0080000000000004E7)=-48.273979127407074; dx=-8.865603566861329E-9 evalInputDelta=0.928021252155304
    Fitness changed from -47.34595787525177 to -48.273979127407074
    Iteration 9 complete. Error: -48.273979127407074 Total: 39.0672; Orientation: 1.5481; Line Search: 24.9681
    Adding measurement 5e24ef5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.578e+03, gradient 2.801e-04, dot -0.498; [6d3a7637-d1c1-4661-a444-4ce1f560b16c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -48.273979127407074, -39.32912105321884, -38.238056778907776, -38.2380550801754
    LBFGS Accumulation History: 3 points
    Removed measurement 5e24ef5 to history. Total: 3
    th(0)=-48.273979127407074;dx=-7.845090013518453E-8
    New Minimum: -48.273979127407074 > -48.86597192287445
    WOLF (strong): th(2.1716701675521396E7)=-48.86597192287445; dx=1.27282506967027E-8 evalInputDelta=0.5919927954673767
    END: th(1.0858350837760698E7)=-48.85827875137329; dx=-1.9658497303282985E-8 evalInputDelta=0.584299623966217
    Fitness changed from -48.273979127407074 to -48.86597192287445
    Iteration 10 complete. Error: -48.86597192287445 Total: 53.1830; Orientation: 1.5557; Line Search: 39.2239
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/f27dd99a-ca59-4328-adfe-33b87880526d.jpg)

    Final threshold in iteration 11: -48.86597192287445 (> -Infinity) after 586.289s (< 5400.000s)

Returns

    -48.86597192287445