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 134.57 seconds (1.684 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: 109978679342800
Reset training subject: 109981402342300
Adding measurement 93f8bcd to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-31.38526108246472;dx=-1.1270858266087385E-6
New Minimum: -31.38526108246472 > -31.38526242966738
END: th(2.154434690031884)=-31.38526242966738; dx=-8.027792024824888E-7 evalInputDelta=1.3472026623162492E-6
Fitness changed from -31.38526108246472 to -31.38526242966738
Iteration 1 complete. Error: -31.38526242966738 Total: 13.6654; Orientation: 0.0678; Line Search: 5.4973
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/030f4531-3058-49ca-a229-c468c108a30c.jpg)
Adding measurement 1d31d633 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-31.38526242966738;dx=-8.021316921350378E-7
New Minimum: -31.38526242966738 > -31.38526647127502
WOLFE (weak): th(4.641588833612779)=-31.38526647127502; dx=-8.019360360165246E-7 evalInputDelta=4.041607638782807E-6
New Minimum: -31.38526647127502 > -31.385270512882144
WOLFE (weak): th(9.283177667225559)=-31.385270512882144; dx=-8.01632559870659E-7 evalInputDelta=8.08321476242213E-6
New Minimum: -31.385270512882144 > -31.385288026506984
WOLFE (weak): th(27.849533001676676)=-31.385288026506984; dx=-8.011086474974395E-7 evalInputDelta=2.5596839602570753E-5
New Minimum: -31.385288026506984 > -31.385360775305553
WOLFE (weak): th(111.3981320067067)=-31.385360775305553; dx=-8.005517293885737E-7 evalInputDelta=9.834563817179287E-5
New Minimum: -31.385360775305553 > -31.38575011323179
WOLFE (weak): th(556.9906600335335)=-31.38575011323179; dx=-8.001118933431109E-7 evalInputDelta=4.876835644083144E-4
New Minimum: -31.38575011323179 > -31.38819380570323
WOLFE (weak): th(3341.9439602012008)=-31.38819380570323; dx=-8.000627515034184E-7 evalInputDelta=0.0029313760358498087
New Minimum: -31.38819380570323 > -31.405770930797026
WOLFE (weak): th(23393.607721408407)=-31.405770930797026; dx=-7.993633365578526E-7 evalInputDelta=0.020508501129643975
New Minimum: -31.405770930797026 > -31.548600657080883
WOLFE (weak): th(187148.86177126726)=-31.548600657080883; dx=-7.912073005302859E-7 evalInputDelta=0.1633382274135009
New Minimum: -31.548600657080883 > -32.77801377501538
END: th(1684339.7559414054)=-32.77801377501538; dx=-7.05486768604204E-7 evalInputDelta=1.3927513453479996
Fitness changed from -31.38526242966738 to -32.77801377501538
Iteration 2 complete. Error: -32.77801377501538 Total: 30.1517; Orientation: 0.0661; Line Search: 26.9837
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e821a234-7835-42bb-9491-b34ac625a142.jpg)
Adding measurement c4de9e6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-32.77801377501538;dx=-7.397061492256415E-7
New Minimum: -32.77801377501538 > -35.156329618809444
END: th(3628800.0000000005)=-35.156329618809444; dx=-5.120341699692416E-7 evalInputDelta=2.378315843794063
Fitness changed from -32.77801377501538 to -35.156329618809444
Iteration 3 complete. Error: -35.156329618809444 Total: 8.4931; Orientation: 0.0654; Line Search: 5.4314
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7e4e5392-33dd-4866-a80a-56d7737b9c63.jpg)
Adding measurement 6e22204f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.730e+04, gradient 7.151e-04, dot -0.836; [1e10c7cf-2278-469f-a1e4-96d798e82f7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -35.156329618809444, -32.77801377501538, -31.38526242966738, -31.38526108246472
LBFGS Accumulation History: 3 points
Removed measurement 6e22204f to history. Total: 3
th(0)=-35.156329618809444;dx=-5.094459175620228E-7
New Minimum: -35.156329618809444 > -38.611502707171134
END: th(7818012.603187701)=-38.611502707171134; dx=-3.1145630842691007E-7 evalInputDelta=3.45517308836169
Fitness changed from -35.156329618809444 to -38.611502707171134
Iteration 4 complete. Error: -38.611502707171134 Total: 9.5905; Orientation: 1.2205; Line Search: 5.3911
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/763c0ff9-7ea0-440d-b796-58573c44b4ec.jpg)
Adding measurement 271db512 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.409e+04, gradient 6.291e-04, dot -0.647; [1e10c7cf-2278-469f-a1e4-96d798e82f7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -38.611502707171134, -32.77801377501538, -31.38526242966738, -31.38526108246472
LBFGS Accumulation History: 3 points
Removed measurement 271db512 to history. Total: 3
th(0)=-38.611502707171134;dx=-3.9483598122851423E-7
New Minimum: -38.611502707171134 > -42.89087851722273
END: th(1.6843397559414055E7)=-42.89087851722273; dx=-1.389716216618675E-7 evalInputDelta=4.279375810051597
Fitness changed from -38.611502707171134 to -42.89087851722273
Iteration 5 complete. Error: -42.89087851722273 Total: 9.5249; Orientation: 1.1162; Line Search: 5.2367
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7ac62605-345e-4e03-8955-d17e981f6bc0.jpg)
Adding measurement 161f461a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.559e+04, gradient 6.663e-04, dot -0.421; [1e10c7cf-2278-469f-a1e4-96d798e82f7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -42.89087851722273, -32.77801377501538, -31.38526242966738, -31.38526108246472
LBFGS Accumulation History: 3 points
Removed measurement 161f461a to history. Total: 3
th(0)=-42.89087851722273;dx=-4.4289904461988936E-7
New Minimum: -42.89087851722273 > -45.574635008442336
WOLF (strong): th(3.628800000000001E7)=-45.574635008442336; dx=1.7121094838262863E-8 evalInputDelta=2.6837564912196044
New Minimum: -45.574635008442336 > -45.893715715905515
END: th(1.8144000000000004E7)=-45.893715715905515; dx=-1.220157403172133E-8 evalInputDelta=3.0028371986827835
Fitness changed from -42.89087851722273 to -45.893715715905515
Iteration 6 complete. Error: -45.893715715905515 Total: 12.3554; Orientation: 1.1043; Line Search: 7.9367
Adding measurement cc4b1fe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.638e+04, gradient 7.084e-04, dot -0.314; [1e10c7cf-2278-469f-a1e4-96d798e82f7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.893715715905515, -32.77801377501538, -31.38526242966738, -31.38526108246472
LBFGS Accumulation History: 3 points
Removed measurement cc4b1fe to history. Total: 3
th(0)=-45.893715715905515;dx=-4.997379057371286E-7
New Minimum: -45.893715715905515 > -47.16303799332385
WOLF (strong): th(3.9090063015938506E7)=-47.16303799332385; dx=8.228367951139934E-8 evalInputDelta=1.2693222774183326
New Minimum: -47.16303799332385 > -49.296341877553786
WOLF (strong): th(1.9545031507969253E7)=-49.296341877553786; dx=6.736031628054407E-8 evalInputDelta=3.4026261616482714
END: th(6515010.502656418)=-48.647624399500025; dx=-2.5777423187847895E-7 evalInputDelta=2.75390868359451
Fitness changed from -45.893715715905515 to -49.296341877553786
Iteration 7 complete. Error: -49.296341877553786 Total: 14.5277; Orientation: 1.2365; Line Search: 10.7071
Adding measurement 7e5270fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.158e+04, gradient 7.152e-04, dot -0.291; [1e10c7cf-2278-469f-a1e4-96d798e82f7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.296341877553786, -32.77801377501538, -31.38526242966738, -31.38526108246472
LBFGS Accumulation History: 3 points
Removed measurement 7e5270fb to history. Total: 3
th(0)=-49.296341877553786;dx=-5.111714407139746E-7
New Minimum: -49.296341877553786 > -53.08240506806551
WOLF (strong): th(1.4036164632845048E7)=-53.08240506806551; dx=2.8653978933616603E-9 evalInputDelta=3.786063190511726
END: th(7018082.316422524)=-52.285468799900336; dx=-2.466595469996596E-7 evalInputDelta=2.98912692234655
Fitness changed from -49.296341877553786 to -53.08240506806551
Iteration 8 complete. Error: -53.08240506806551 Total: 11.9047; Orientation: 1.1627; Line Search: 8.1425
Adding measurement 12e919ec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.039e+04, gradient 5.808e-04, dot -0.405; [1e10c7cf-2278-469f-a1e4-96d798e82f7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.08240506806551, -32.77801377501538, -31.38526242966738, -31.38526108246472
LBFGS Accumulation History: 3 points
Removed measurement 12e919ec to history. Total: 3
th(0)=-53.08240506806551;dx=-3.365861187305213E-7
New Minimum: -53.08240506806551 > -55.521226236909456
WOLF (strong): th(1.5120000000000006E7)=-55.521226236909456; dx=2.667476201942352E-9 evalInputDelta=2.438821168843944
END: th(7560000.000000003)=-55.07086374244321; dx=-1.4617047749397948E-7 evalInputDelta=1.9884586743776964
Fitness changed from -53.08240506806551 to -55.521226236909456
Iteration 9 complete. Error: -55.521226236909456 Total: 11.9543; Orientation: 1.2045; Line Search: 8.1759
Adding measurement 6334cf8d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.545e+04, gradient 5.891e-04, dot -0.389; [1e10c7cf-2278-469f-a1e4-96d798e82f7d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.521226236909456, -32.77801377501538, -31.38526242966738, -31.38526108246472
LBFGS Accumulation History: 3 points
Removed measurement 6334cf8d to history. Total: 3
th(0)=-55.521226236909456;dx=-3.4578028293253524E-7
New Minimum: -55.521226236909456 > -57.49947822795952
WOLF (strong): th(1.6287526256641047E7)=-57.49947822795952; dx=5.0528029134909585E-8 evalInputDelta=1.9782519910500653
New Minimum: -57.49947822795952 > -57.50600189340527
END: th(8143763.128320524)=-57.50600189340527; dx=-9.807153641397165E-8 evalInputDelta=1.9847756564958132
Fitness changed from -55.521226236909456 to -57.50600189340527
Iteration 10 complete. Error: -57.50600189340527 Total: 11.8897; Orientation: 1.1007; Line Search: 8.2013
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3675e483-2cac-4149-8f26-918caab4bdc1.jpg)
Final threshold in iteration 11: -57.50600189340527 (> -Infinity) after 134.568s (< 5400.000s)

Returns

    -57.50600189340527