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 62.46 seconds (1.230 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: 140042890529600
Reset training subject: 140043776246100
Adding measurement 3b4d43d6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-59.822562747444;dx=-0.012985302714731979
New Minimum: -59.822562747444 > -59.854121571873605
WOLFE (weak): th(2.154434690031884)=-59.854121571873605; dx=-0.012958380362827435 evalInputDelta=0.03155882442960234
New Minimum: -59.854121571873605 > -59.885700456291104
WOLFE (weak): th(4.308869380063768)=-59.885700456291104; dx=-0.013000026237833015 evalInputDelta=0.06313770884710124
New Minimum: -59.885700456291104 > -60.01175218563965
WOLFE (weak): th(12.926608140191302)=-60.01175218563965; dx=-0.012936522670860724 evalInputDelta=0.1891894381956476
New Minimum: -60.01175218563965 > -60.57955368124422
WOLFE (weak): th(51.70643256076521)=-60.57955368124422; dx=-0.013080377378298558 evalInputDelta=0.7569909338002176
New Minimum: -60.57955368124422 > -63.66680386247216
WOLFE (weak): th(258.53216280382605)=-63.66680386247216; dx=-0.013494471118976312 evalInputDelta=3.8442411150281544
New Minimum: -63.66680386247216 > -83.19478097832369
WOLFE (weak): th(1551.1929768229563)=-83.19478097832369; dx=-0.013085809578022408 evalInputDelta=23.37221823087969
New Minimum: -83.19478097832369 > -161.15273229145077
END: th(10858.350837760694)=-161.15273229145077; dx=-0.004950525938644457 evalInputDelta=101.33016954400676
Fitness changed from -59.822562747444 to -161.15273229145077
Iteration 1 complete. Error: -161.15273229145077 Total: 9.9484; Orientation: 0.0147; Line Search: 7.4135
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/2cfa70f4-690d-458c-837c-4d773b1e2b43.jpg)
Adding measurement 1e02fc6d to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-161.15273229145077;dx=-0.01647828734196751
New Minimum: -161.15273229145077 > -392.08730293775136
END: th(23393.607721408407)=-392.08730293775136; dx=-0.0028773117197397166 evalInputDelta=230.93457064630059
Fitness changed from -161.15273229145077 to -392.08730293775136
Iteration 2 complete. Error: -392.08730293775136 Total: 2.6698; Orientation: 0.0147; Line Search: 1.7455
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6c7861b6-c851-4357-912d-f0a409f98798.jpg)
Adding measurement 35549aed to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-392.08730293775136;dx=-0.02770164097591117
New Minimum: -392.08730293775136 > -583.0721975021618
WOLF (strong): th(50400.00000000001)=-583.0721975021618; dx=4.5946191300529174E-4 evalInputDelta=190.9848945644104
New Minimum: -583.0721975021618 > -655.6137153461633
END: th(25200.000000000004)=-655.6137153461633; dx=-0.0012669422384692635 evalInputDelta=263.52641240841194
Fitness changed from -392.08730293775136 to -655.6137153461633
Iteration 3 complete. Error: -655.6137153461633 Total: 3.4474; Orientation: 0.0162; Line Search: 2.5171
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f4de8e9b-40bd-448b-b562-716e1b517b80.jpg)
Adding measurement 5e60391 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.140e+04, gradient 1.651e-01, dot -0.239; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -655.6137153461633, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 5e60391 to history. Total: 3
th(0)=-655.6137153461633;dx=-0.027076590655375557
New Minimum: -655.6137153461633 > -858.3676732612896
WOLF (strong): th(54291.75418880348)=-858.3676732612896; dx=0.0018315036849935744 evalInputDelta=202.7539579151263
New Minimum: -858.3676732612896 > -974.6928682923663
END: th(27145.87709440174)=-974.6928682923663; dx=-2.1558971930255076E-4 evalInputDelta=319.07915294620295
Fitness changed from -655.6137153461633 to -974.6928682923663
Iteration 4 complete. Error: -974.6928682923663 Total: 4.1641; Orientation: 0.3138; Line Search: 2.6250
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ea7fd663-1576-44e7-9bc5-e02f0898ca63.jpg)
Adding measurement 22d375e5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.603e+04, gradient 1.662e-01, dot -0.241; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -974.6928682923663, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 22d375e5 to history. Total: 3
th(0)=-974.6928682923663;dx=-0.027538094167612052
New Minimum: -974.6928682923663 > -1027.3905659485101
WOLF (strong): th(58484.01930352103)=-1027.3905659485101; dx=0.0035991294375561384 evalInputDelta=52.69769765614387
New Minimum: -1027.3905659485101 > -1275.8083711905954
WOLF (strong): th(29242.009651760516)=-1275.8083711905954; dx=0.0014362264732286742 evalInputDelta=301.1155028982291
END: th(9747.336550586839)=-1222.23299742725; dx=-0.011757780168693359 evalInputDelta=247.54012913488373
Fitness changed from -974.6928682923663 to -1275.8083711905954
Iteration 5 complete. Error: -1275.8083711905954 Total: 4.5668; Orientation: 0.2787; Line Search: 3.3699
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8d6ca0d5-dcf9-4ac9-9e04-83cd18e74c7a.jpg)
Adding measurement 6f3d64cc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.134e+04, gradient 1.826e-01, dot -0.213; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1275.8083711905954, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 6f3d64cc to history. Total: 3
th(0)=-1275.8083711905954;dx=-0.03309501203006504
New Minimum: -1275.8083711905954 > -1582.8969486356336
END: th(21000.000000000007)=-1582.8969486356336; dx=-2.186408992481545E-4 evalInputDelta=307.08857744503825
Fitness changed from -1275.8083711905954 to -1582.8969486356336
Iteration 6 complete. Error: -1582.8969486356336 Total: 2.9682; Orientation: 0.2740; Line Search: 1.7890
Adding measurement 62404420 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.494e+04, gradient 1.665e-01, dot -0.249; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1582.8969486356336, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 62404420 to history. Total: 3
th(0)=-1582.8969486356336;dx=-0.027584849332481984
Armijo: th(45243.12849066957)=-1436.7704235541598; dx=0.006877570900015664 evalInputDelta=-146.1265250814738
New Minimum: -1582.8969486356336 > -1780.8167367811882
WOLF (strong): th(22621.564245334786)=-1780.8167367811882; dx=0.003724289688674016 evalInputDelta=197.91978814555455
END: th(7540.521415111595)=-1764.2317024699448; dx=-0.012978888368569736 evalInputDelta=181.3347538343112
Fitness changed from -1582.8969486356336 to -1780.8167367811882
Iteration 7 complete. Error: -1780.8167367811882 Total: 4.4973; Orientation: 0.2737; Line Search: 3.4099
Adding measurement 149aa003 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.963e+04, gradient 2.010e-01, dot -0.260; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1780.8167367811882, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 149aa003 to history. Total: 3
th(0)=-1780.8167367811882;dx=-0.04026047711704746
New Minimum: -1780.8167367811882 > -2012.9860282674592
WOLF (strong): th(16245.56091764473)=-2012.9860282674592; dx=0.002470358378798346 evalInputDelta=232.16929148627105
END: th(8122.780458822365)=-2012.7250184761951; dx=-0.0075964166197023345 evalInputDelta=231.90828169500696
Fitness changed from -1780.8167367811882 to -2012.9860282674592
Iteration 8 complete. Error: -2012.9860282674592 Total: 3.6507; Orientation: 0.3108; Line Search: 2.5204
Adding measurement 5a6fa408 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.610e+04, gradient 1.669e-01, dot -0.267; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2012.9860282674592, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 5a6fa408 to history. Total: 3
th(0)=-2012.9860282674592;dx=-0.027803671173013147
New Minimum: -2012.9860282674592 > -2212.1876050642722
WOLF (strong): th(17500.000000000007)=-2212.1876050642722; dx=9.93089441361784E-4 evalInputDelta=199.20157679681301
END: th(8750.000000000004)=-2191.0084436167745; dx=-0.010775068552604397 evalInputDelta=178.02241534931522
Fitness changed from -2012.9860282674592 to -2212.1876050642722
Iteration 9 complete. Error: -2212.1876050642722 Total: 3.8384; Orientation: 0.2700; Line Search: 2.7440
Adding measurement 569f3748 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.549e+05, gradient 1.762e-01, dot -0.333; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2212.1876050642722, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 569f3748 to history. Total: 3
th(0)=-2212.1876050642722;dx=-0.03094664941208975
New Minimum: -2212.1876050642722 > -2358.5844271511673
WOLF (strong): th(18851.303537778993)=-2358.5844271511673; dx=0.0018589095359191614 evalInputDelta=146.3968220868951
New Minimum: -2358.5844271511673 > -2373.0976591788212
END: th(9425.651768889496)=-2373.0976591788212; dx=-0.005004888704133747 evalInputDelta=160.91005411454898
Fitness changed from -2212.1876050642722 to -2373.0976591788212
Iteration 10 complete. Error: -2373.0976591788212 Total: 3.6684; Orientation: 0.2746; Line Search: 2.5738
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/70877655-81ee-43a2-a916-ef2b547c7d39.jpg)
Adding measurement 6e12ce35 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.914e+05, gradient 1.431e-01, dot -0.372; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2373.0976591788212, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 6e12ce35 to history. Total: 3
th(0)=-2373.0976591788212;dx=-0.02038881746010901
New Minimum: -2373.0976591788212 > -2495.2712277425876
END: th(20306.95114705592)=-2495.2712277425876; dx=-0.0021516369458196823 evalInputDelta=122.17356856376637
Fitness changed from -2373.0976591788212 to -2495.2712277425876
Iteration 11 complete. Error: -2495.2712277425876 Total: 2.9141; Orientation: 0.2743; Line Search: 1.7074
Adding measurement 3ef592f4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.163e+08, gradient 1.813e-01, dot -0.331; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2495.2712277425876, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 3ef592f4 to history. Total: 3
th(0)=-2495.2712277425876;dx=-0.03268395238371689
Armijo: th(43750.00000000003)=-2363.863997779906; dx=0.004532308196864191 evalInputDelta=-131.4072299626814
New Minimum: -2495.2712277425876 > -2564.963157630144
WOLF (strong): th(21875.000000000015)=-2564.963157630144; dx=0.00395917563951329 evalInputDelta=69.6919298875564
New Minimum: -2564.963157630144 > -2633.7768508360764
END: th(7291.6666666666715)=-2633.7768508360764; dx=-0.005212021528706417 evalInputDelta=138.5056230934888
Fitness changed from -2495.2712277425876 to -2633.7768508360764
Iteration 12 complete. Error: -2633.7768508360764 Total: 4.6883; Orientation: 0.2690; Line Search: 3.6079
Adding measurement 16459bd2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.637e+06, gradient 1.391e-01, dot -0.401; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2633.7768508360764, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 16459bd2 to history. Total: 3
th(0)=-2633.7768508360764;dx=-0.019282299732409646
New Minimum: -2633.7768508360764 > -2748.4584770376287
END: th(15709.41961481583)=-2748.4584770376287; dx=-0.005274393440643227 evalInputDelta=114.68162620155226
Fitness changed from -2633.7768508360764 to -2748.4584770376287
Iteration 13 complete. Error: -2748.4584770376287 Total: 2.8481; Orientation: 0.2743; Line Search: 1.7626
Adding measurement 4c08b041 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.072e+05, gradient 1.540e-01, dot -0.307; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2748.4584770376287, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 4c08b041 to history. Total: 3
th(0)=-2748.4584770376287;dx=-0.02366541142715275
New Minimum: -2748.4584770376287 > -2792.1334137179047
WOLF (strong): th(33844.918578426536)=-2792.1334137179047; dx=2.3503633634645762E-4 evalInputDelta=43.674936680276005
New Minimum: -2792.1334137179047 > -2839.486485264545
END: th(16922.459289213268)=-2839.486485264545; dx=-0.001346975314482194 evalInputDelta=91.02800822691643
Fitness changed from -2748.4584770376287 to -2839.486485264545
Iteration 14 complete. Error: -2839.486485264545 Total: 3.7447; Orientation: 0.2734; Line Search: 2.5552
Adding measurement 61cc3d9b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.751e+05, gradient 1.661e-01, dot -0.308; [7b835304-96ed-4be0-af61-580495aa6b44 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2839.486485264545, -392.08730293775136, -161.15273229145077, -59.822562747444
LBFGS Accumulation History: 3 points
Removed measurement 61cc3d9b to history. Total: 3
th(0)=-2839.486485264545;dx=-0.02748083649124005
Armijo: th(36458.33333333336)=-2644.7088686658876; dx=0.007242851445762501 evalInputDelta=-194.77761659865746
New Minimum: -2839.486485264545 > -2931.9761254143937
WOLF (strong): th(18229.16666666668)=-2931.9761254143937; dx=0.003969489943248767 evalInputDelta=92.48964014984858
New Minimum: -2931.9761254143937 > -2941.576278120287
END: th(6076.388888888893)=-2941.576278120287; dx=-0.010474000931680228 evalInputDelta=102.08979285574196
Fitness changed from -2839.486485264545 to -2941.576278120287
Iteration 15 complete. Error: -2941.576278120287 Total: 4.7426; Orientation: 0.3948; Line Search: 3.5174
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/eeb02489-ff99-4e1d-be5f-b41a79fc209d.jpg)
Final threshold in iteration 16: -2941.576278120287 (> -Infinity) after 62.458s (< 5400.000s)

Returns

    -2941.576278120287