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 94.95 seconds (1.024 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: 283309332901900
Reset training subject: 283311282530200
Adding measurement c4c5d25 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-47.5330391780982;dx=-5.079824355541987E-6
New Minimum: -47.5330391780982 > -47.53304509250961
END: th(2.154434690031884)=-47.53304509250961; dx=-4.18771402501069E-6 evalInputDelta=5.914411410401499E-6
Fitness changed from -47.5330391780982 to -47.53304509250961
Iteration 1 complete. Error: -47.53304509250961 Total: 9.3396; Orientation: 0.0583; Line Search: 3.6082
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/19cbd0f7-0998-4e48-8625-95175d7f4ade.jpg)
Adding measurement 3b447baf to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-47.53304509250961;dx=-4.187717658405975E-6
New Minimum: -47.53304509250961 > -47.533068750147876
WOLFE (weak): th(4.641588833612779)=-47.533068750147876; dx=-4.18771194117974E-6 evalInputDelta=2.3657638266172398E-5
New Minimum: -47.533068750147876 > -47.533088464837434
WOLFE (weak): th(9.283177667225559)=-47.533088464837434; dx=-4.187698319653073E-6 evalInputDelta=4.337232782347655E-5
New Minimum: -47.533088464837434 > -47.53316535204859
WOLFE (weak): th(27.849533001676676)=-47.53316535204859; dx=-4.18768392219212E-6 evalInputDelta=1.2025953898131547E-4
New Minimum: -47.53316535204859 > -47.53351627158701
WOLFE (weak): th(111.3981320067067)=-47.53351627158701; dx=-4.187815873087633E-6 evalInputDelta=4.711790774010183E-4
New Minimum: -47.53351627158701 > -47.535381227462054
WOLFE (weak): th(556.9906600335335)=-47.535381227462054; dx=-4.187652220198826E-6 evalInputDelta=0.002336134952443558
New Minimum: -47.535381227462054 > -47.547042442494266
WOLFE (weak): th(3341.9439602012008)=-47.547042442494266; dx=-4.186758848662533E-6 evalInputDelta=0.013997349984656182
New Minimum: -47.547042442494266 > -47.63086736623609
WOLFE (weak): th(23393.607721408407)=-47.63086736623609; dx=-4.174376632229442E-6 evalInputDelta=0.09782227372647867
New Minimum: -47.63086736623609 > -48.30562156131629
WOLFE (weak): th(187148.86177126726)=-48.30562156131629; dx=-4.064177869550767E-6 evalInputDelta=0.7725764688066832
New Minimum: -48.30562156131629 > -53.576291853334254
END: th(1684339.7559414054)=-53.576291853334254; dx=-2.9453917662240883E-6 evalInputDelta=6.043246760824644
Fitness changed from -47.53304509250961 to -53.576291853334254
Iteration 2 complete. Error: -53.576291853334254 Total: 20.9458; Orientation: 0.0579; Line Search: 18.8295
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e172ddfe-122f-4f0b-ad39-9935ba084c51.jpg)
Adding measurement 2c02205c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-53.576291853334254;dx=-2.5637781820427868E-6
New Minimum: -53.576291853334254 > -60.777577633736904
END: th(3628800.0000000005)=-60.777577633736904; dx=-1.4121233456901577E-6 evalInputDelta=7.2012857804026496
Fitness changed from -53.576291853334254 to -60.777577633736904
Iteration 3 complete. Error: -60.777577633736904 Total: 5.9673; Orientation: 0.0553; Line Search: 3.6652
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/0a09c159-b402-439b-b43a-329df8ff0810.jpg)
Adding measurement 7ff7b92e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.830e+03, gradient 1.238e-03, dot -0.685; [bbde4048-9b7f-4a7f-90a9-dac990a52294 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.777577633736904, -53.576291853334254, -47.53304509250961, -47.5330391780982
LBFGS Accumulation History: 3 points
Removed measurement 7ff7b92e to history. Total: 3
th(0)=-60.777577633736904;dx=-1.5331698517035045E-6
New Minimum: -60.777577633736904 > -68.53154448981148
END: th(7818012.603187701)=-68.53154448981148; dx=-5.72207553344949E-7 evalInputDelta=7.753966856074577
Fitness changed from -60.777577633736904 to -68.53154448981148
Iteration 4 complete. Error: -68.53154448981148 Total: 6.8157; Orientation: 1.0061; Line Search: 3.7019
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/316e998e-b77b-4dc4-8560-40ae82f9526c.jpg)
Adding measurement 6cca805f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.892e+03, gradient 1.249e-03, dot -0.456; [bbde4048-9b7f-4a7f-90a9-dac990a52294 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.53154448981148, -53.576291853334254, -47.53304509250961, -47.5330391780982
LBFGS Accumulation History: 3 points
Removed measurement 6cca805f to history. Total: 3
th(0)=-68.53154448981148;dx=-1.559004434404623E-6
New Minimum: -68.53154448981148 > -71.68767858086261
WOLF (strong): th(1.6843397559414055E7)=-71.68767858086261; dx=2.384703821953537E-7 evalInputDelta=3.156134091051129
New Minimum: -71.68767858086261 > -73.26688557419496
WOLF (strong): th(8421698.779707028)=-73.26688557419496; dx=5.984346293507714E-8 evalInputDelta=4.735341084383478
END: th(2807232.926569009)=-71.8444232661015; dx=-7.794410823812061E-7 evalInputDelta=3.3128787762900203
Fitness changed from -68.53154448981148 to -73.26688557419496
Iteration 5 complete. Error: -73.26688557419496 Total: 10.5519; Orientation: 1.0092; Line Search: 7.4951
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1de9eb2b-9b47-4cbf-a363-b390fa2b6255.jpg)
Adding measurement 76401205 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.498e+03, gradient 1.432e-03, dot -0.316; [bbde4048-9b7f-4a7f-90a9-dac990a52294 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.26688557419496, -53.576291853334254, -47.53304509250961, -47.5330391780982
LBFGS Accumulation History: 3 points
Removed measurement 76401205 to history. Total: 3
th(0)=-73.26688557419496;dx=-2.050740019464655E-6
New Minimum: -73.26688557419496 > -79.0786356233812
WOLF (strong): th(6048000.000000001)=-79.0786356233812; dx=1.373687639227097E-7 evalInputDelta=5.811750049186244
END: th(3024000.0000000005)=-77.94697306001478; dx=-9.67255927996512E-7 evalInputDelta=4.680087485819826
Fitness changed from -73.26688557419496 to -79.0786356233812
Iteration 6 complete. Error: -79.0786356233812 Total: 9.1039; Orientation: 0.9750; Line Search: 5.9253
Adding measurement 3841bbb5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.774e+04, gradient 1.196e-03, dot -0.451; [bbde4048-9b7f-4a7f-90a9-dac990a52294 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.0786356233812, -53.576291853334254, -47.53304509250961, -47.5330391780982
LBFGS Accumulation History: 3 points
Removed measurement 3841bbb5 to history. Total: 3
th(0)=-79.0786356233812;dx=-1.4310852695750108E-6
New Minimum: -79.0786356233812 > -83.13633350499073
WOLF (strong): th(6515010.502656418)=-83.13633350499073; dx=9.069911875452042E-8 evalInputDelta=4.057697881609528
END: th(3257505.251328209)=-82.42464441766938; dx=-5.952829529519982E-7 evalInputDelta=3.3460087942881813
Fitness changed from -79.0786356233812 to -83.13633350499073
Iteration 7 complete. Error: -83.13633350499073 Total: 8.2637; Orientation: 0.9458; Line Search: 5.5042
Adding measurement 13ff063c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.043e+04, gradient 1.193e-03, dot -0.446; [bbde4048-9b7f-4a7f-90a9-dac990a52294 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -83.13633350499073, -53.576291853334254, -47.53304509250961, -47.5330391780982
LBFGS Accumulation History: 3 points
Removed measurement 13ff063c to history. Total: 3
th(0)=-83.13633350499073;dx=-1.4235607080653244E-6
New Minimum: -83.13633350499073 > -86.82049932580884
WOLF (strong): th(7018082.316422524)=-86.82049932580884; dx=2.3346439761590393E-7 evalInputDelta=3.6841658208181087
END: th(3509041.158211262)=-86.55009312320496; dx=-4.803076720574522E-7 evalInputDelta=3.413759618214229
Fitness changed from -83.13633350499073 to -86.82049932580884
Iteration 8 complete. Error: -86.82049932580884 Total: 8.3838; Orientation: 0.9457; Line Search: 5.4202
Adding measurement 3e09326d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.493e+04, gradient 1.225e-03, dot -0.406; [bbde4048-9b7f-4a7f-90a9-dac990a52294 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.82049932580884, -53.576291853334254, -47.53304509250961, -47.5330391780982
LBFGS Accumulation History: 3 points
Removed measurement 3e09326d to history. Total: 3
th(0)=-86.82049932580884;dx=-1.4999098806725747E-6
New Minimum: -86.82049932580884 > -90.51915845263792
WOLF (strong): th(7560000.000000003)=-90.51915845263792; dx=3.818734941352288E-7 evalInputDelta=3.698659126829085
New Minimum: -90.51915845263792 > -90.61537317620079
END: th(3780000.0000000014)=-90.61537317620079; dx=-4.503949201477532E-7 evalInputDelta=3.7948738503919515
Fitness changed from -86.82049932580884 to -90.61537317620079
Iteration 9 complete. Error: -90.61537317620079 Total: 8.6564; Orientation: 0.9508; Line Search: 5.7058
Adding measurement 3b85ebc2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.251e+04, gradient 8.008e-04, dot -0.697; [bbde4048-9b7f-4a7f-90a9-dac990a52294 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.61537317620079, -53.576291853334254, -47.53304509250961, -47.5330391780982
LBFGS Accumulation History: 3 points
Removed measurement 3b85ebc2 to history. Total: 3
th(0)=-90.61537317620079;dx=-6.412725188343514E-7
New Minimum: -90.61537317620079 > -94.55005701266083
END: th(8143763.128320524)=-94.55005701266083; dx=-3.5300552487546686E-7 evalInputDelta=3.9346838364600387
Fitness changed from -90.61537317620079 to -94.55005701266083
Iteration 10 complete. Error: -94.55005701266083 Total: 6.5748; Orientation: 0.9803; Line Search: 3.8161
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/75efe221-8b58-4ae7-885e-70e9913b674c.jpg)
Final threshold in iteration 11: -94.55005701266083 (> -Infinity) after 94.956s (< 5400.000s)

Returns

    -94.55005701266083