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 1566.21 seconds (22.451 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: 637214576397900
Reset training subject: 637236377459200
Adding measurement 593dcd2c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-42.675912984222684;dx=-8.989429498102504E-6
New Minimum: -42.675912984222684 > -42.675941732289196
WOLFE (weak): th(2.154434690031884)=-42.675941732289196; dx=-9.00895472484003E-6 evalInputDelta=2.8748066512207515E-5
New Minimum: -42.675941732289196 > -42.675970923852944
WOLFE (weak): th(4.308869380063768)=-42.675970923852944; dx=-9.000612828363033E-6 evalInputDelta=5.793963025979565E-5
New Minimum: -42.675970923852944 > -42.676087712607774
WOLFE (weak): th(12.926608140191302)=-42.676087712607774; dx=-8.992073607921006E-6 evalInputDelta=1.7472838509036137E-4
New Minimum: -42.676087712607774 > -42.67660965384819
WOLFE (weak): th(51.70643256076521)=-42.67660965384819; dx=-8.940603533035593E-6 evalInputDelta=6.966696255048532E-4
New Minimum: -42.67660965384819 > -42.67939574484508
WOLFE (weak): th(258.53216280382605)=-42.67939574484508; dx=-8.98383489036702E-6 evalInputDelta=0.003482760622397052
New Minimum: -42.67939574484508 > -42.69680831058093
WOLFE (weak): th(1551.1929768229563)=-42.69680831058093; dx=-8.96904565158548E-6 evalInputDelta=0.020895326358242983
New Minimum: -42.69680831058093 > -42.82223828422184
WOLFE (weak): th(10858.350837760694)=-42.82223828422184; dx=-9.014346366010797E-6 evalInputDelta=0.14632529999915533
New Minimum: -42.82223828422184 > -43.848835934550806
WOLFE (weak): th(86866.80670208555)=-43.848835934550806; dx=-9.057885381684531E-6 evalInputDelta=1.1729229503281218
New Minimum: -43.848835934550806 > -53.115830562590055
WOLFE (weak): th(781801.26031877)=-53.115830562590055; dx=-8.528700640456318E-6 evalInputDelta=10.439917578367371
New Minimum: -53.115830562590055 > -79.88072063339007
WOLF (strong): th(7818012.6031877)=-79.88072063339007; dx=6.092209893343066E-7 evalInputDelta=37.204807649167385
END: th(4299906.931753235)=-78.85048570468636; dx=-1.5600706553575875E-6 evalInputDelta=36.17457272046368
Fitness changed from -42.675912984222684 to -79.88072063339007
Iteration 1 complete. Error: -79.88072063339007 Total: 323.6017; Orientation: 0.1356; Line Search: 259.0944
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e2ab0668-48ce-40d5-9f2e-910519e7654a.jpg)
Adding measurement 64d4ad98 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-79.88072063339007;dx=-1.4150587695191296E-5
New Minimum: -79.88072063339007 > -107.00408401129042
WOLF (strong): th(9263868.657677729)=-107.00408401129042; dx=2.7794835099753407E-6 evalInputDelta=27.123363377900347
New Minimum: -107.00408401129042 > -125.2294401468341
WOLF (strong): th(4631934.328838864)=-125.2294401468341; dx=7.657381428847568E-7 evalInputDelta=45.348719513444024
END: th(1543978.1096129548)=-108.80252861391915; dx=-9.412451718182796E-6 evalInputDelta=28.92180798052908
Fitness changed from -79.88072063339007 to -125.2294401468341
Iteration 2 complete. Error: -125.2294401468341 Total: 111.0275; Orientation: 0.1795; Line Search: 87.5786
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/9465f026-40f4-438d-9cc8-b5745edcdd00.jpg)
Adding measurement 7782a0e0 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-125.2294401468341;dx=-1.2888680880963176E-5
New Minimum: -125.2294401468341 > -159.88237925221895
END: th(3326400.0)=-159.88237925221895; dx=-5.883150408737271E-7 evalInputDelta=34.65293910538486
Fitness changed from -125.2294401468341 to -159.88237925221895
Iteration 3 complete. Error: -159.88237925221895 Total: 66.5023; Orientation: 0.1418; Line Search: 43.7889
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/03af9f10-bd96-4529-8064-53e2be39faf1.jpg)
Adding measurement 20212831 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.097e+04, gradient 2.952e-03, dot -0.601; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -159.88237925221895, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 20212831 to history. Total: 3
th(0)=-159.88237925221895;dx=-8.698297924758811E-6
New Minimum: -159.88237925221895 > -176.6402851647
WOLF (strong): th(7166511.552922058)=-176.6402851647; dx=1.6085400048313508E-6 evalInputDelta=16.75790591248105
New Minimum: -176.6402851647 > -182.38114598435297
END: th(3583255.776461029)=-182.38114598435297; dx=-2.3526372628190376E-7 evalInputDelta=22.498766732134015
Fitness changed from -159.88237925221895 to -182.38114598435297
Iteration 4 complete. Error: -182.38114598435297 Total: 90.6867; Orientation: 2.6789; Line Search: 65.1964
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0205e6e3-9251-4aae-9601-7f084c316ffa.jpg)
Adding measurement 63e00481 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.712e+04, gradient 2.887e-03, dot -0.589; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -182.38114598435297, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 63e00481 to history. Total: 3
th(0)=-182.38114598435297;dx=-8.286340982200332E-6
New Minimum: -182.38114598435297 > -192.32523511591643
WOLF (strong): th(7719890.548064774)=-192.32523511591643; dx=1.9367972318357518E-6 evalInputDelta=9.944089131563459
New Minimum: -192.32523511591643 > -202.3429761998177
WOLF (strong): th(3859945.274032387)=-202.3429761998177; dx=6.678250607170679E-7 evalInputDelta=19.961830215464744
END: th(1286648.4246774623)=-195.70233679030608; dx=-5.007408417725881E-6 evalInputDelta=13.321190805953108
Fitness changed from -182.38114598435297 to -202.3429761998177
Iteration 5 complete. Error: -202.3429761998177 Total: 112.9647; Orientation: 2.6827; Line Search: 87.6798
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/51a51ece-c1c7-401d-8f67-6596c1dcd34c.jpg)
Adding measurement 5f0c0974 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.134e+04, gradient 2.844e-03, dot -0.538; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -202.3429761998177, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 5f0c0974 to history. Total: 3
th(0)=-202.3429761998177;dx=-8.0117056248065E-6
New Minimum: -202.3429761998177 > -222.4333511869385
END: th(2772000.0)=-222.4333511869385; dx=-1.0107144696884633E-6 evalInputDelta=20.090374987120782
Fitness changed from -202.3429761998177 to -222.4333511869385
Iteration 6 complete. Error: -222.4333511869385 Total: 69.6094; Orientation: 2.6580; Line Search: 44.2190
Adding measurement 2761a43d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.017e+05, gradient 2.105e-03, dot -0.672; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -222.4333511869385, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 2761a43d to history. Total: 3
th(0)=-222.4333511869385;dx=-4.413368596624556E-6
New Minimum: -222.4333511869385 > -240.85980716395545
END: th(5972092.960768382)=-240.85980716395545; dx=-3.7218291324921585E-7 evalInputDelta=18.426455977016957
Fitness changed from -222.4333511869385 to -240.85980716395545
Iteration 7 complete. Error: -240.85980716395545 Total: 67.2617; Orientation: 2.6965; Line Search: 43.9349
Adding measurement 32e4e6f6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.670e+04, gradient 2.670e-03, dot -0.501; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -240.85980716395545, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 32e4e6f6 to history. Total: 3
th(0)=-240.85980716395545;dx=-7.114414670464215E-6
Armijo: th(1.2866484246774625E7)=-227.34377176611403; dx=2.2086909220033234E-6 evalInputDelta=-13.51603539784142
New Minimum: -240.85980716395545 > -253.9940344541906
WOLF (strong): th(6433242.1233873125)=-253.9940344541906; dx=2.3375358345446026E-6 evalInputDelta=13.134227290235145
New Minimum: -253.9940344541906 > -258.19317285772365
END: th(2144414.0411291043)=-258.19317285772365; dx=-2.863560796685014E-6 evalInputDelta=17.3333656937682
Fitness changed from -240.85980716395545 to -258.19317285772365
Iteration 8 complete. Error: -258.19317285772365 Total: 112.8243; Orientation: 2.7286; Line Search: 87.8750
Adding measurement 58d8b7d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.105e+05, gradient 1.699e-03, dot -0.716; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -258.19317285772365, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 58d8b7d1 to history. Total: 3
th(0)=-258.19317285772365;dx=-2.8864568272160425E-6
New Minimum: -258.19317285772365 > -274.618096106368
END: th(4620000.000000001)=-274.618096106368; dx=-1.7484546686463155E-6 evalInputDelta=16.424923248644347
Fitness changed from -258.19317285772365 to -274.618096106368
Iteration 9 complete. Error: -274.618096106368 Total: 68.1295; Orientation: 2.6477; Line Search: 43.5164
Adding measurement 74e9d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.227e+05, gradient 1.761e-03, dot -0.668; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -274.618096106368, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 74e9d to history. Total: 3
th(0)=-274.618096106368;dx=-3.076312953823319E-6
New Minimum: -274.618096106368 > -295.3587467432229
END: th(9953488.267947305)=-295.3587467432229; dx=-4.7544052613961695E-7 evalInputDelta=20.740650636854923
Fitness changed from -274.618096106368 to -295.3587467432229
Iteration 10 complete. Error: -295.3587467432229 Total: 68.5165; Orientation: 2.6443; Line Search: 43.9639
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c2b16911-0110-4d29-905c-79668e2669b8.jpg)
Adding measurement 662be463 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.181e+05, gradient 2.326e-03, dot -0.467; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -295.3587467432229, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 662be463 to history. Total: 3
th(0)=-295.3587467432229;dx=-5.375453375498734E-6
Armijo: th(2.1444140411291044E7)=-265.3663476610163; dx=1.7854507467599333E-6 evalInputDelta=-29.992399082206646
New Minimum: -295.3587467432229 > -304.1457738356271
WOLF (strong): th(1.0722070205645522E7)=-304.1457738356271; dx=2.0933669338872128E-6 evalInputDelta=8.787027092404173
New Minimum: -304.1457738356271 > -315.99135808251117
END: th(3574023.4018818405)=-315.99135808251117; dx=-1.5820012792202723E-6 evalInputDelta=20.632611339288246
Fitness changed from -295.3587467432229 to -315.99135808251117
Iteration 11 complete. Error: -315.99135808251117 Total: 112.3421; Orientation: 2.6405; Line Search: 87.4028
Adding measurement 67955c5f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.242e+05, gradient 1.572e-03, dot -0.629; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -315.99135808251117, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 67955c5f to history. Total: 3
th(0)=-315.99135808251117;dx=-2.4548732688493555E-6
New Minimum: -315.99135808251117 > -333.7460183382277
END: th(7700000.000000002)=-333.7460183382277; dx=-6.590299993611296E-7 evalInputDelta=17.754660255716544
Fitness changed from -315.99135808251117 to -333.7460183382277
Iteration 12 complete. Error: -333.7460183382277 Total: 69.6126; Orientation: 2.6474; Line Search: 45.5261
Adding measurement 258d5938 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.323e+05, gradient 1.831e-03, dot -0.524; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -333.7460183382277, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 258d5938 to history. Total: 3
th(0)=-333.7460183382277;dx=-3.3478676432422364E-6
Armijo: th(1.658914711324551E7)=-330.1347819891448; dx=1.2012826916423464E-6 evalInputDelta=-3.611236349082901
New Minimum: -333.7460183382277 > -345.8292918303668
WOLF (strong): th(8294573.556622755)=-345.8292918303668; dx=6.659982314787848E-7 evalInputDelta=12.083273492139085
END: th(2764857.852207585)=-344.7241795865596; dx=-1.5202841972368362E-6 evalInputDelta=10.9781612483319
Fitness changed from -333.7460183382277 to -345.8292918303668
Iteration 13 complete. Error: -345.8292918303668 Total: 111.6821; Orientation: 2.6509; Line Search: 87.3824
Adding measurement 40092f8a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.286e+05, gradient 2.167e-03, dot -0.423; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -345.8292918303668, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 40092f8a to history. Total: 3
th(0)=-345.8292918303668;dx=-4.697597815085354E-6
New Minimum: -345.8292918303668 > -366.08868010583825
WOLF (strong): th(5956705.669803068)=-366.08868010583825; dx=6.262744753725728E-7 evalInputDelta=20.25938827547145
END: th(2978352.834901534)=-362.9891161118607; dx=-2.1576188285335355E-6 evalInputDelta=17.15982428149391
Fitness changed from -345.8292918303668 to -366.08868010583825
Iteration 14 complete. Error: -366.08868010583825 Total: 89.6918; Orientation: 2.6607; Line Search: 65.3693
Adding measurement 43a7c9a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.309e+05, gradient 1.710e-03, dot -0.494; [07c78d0c-a138-47ed-8a42-ff59ff404836 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -366.08868010583825, -125.2294401468341, -79.88072063339007, -42.675912984222684
LBFGS Accumulation History: 3 points
Removed measurement 43a7c9a2 to history. Total: 3
th(0)=-366.08868010583825;dx=-2.9201631802358913E-6
New Minimum: -366.08868010583825 > -379.1446012939843
WOLF (strong): th(6416666.666666669)=-379.1446012939843; dx=2.2185325571063194E-7 evalInputDelta=13.055921188146044
END: th(3208333.3333333344)=-377.05263820100083; dx=-1.210661208074187E-6 evalInputDelta=10.963958095162582
Fitness changed from -366.08868010583825 to -379.1446012939843
Iteration 15 complete. Error: -379.1446012939843 Total: 90.6694; Orientation: 2.6536; Line Search: 65.9404
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/53dfd811-6860-4e85-afe3-f5fab1a50e3a.jpg)
Final threshold in iteration 16: -379.1446012939843 (> -Infinity) after 1566.208s (< 5400.000s)

Returns

    -379.1446012939843