Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

BasicOptimizer.scala:89 executed in 8.23 seconds (0.601 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: 146728759660000
Reset training subject: 146728897476500
Adding measurement 23ac9284 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-5.501320246980616;dx=-0.12828805196158605
New Minimum: -5.501320246980616 > -5.728208963514469
WOLFE (weak): th(2.154434690031884)=-5.728208963514469; dx=-0.12937749063964232 evalInputDelta=0.22688871653385245
New Minimum: -5.728208963514469 > -5.957753862422068
WOLFE (weak): th(4.308869380063768)=-5.957753862422068; dx=-0.13060208012556382 evalInputDelta=0.4564336154414521
New Minimum: -5.957753862422068 > -6.8947099613878
WOLFE (weak): th(12.926608140191302)=-6.8947099613878; dx=-0.12597252034052991 evalInputDelta=1.393389714407184
New Minimum: -6.8947099613878 > -11.113979753421933
WOLFE (weak): th(51.70643256076521)=-11.113979753421933; dx=-0.12848811096959606 evalInputDelta=5.612659506441317
New Minimum: -11.113979753421933 > -31.57091761978845
END: th(258.53216280382605)=-31.57091761978845; dx=-0.06001457398120132 evalInputDelta=26.069597372807834
Fitness changed from -5.501320246980616 to -31.57091761978845
Iteration 1 complete. Error: -31.57091761978845 Total: 1.0968; Orientation: 0.0016; Line Search: 0.7359
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/fbed7e40-a9ec-4823-a206-668308e73cbf.jpg)
Adding measurement 5fd63bb3 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-31.57091761978845;dx=-0.14914568102794323
New Minimum: -31.57091761978845 > -68.9657941425947
END: th(556.9906600335335)=-68.9657941425947; dx=-0.0354003229122359 evalInputDelta=37.39487652280626
Fitness changed from -31.57091761978845 to -68.9657941425947
Iteration 2 complete. Error: -68.9657941425947 Total: 0.3706; Orientation: 0.0017; Line Search: 0.2398
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/947af1aa-6226-427b-9609-ce93a6af6273.jpg)
Adding measurement 5cba2999 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-68.9657941425947;dx=-0.14462636089478653
New Minimum: -68.9657941425947 > -102.27270434816663
END: th(1200.0)=-102.27270434816663; dx=-0.017572343646412324 evalInputDelta=33.306910205571924
Fitness changed from -68.9657941425947 to -102.27270434816663
Iteration 3 complete. Error: -102.27270434816663 Total: 0.3731; Orientation: 0.0015; Line Search: 0.2291
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/050c0384-ea04-4287-9a2a-3bd492f000bf.jpg)
Adding measurement 674ad70d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.924e+02, gradient 3.658e-01, dot -0.235; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.27270434816663, -68.9657941425947, -31.57091761978845, -5.501320246980616
LBFGS Accumulation History: 3 points
Removed measurement 674ad70d to history. Total: 3
th(0)=-102.27270434816663;dx=-0.12261671027690639
New Minimum: -102.27270434816663 > -168.2229036501867
END: th(2585.3216280382608)=-168.2229036501867; dx=-0.011257387185588809 evalInputDelta=65.95019930202008
Fitness changed from -102.27270434816663 to -168.2229036501867
Iteration 4 complete. Error: -168.2229036501867 Total: 0.3854; Orientation: 0.0283; Line Search: 0.2336
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/edf88f26-a805-4057-ac01-c44743b65750.jpg)
Adding measurement 40292786 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.732e+03, gradient 3.815e-01, dot -0.239; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -168.2229036501867, -68.9657941425947, -31.57091761978845, -5.501320246980616
LBFGS Accumulation History: 3 points
Removed measurement 40292786 to history. Total: 3
th(0)=-168.2229036501867;dx=-0.13426997153532721
New Minimum: -168.2229036501867 > -283.6309634674959
END: th(5569.9066003353355)=-283.6309634674959; dx=-0.008775813258633917 evalInputDelta=115.40805981730921
Fitness changed from -168.2229036501867 to -283.6309634674959
Iteration 5 complete. Error: -283.6309634674959 Total: 0.3805; Orientation: 0.0290; Line Search: 0.2265
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/22edfef1-0b73-4f47-a47b-2f8c0315f7ad.jpg)
Adding measurement 336efa00 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.122e+03, gradient 3.485e-01, dot -0.212; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -283.6309634674959, -68.9657941425947, -31.57091761978845, -5.501320246980616
LBFGS Accumulation History: 3 points
Removed measurement 336efa00 to history. Total: 3
th(0)=-283.6309634674959;dx=-0.11467521675224719
New Minimum: -283.6309634674959 > -566.9040097318064
END: th(12000.000000000002)=-566.9040097318064; dx=-0.0014031269503244751 evalInputDelta=283.27304626431044
Fitness changed from -283.6309634674959 to -566.9040097318064
Iteration 6 complete. Error: -566.9040097318064 Total: 0.3804; Orientation: 0.0303; Line Search: 0.2308
Adding measurement 41117f7d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.419e+03, gradient 3.243e-01, dot -0.239; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -566.9040097318064, -68.9657941425947, -31.57091761978845, -5.501320246980616
LBFGS Accumulation History: 3 points
Removed measurement 41117f7d to history. Total: 3
th(0)=-566.9040097318064;dx=-0.09973120621171142
New Minimum: -566.9040097318064 > -752.4388264171381
WOLF (strong): th(25853.21628038261)=-752.4388264171381; dx=0.006865177857585305 evalInputDelta=185.53481668533175
New Minimum: -752.4388264171381 > -955.9600867714091
END: th(12926.608140191305)=-955.9600867714091; dx=-0.0016402017631402701 evalInputDelta=389.05607703960277
Fitness changed from -566.9040097318064 to -955.9600867714091
Iteration 7 complete. Error: -955.9600867714091 Total: 0.4876; Orientation: 0.0288; Line Search: 0.3434
Adding measurement 6799721e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.760e+04, gradient 3.231e-01, dot -0.256; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -955.9600867714091, -68.9657941425947, -31.57091761978845, -5.501320246980616
LBFGS Accumulation History: 3 points
Removed measurement 6799721e to history. Total: 3
th(0)=-955.9600867714091;dx=-0.0988922144702018
Armijo: th(27849.533001676682)=-912.5193491099244; dx=0.010396145166633014 evalInputDelta=-43.44073766148472
New Minimum: -955.9600867714091 > -1263.7030901283736
WOLF (strong): th(13924.766500838341)=-1263.7030901283736; dx=0.001828127519489372 evalInputDelta=307.74300335696444
New Minimum: -1263.7030901283736 > -1310.7865959033911
END: th(4641.58883361278)=-1310.7865959033911; dx=-0.03336790577268691 evalInputDelta=354.826509131982
Fitness changed from -955.9600867714091 to -1310.7865959033911
Iteration 8 complete. Error: -1310.7865959033911 Total: 0.5951; Orientation: 0.0289; Line Search: 0.4577
Adding measurement 61023f28 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.565e+04, gradient 2.841e-01, dot -0.367; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1310.7865959033911, -68.9657941425947, -31.57091761978845, -5.501320246980616
LBFGS Accumulation History: 3 points
Removed measurement 61023f28 to history. Total: 3
th(0)=-1310.7865959033911;dx=-0.0763519719429111
New Minimum: -1310.7865959033911 > -1622.150270474348
END: th(10000.000000000004)=-1622.150270474348; dx=-0.0109311298905059 evalInputDelta=311.36367457095685
Fitness changed from -1310.7865959033911 to -1622.150270474348
Iteration 9 complete. Error: -1622.150270474348 Total: 0.3678; Orientation: 0.0276; Line Search: 0.2311
Adding measurement 5a569c06 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 7.215e+04, gradient 3.212e-01, dot 0.380; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1622.150270474348;dx=-8740.566703110851
Armijo: th(21544.346900318847)=-1047.0356966216577; dx=0.01755142195142968 evalInputDelta=-575.1145738526902
Armijo: th(10772.173450159424)=-1046.6019420008736; dx=0.035188205940913216 evalInputDelta=-575.5483284734744
Armijo: th(3590.7244833864747)=-1045.8234793692482; dx=0.10792167260611851 evalInputDelta=-576.3267911050998
Armijo: th(897.6811208466187)=-1045.5873349462493; dx=0.430336123055174 evalInputDelta=-576.5629355280987
Armijo: th(179.53622416932373)=-1047.8216689876192; dx=2.110851450973707 evalInputDelta=-574.3286014867288
Armijo: th(29.922704028220622)=-1053.1448143536577; dx=12.881972622521587 evalInputDelta=-569.0054561206903
Armijo: th(4.274672004031517)=-1087.8435664193635; dx=85.85460615968707 evalInputDelta=-534.3067040549845
Armijo: th(0.5343340005039396)=-1323.2881394465833; dx=528.0736605443825 evalInputDelta=-298.8621310277647
New Minimum: -1622.150270474348 > -1718.0440914016147
END: th(0.05937044450043774)=-1718.0440914016147; dx=-1234.4135185944388 evalInputDelta=95.89382092726669
Fitness changed from -1622.150270474348 to -1718.0440914016147
Iteration 10 complete. Error: -1718.0440914016147 Total: 1.2813; Orientation: 0.0265; Line Search: 1.1467
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f1f5611a-557d-4c4f-8928-b6472f0adb8c.jpg)
Adding measurement 5af39d9 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.248e+05, gradient 3.036e-01, dot -0.259; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1718.0440914016147, -1622.150270474348, -68.9657941425947, -31.57091761978845, -5.501320246980616
Rejected: LBFGS Orientation magnitude: 1.730e+05, gradient 3.036e-01, dot -0.286; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1718.0440914016147, -1622.150270474348, -68.9657941425947, -31.57091761978845
LBFGS Accumulation History: 3 points
Removed measurement 5af39d9 to history. Total: 4
Removed measurement 5a569c06 to history. Total: 3
th(0)=-1718.0440914016147;dx=-0.08675928075586173
New Minimum: -1718.0440914016147 > -1718.0555869936222
END: th(0.12790974519435575)=-1718.0555869936222; dx=-0.06023422088127418 evalInputDelta=0.011495592007577216
Fitness changed from -1718.0440914016147 to -1718.0555869936222
Iteration 11 complete. Error: -1718.0555869936222 Total: 0.4080; Orientation: 0.0601; Line Search: 0.2241
Adding measurement 21c8e222 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.637e+04, gradient 3.087e-01, dot -0.270; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1718.0555869936222, -68.9657941425947, -31.57091761978845, -5.501320246980616
LBFGS Accumulation History: 3 points
Removed measurement 21c8e222 to history. Total: 3
th(0)=-1718.0555869936222;dx=-0.08754460262640017
New Minimum: -1718.0555869936222 > -1718.0803240826665
END: th(0.27557319223985904)=-1718.0803240826665; dx=-0.060051590887057735 evalInputDelta=0.024737089044265304
Fitness changed from -1718.0555869936222 to -1718.0803240826665
Iteration 12 complete. Error: -1718.0803240826665 Total: 0.3696; Orientation: 0.0297; Line Search: 0.2297
Adding measurement 2cc9359 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.359e+04, gradient 3.007e-01, dot -0.272; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1718.0803240826665, -68.9657941425947, -31.57091761978845, -5.501320246980616
LBFGS Accumulation History: 3 points
Removed measurement 2cc9359 to history. Total: 3
th(0)=-1718.0803240826665;dx=-0.08445295920053436
New Minimum: -1718.0803240826665 > -1718.1324890706187
END: th(0.5937044450043775)=-1718.1324890706187; dx=-0.05943190771492375 evalInputDelta=0.05216498795221014
Fitness changed from -1718.0803240826665 to -1718.1324890706187
Iteration 13 complete. Error: -1718.1324890706187 Total: 1.0028; Orientation: 0.0330; Line Search: 0.2479
Adding measurement 7c013a8e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.793e+04, gradient 3.046e-01, dot -0.277; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1718.1324890706187, -68.9657941425947, -31.57091761978845, -5.501320246980616
LBFGS Accumulation History: 3 points
Removed measurement 7c013a8e to history. Total: 3
th(0)=-1718.1324890706187;dx=-0.0885133665937433
New Minimum: -1718.1324890706187 > -1718.246126141421
END: th(1.2790974519435576)=-1718.246126141421; dx=-0.0608230019328039 evalInputDelta=0.11363707080226959
Fitness changed from -1718.1324890706187 to -1718.246126141421
Iteration 14 complete. Error: -1718.246126141421 Total: 0.3617; Orientation: 0.0265; Line Search: 0.2265
Adding measurement 18c90dbc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.561e+04, gradient 2.992e-01, dot -0.277; [95770b6d-1461-4d45-bb34-29199a851905 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1718.246126141421, -68.9657941425947, -31.57091761978845, -5.501320246980616
LBFGS Accumulation History: 3 points
Removed measurement 18c90dbc to history. Total: 3
th(0)=-1718.246126141421;dx=-0.08597484859968606
New Minimum: -1718.246126141421 > -1718.4842885519786
END: th(2.7557319223985908)=-1718.4842885519786; dx=-0.06075016685268161 evalInputDelta=0.23816241055760656
Fitness changed from -1718.246126141421 to -1718.4842885519786
Iteration 15 complete. Error: -1718.4842885519786 Total: 0.3597; Orientation: 0.0276; Line Search: 0.2241
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/0a715e5f-08e1-4008-82fc-3aa13a07d799.jpg)
Final threshold in iteration 16: -1718.4842885519786 (> -Infinity) after 8.232s (< 5400.000s)

Returns

    -1718.4842885519786