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 54.26 seconds (0.752 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: 454025606676800
Reset training subject: 454026505686400
Adding measurement 19b250cf to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-30.499042675499453;dx=-1.6518820192586517E-5
New Minimum: -30.499042675499453 > -30.49908139011487
WOLFE (weak): th(2.154434690031884)=-30.49908139011487; dx=-1.6592687869618494E-5 evalInputDelta=3.8714615417489995E-5
New Minimum: -30.49908139011487 > -30.499120104681147
WOLFE (weak): th(4.308869380063768)=-30.499120104681147; dx=-1.6577509030633485E-5 evalInputDelta=7.742918169384438E-5
New Minimum: -30.499120104681147 > -30.499276101112013
WOLFE (weak): th(12.926608140191302)=-30.499276101112013; dx=-1.6461863748760515E-5 evalInputDelta=2.3342561256001204E-4
New Minimum: -30.499276101112013 > -30.49997750586183
WOLFE (weak): th(51.70643256076521)=-30.49997750586183; dx=-1.658982437944506E-5 evalInputDelta=9.34830362375294E-4
New Minimum: -30.49997750586183 > -30.503718817801843
WOLFE (weak): th(258.53216280382605)=-30.503718817801843; dx=-1.6556611227361397E-5 evalInputDelta=0.004676142302390218
New Minimum: -30.503718817801843 > -30.52709333541567
WOLFE (weak): th(1551.1929768229563)=-30.52709333541567; dx=-1.6581828595310423E-5 evalInputDelta=0.028050659916218024
New Minimum: -30.52709333541567 > -30.695603433867806
WOLFE (weak): th(10858.350837760694)=-30.695603433867806; dx=-1.6560701078967697E-5 evalInputDelta=0.19656075836835285
New Minimum: -30.695603433867806 > -32.061575068821206
WOLFE (weak): th(86866.80670208555)=-32.061575068821206; dx=-1.6104219413284654E-5 evalInputDelta=1.562532393321753
New Minimum: -32.061575068821206 > -40.34824645623997
END: th(781801.26031877)=-40.34824645623997; dx=-8.35216775788509E-6 evalInputDelta=9.849203780740517
Fitness changed from -30.499042675499453 to -40.34824645623997
Iteration 1 complete. Error: -40.34824645623997 Total: 10.2103; Orientation: 0.0198; Line Search: 7.8048
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4084f244-fcc2-4fff-abbc-bf999007140b.jpg)
Adding measurement 609215c5 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-40.34824645623997;dx=-1.6321724755735713E-5
New Minimum: -40.34824645623997 > -47.915561724323176
END: th(1684339.7559414052)=-47.915561724323176; dx=-4.036772949958501E-6 evalInputDelta=7.567315268083206
Fitness changed from -40.34824645623997 to -47.915561724323176
Iteration 2 complete. Error: -47.915561724323176 Total: 2.4043; Orientation: 0.0129; Line Search: 1.5632
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5039a5ba-e002-4d54-b2e9-55342605af50.jpg)
Adding measurement 2645c771 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-47.915561724323176;dx=-1.3540195668891604E-5
New Minimum: -47.915561724323176 > -53.56506872220139
END: th(3628800.0)=-53.56506872220139; dx=-1.8079543631023273E-6 evalInputDelta=5.649506997878213
Fitness changed from -47.915561724323176 to -53.56506872220139
Iteration 3 complete. Error: -53.56506872220139 Total: 2.5809; Orientation: 0.0147; Line Search: 1.5463
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/975e984c-7bf2-4bee-9e54-7739ff2b0976.jpg)
Adding measurement 25a67f74 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.245e+04, gradient 3.192e-03, dot -0.238; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.56506872220139, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement 25a67f74 to history. Total: 3
th(0)=-53.56506872220139;dx=-1.0103011563347076E-5
New Minimum: -53.56506872220139 > -63.762015141483616
END: th(7818012.6031877)=-63.762015141483616; dx=-7.617027456112003E-7 evalInputDelta=10.196946419282227
Fitness changed from -53.56506872220139 to -63.762015141483616
Iteration 4 complete. Error: -63.762015141483616 Total: 2.6178; Orientation: 0.2657; Line Search: 1.5240
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/894cb58f-5d8e-4cf6-b0a7-dc87e935a2c5.jpg)
Adding measurement a3f7e35 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.733e+03, gradient 2.646e-03, dot -0.224; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.762015141483616, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement a3f7e35 to history. Total: 3
th(0)=-63.762015141483616;dx=-6.983057646943252E-6
New Minimum: -63.762015141483616 > -78.9163369346917
END: th(1.684339755941405E7)=-78.9163369346917; dx=-3.4360163699401644E-7 evalInputDelta=15.154321793208084
Fitness changed from -63.762015141483616 to -78.9163369346917
Iteration 5 complete. Error: -78.9163369346917 Total: 2.7974; Orientation: 0.2651; Line Search: 1.7213
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/24edd488-b690-49c5-b09d-2c2b2c4f0180.jpg)
Adding measurement 6d11b988 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.762e+03, gradient 2.088e-03, dot -0.212; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.9163369346917, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement 6d11b988 to history. Total: 3
th(0)=-78.9163369346917;dx=-4.326962399638341E-6
New Minimum: -78.9163369346917 > -105.37093007006693
END: th(3.6288E7)=-105.37093007006693; dx=-1.2846038837644283E-7 evalInputDelta=26.454593135375234
Fitness changed from -78.9163369346917 to -105.37093007006693
Iteration 6 complete. Error: -105.37093007006693 Total: 2.7158; Orientation: 0.2652; Line Search: 1.6077
Adding measurement 6f2cf125 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.272e+03, gradient 1.605e-03, dot -0.112; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -105.37093007006693, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement 6f2cf125 to history. Total: 3
th(0)=-105.37093007006693;dx=-2.567248722536532E-6
New Minimum: -105.37093007006693 > -129.87878396484228
END: th(7.8180126031877E7)=-129.87878396484228; dx=-1.684543992699771E-8 evalInputDelta=24.50785389477535
Fitness changed from -105.37093007006693 to -129.87878396484228
Iteration 7 complete. Error: -129.87878396484228 Total: 2.5510; Orientation: 0.2511; Line Search: 1.5550
Adding measurement 52b41e4f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.352e+04, gradient 1.093e-03, dot -0.047; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -129.87878396484228, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement 52b41e4f to history. Total: 3
th(0)=-129.87878396484228;dx=-1.1904070941792154E-6
New Minimum: -129.87878396484228 > -146.62705303125847
WOLF (strong): th(1.6843397559414053E8)=-146.62705303125847; dx=4.780748001370053E-9 evalInputDelta=16.748269066416185
New Minimum: -146.62705303125847 > -156.03419110912253
END: th(8.421698779707026E7)=-156.03419110912253; dx=-3.425899418432948E-8 evalInputDelta=26.155407144280247
Fitness changed from -129.87878396484228 to -156.03419110912253
Iteration 8 complete. Error: -156.03419110912253 Total: 3.4991; Orientation: 0.2525; Line Search: 2.4949
Adding measurement 6bca8d9d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.312e+04, gradient 7.220e-04, dot -0.036; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -156.03419110912253, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement 6bca8d9d to history. Total: 3
th(0)=-156.03419110912253;dx=-5.169366238905097E-7
New Minimum: -156.03419110912253 > -162.10677610731773
WOLF (strong): th(1.8144000000000003E8)=-162.10677610731773; dx=4.5295342665216575E-9 evalInputDelta=6.072584998195197
New Minimum: -162.10677610731773 > -169.20012286018664
END: th(9.072000000000001E7)=-169.20012286018664; dx=-2.048787455692831E-8 evalInputDelta=13.165931751064107
Fitness changed from -156.03419110912253 to -169.20012286018664
Iteration 9 complete. Error: -169.20012286018664 Total: 3.3456; Orientation: 0.2678; Line Search: 2.3073
Adding measurement 5ab8dadb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.383e+04, gradient 5.170e-04, dot -0.035; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -169.20012286018664, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement 5ab8dadb to history. Total: 3
th(0)=-169.20012286018664;dx=-2.6041802107768173E-7
New Minimum: -169.20012286018664 > -169.97444983195828
WOLF (strong): th(1.9545031507969254E8)=-169.97444983195828; dx=4.081230721512039E-9 evalInputDelta=0.774326971771643
New Minimum: -169.97444983195828 > -174.7454969967133
END: th(9.772515753984627E7)=-174.7454969967133; dx=-1.0439936674326434E-8 evalInputDelta=5.545374136526675
Fitness changed from -169.20012286018664 to -174.7454969967133
Iteration 10 complete. Error: -174.7454969967133 Total: 3.5253; Orientation: 0.2676; Line Search: 2.4943
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a104e3cb-d292-40f6-97ae-2e236d09108f.jpg)
Adding measurement 5e3cb531 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.068e+04, gradient 3.873e-04, dot -0.034; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -174.7454969967133, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement 5e3cb531 to history. Total: 3
th(0)=-174.7454969967133;dx=-1.468731627215608E-7
Armijo: th(2.1054246949267572E8)=-174.21185986900318; dx=3.884176599087306E-9 evalInputDelta=-0.5336371277101364
New Minimum: -174.7454969967133 > -177.69747558484806
END: th(1.0527123474633786E8)=-177.69747558484806; dx=-5.093437766507104E-9 evalInputDelta=2.9519785881347502
Fitness changed from -174.7454969967133 to -177.69747558484806
Iteration 11 complete. Error: -177.69747558484806 Total: 3.3834; Orientation: 0.2579; Line Search: 2.3007
Adding measurement f4321af to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.767e+04, gradient 2.978e-04, dot -0.035; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -177.69747558484806, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement f4321af to history. Total: 3
th(0)=-177.69747558484806;dx=-8.569351666619987E-8
Armijo: th(2.268000000000001E8)=-177.37479383500977; dx=2.7741120072400355E-9 evalInputDelta=-0.3226817498382957
New Minimum: -177.69747558484806 > -179.2945377993071
END: th(1.1340000000000004E8)=-179.2945377993071; dx=-3.1271511536287684E-9 evalInputDelta=1.5970622144590436
Fitness changed from -177.69747558484806 to -179.2945377993071
Iteration 12 complete. Error: -179.2945377993071 Total: 3.4065; Orientation: 0.2517; Line Search: 2.4428
Adding measurement 85291b6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.477e+04, gradient 2.304e-04, dot -0.034; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -179.2945377993071, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement 85291b6 to history. Total: 3
th(0)=-179.2945377993071;dx=-5.2437356746856494E-8
Armijo: th(2.4431289384961572E8)=-178.066410662275; dx=1.8764475629544244E-9 evalInputDelta=-1.2281271370321178
New Minimum: -179.2945377993071 > -179.7441800842967
END: th(1.2215644692480786E8)=-179.7441800842967; dx=-1.4597616941481493E-9 evalInputDelta=0.44964228498957937
Fitness changed from -179.2945377993071 to -179.7441800842967
Iteration 13 complete. Error: -179.7441800842967 Total: 3.5283; Orientation: 0.2832; Line Search: 2.4130
Adding measurement 1dec8011 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.348e+04, gradient 1.847e-04, dot -0.036; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -179.7441800842967, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement 1dec8011 to history. Total: 3
th(0)=-179.7441800842967;dx=-3.3185214370530114E-8
New Minimum: -179.7441800842967 > -179.88168003799262
WOLF (strong): th(2.631780868658447E8)=-179.88168003799262; dx=1.163071215439795E-9 evalInputDelta=0.13749995369593648
New Minimum: -179.88168003799262 > -180.85019347204894
END: th(1.3158904343292235E8)=-180.85019347204894; dx=-1.0472025926153292E-9 evalInputDelta=1.106013387752256
Fitness changed from -179.7441800842967 to -180.85019347204894
Iteration 14 complete. Error: -180.85019347204894 Total: 3.3147; Orientation: 0.2721; Line Search: 2.2867
Adding measurement 4649ecd6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.848e+03, gradient 1.569e-04, dot -0.032; [06f9a3cf-3a16-42a4-90bb-7765788772ef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -180.85019347204894, -47.915561724323176, -40.34824645623997, -30.499042675499453
LBFGS Accumulation History: 3 points
Removed measurement 4649ecd6 to history. Total: 3
th(0)=-180.85019347204894;dx=-2.3795036518222447E-8
Armijo: th(2.835000000000002E8)=-179.72889581826354; dx=6.451004238578074E-10 evalInputDelta=-1.1212976537854047
Armijo: th(1.417500000000001E8)=-180.84790756166274; dx=-6.557576519505975E-10 evalInputDelta=-0.0022859103862060692
New Minimum: -180.85019347204894 > -181.36163388893064
END: th(4.725000000000003E7)=-181.36163388893064; dx=-6.096514642620675E-9 evalInputDelta=0.5114404168816975
Fitness changed from -180.85019347204894 to -181.36163388893064
Iteration 15 complete. Error: -181.36163388893064 Total: 4.3161; Orientation: 0.2370; Line Search: 3.0906
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/7919377c-d904-46a2-ae9f-e1716879f436.jpg)
Final threshold in iteration 16: -181.36163388893064 (> -Infinity) after 54.264s (< 5400.000s)

Returns

    -181.36163388893064