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

Iteration 20 Iteration 20

BasicOptimizer.scala:89 executed in 277.13 seconds (4.210 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: 2843464290345
Reset training subject: 2844590432239
Adding measurement 527e4979 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.5417151895826966;dx=-7.136746081285535E-5
New Minimum: -2.5417151895826966 > -2.5418515787070852
WOLFE (weak): th(2.154434690031884)=-2.5418515787070852; dx=-7.136306865520044E-5 evalInputDelta=1.3638912438862505E-4
New Minimum: -2.5418515787070852 > -2.5419881925807553
WOLFE (weak): th(4.308869380063768)=-2.5419881925807553; dx=-7.128065854983724E-5 evalInputDelta=2.730029980586579E-4
New Minimum: -2.5419881925807553 > -2.5425344973318262
WOLFE (weak): th(12.926608140191302)=-2.5425344973318262; dx=-7.140563610282167E-5 evalInputDelta=8.193077491296386E-4
New Minimum: -2.5425344973318262 > -2.544988520088782
WOLFE (weak): th(51.70643256076521)=-2.544988520088782; dx=-7.07847523581488E-5 evalInputDelta=0.003273330506085248
New Minimum: -2.544988520088782 > -2.558117055878759
WOLFE (weak): th(258.53216280382605)=-2.558117055878759; dx=-7.026838753805816E-5 evalInputDelta=0.01640186629606255
New Minimum: -2.558117055878759 > -2.638303476889641
WOLFE (weak): th(1551.1929768229563)=-2.638303476889641; dx=-6.546426427094639E-5 evalInputDelta=0.09658828730694458
New Minimum: -2.638303476889641 > -3.0540545869928932
END: th(10858.350837760694)=-3.0540545869928932; dx=-3.2331283837927675E-5 evalInputDelta=0.5123393974101966
Fitness changed from -2.5417151895826966 to -3.0540545869928932
Iteration 1 complete. Error: -3.0540545869928932 Total: 12.5527; Orientation: 0.0209; Line Search: 9.1789
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d1ed3427-087a-4da0-9115-7b6c7dd3d4d7.jpg)
Adding measurement 4e0b11bf to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-3.0540545869928932;dx=-5.760783587646056E-5
New Minimum: -3.0540545869928932 > -3.621273249783341
END: th(23393.607721408407)=-3.621273249783341; dx=-1.0016540360978965E-5 evalInputDelta=0.5672186627904479
Fitness changed from -3.0540545869928932 to -3.621273249783341
Iteration 2 complete. Error: -3.621273249783341 Total: 3.4379; Orientation: 0.0196; Line Search: 2.2806
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/9b2a2174-45e4-4a62-892b-a14da3e37378.jpg)
Adding measurement 15087bec to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-3.621273249783341;dx=-1.0811315236111292E-4
New Minimum: -3.621273249783341 > -4.30687551959903
WOLF (strong): th(50400.00000000001)=-4.30687551959903; dx=4.016873965040937E-6 evalInputDelta=0.6856022698156892
New Minimum: -4.30687551959903 > -4.329392390904464
WOLF (strong): th(25200.000000000004)=-4.329392390904464; dx=3.6226451896130733E-6 evalInputDelta=0.7081191411211227
END: th(8400.000000000002)=-4.212614870790402; dx=-4.2484545364182655E-5 evalInputDelta=0.5913416210070608
Fitness changed from -3.621273249783341 to -4.329392390904464
Iteration 3 complete. Error: -4.329392390904464 Total: 5.6701; Orientation: 0.0199; Line Search: 4.5307
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/3170d548-e33c-4a15-b4b8-2a6a17830675.jpg)
Adding measurement 37501bed to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.916e+02, gradient 1.436e-02, dot -0.269; [564c6017-b895-4c67-97be-14df515b5823 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.329392390904464, -3.621273249783341, -3.0540545869928932, -2.5417151895826966
LBFGS Accumulation History: 3 points
Removed measurement 37501bed to history. Total: 3
th(0)=-4.329392390904464;dx=-2.0593445305660364E-4
New Minimum: -4.329392390904464 > -5.335688415269594
END: th(18097.251396267828)=-5.335688415269594; dx=-1.1029075528984128E-5 evalInputDelta=1.0062960243651302
Fitness changed from -4.329392390904464 to -5.335688415269594
Iteration 4 complete. Error: -5.335688415269594 Total: 3.8859; Orientation: 0.4793; Line Search: 2.2921
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c97a8312-c3e5-4a20-99e5-593352695182.jpg)
Adding measurement 48beeee5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.810e+03, gradient 1.549e-02, dot -0.270; [564c6017-b895-4c67-97be-14df515b5823 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.335688415269594, -3.621273249783341, -3.0540545869928932, -2.5417151895826966
LBFGS Accumulation History: 3 points
Removed measurement 48beeee5 to history. Total: 3
th(0)=-5.335688415269594;dx=-2.398578558698031E-4
New Minimum: -5.335688415269594 > -6.489946158908586
WOLF (strong): th(38989.346202347355)=-6.489946158908586; dx=2.209675904590924E-5 evalInputDelta=1.1542577436389916
New Minimum: -6.489946158908586 > -6.881485771287675
END: th(19494.673101173677)=-6.881485771287675; dx=-1.941513834845298E-5 evalInputDelta=1.545797356018081
Fitness changed from -5.335688415269594 to -6.881485771287675
Iteration 5 complete. Error: -6.881485771287675 Total: 5.0467; Orientation: 0.4744; Line Search: 3.4536
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/eed2d235-7d11-4c10-82a2-6ad445f48063.jpg)
Adding measurement 2c018104 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.279e+03, gradient 1.767e-02, dot -0.257; [564c6017-b895-4c67-97be-14df515b5823 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.881485771287675, -3.621273249783341, -3.0540545869928932, -2.5417151895826966
LBFGS Accumulation History: 3 points
Removed measurement 2c018104 to history. Total: 3
th(0)=-6.881485771287675;dx=-3.1193687433910954E-4
New Minimum: -6.881485771287675 > -8.650055544368588
WOLF (strong): th(42000.000000000015)=-8.650055544368588; dx=1.297911093106888E-5 evalInputDelta=1.7685697730809125
New Minimum: -8.650055544368588 > -8.978465776948957
END: th(21000.000000000007)=-8.978465776948957; dx=-2.787075058824297E-6 evalInputDelta=2.0969800056612815
Fitness changed from -6.881485771287675 to -8.978465776948957
Iteration 6 complete. Error: -8.978465776948957 Total: 4.9948; Orientation: 0.4762; Line Search: 3.4153
Adding measurement 7f07ee4c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.093e+03, gradient 2.347e-02, dot -0.161; [564c6017-b895-4c67-97be-14df515b5823 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.978465776948957, -3.621273249783341, -3.0540545869928932, -2.5417151895826966
LBFGS Accumulation History: 3 points
Removed measurement 7f07ee4c to history. Total: 3
th(0)=-8.978465776948957;dx=-5.508335745640875E-4
New Minimum: -8.978465776948957 > -9.65997298045827
WOLF (strong): th(45243.12849066957)=-9.65997298045827; dx=2.868977535798702E-5 evalInputDelta=0.6815072035093142
New Minimum: -9.65997298045827 > -10.663295543580206
WOLF (strong): th(22621.564245334786)=-10.663295543580206; dx=2.005660653997965E-5 evalInputDelta=1.6848297666312497
New Minimum: -10.663295543580206 > -11.009861617643306
END: th(7540.521415111595)=-11.009861617643306; dx=-8.228890949970147E-5 evalInputDelta=2.0313958406943495
Fitness changed from -8.978465776948957 to -11.009861617643306
Iteration 7 complete. Error: -11.009861617643306 Total: 6.2651; Orientation: 0.4803; Line Search: 4.5685
Adding measurement 23a7168a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.304e+06, gradient 1.888e-02, dot -0.215; [564c6017-b895-4c67-97be-14df515b5823 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.009861617643306, -3.621273249783341, -3.0540545869928932, -2.5417151895826966
LBFGS Accumulation History: 3 points
Removed measurement 23a7168a to history. Total: 3
th(0)=-11.009861617643306;dx=-3.562881666401706E-4
New Minimum: -11.009861617643306 > -12.679406823642308
WOLF (strong): th(16245.56091764473)=-12.679406823642308; dx=2.3350121259123905E-5 evalInputDelta=1.6695452059990021
END: th(8122.780458822365)=-12.652436697051014; dx=-9.332013432547081E-5 evalInputDelta=1.6425750794077079
Fitness changed from -11.009861617643306 to -12.679406823642308
Iteration 8 complete. Error: -12.679406823642308 Total: 6.1878; Orientation: 1.5171; Line Search: 3.5901
Adding measurement 363f81a9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.807e+04, gradient 2.53

...skipping 20565 bytes...

105839603999E-6
Armijo: th(7.818012603187701E-4)=-40.28573236145328; dx=-0.001023643499531542 evalInputDelta=0.0
WOLFE (weak): th(4.2999069317532356E-4)=-40.28573735966481; dx=-0.0010233704501855204 evalInputDelta=4.998211529994023E-6
WOLFE (weak): th(6.058959767470468E-4)=-40.28573486055912; dx=-0.0010234292671793472 evalInputDelta=2.499105839603999E-6
Armijo: th(6.938486185329084E-4)=-40.28573236145328; dx=-0.0010234753039327724 evalInputDelta=0.0
Armijo: th(6.498722976399777E-4)=-40.28573236145328; dx=-0.001023687596778412 evalInputDelta=0.0
WOLFE (weak): th(6.278841371935122E-4)=-40.28573735966481; dx=-0.0010236056703534192 evalInputDelta=4.998211529994023E-6
WOLFE (weak): th(6.388782174167449E-4)=-40.28573486055912; dx=-0.0010235309829096147 evalInputDelta=2.499105839603999E-6
Armijo: th(6.443752575283612E-4)=-40.28573236145328; dx=-0.0010233751596229255 evalInputDelta=0.0
Armijo: th(6.41626737472553E-4)=-40.28573236145328; dx=-0.00102353627896148 evalInputDelta=0.0
Armijo: th(6.402524774446489E-4)=-40.28573236145328; dx=-0.0010234142283877846 evalInputDelta=0.0
WOLFE (weak): th(6.39565347430697E-4)=-40.28573486055912; dx=-0.0010232212105460593 evalInputDelta=2.499105839603999E-6
WOLFE (weak): th(6.39908912437673E-4)=-40.28573486055912; dx=-0.001023314086375372 evalInputDelta=2.499105839603999E-6
Armijo: th(6.400806949411609E-4)=-40.28573236145328; dx=-0.001023183908703212 evalInputDelta=0.0
Armijo: th(6.39994803689417E-4)=-40.28573236145328; dx=-0.0010233324327496582 evalInputDelta=0.0
Armijo: th(6.39951858063545E-4)=-40.28573236145328; dx=-0.0010232794649481058 evalInputDelta=0.0
Armijo: th(6.399303852506089E-4)=-40.28573236145328; dx=-0.001023445280651822 evalInputDelta=0.0
WOLFE (weak): th(6.399196488441409E-4)=-40.28573486055912; dx=-0.0010237214760493846 evalInputDelta=2.499105839603999E-6
Armijo: th(6.39925017047375E-4)=-40.28573236145328; dx=-0.0010237032885051956 evalInputDelta=0.0
mu ~= nu (6.399196488441409E-4): th(8.686680670208556E-6)=-40.28573735966481
Fitness changed from -40.28573236145328 to -40.28573735966481
Iteration 23 complete. Error: -40.28573735966481 Total: 36.9422; Orientation: 0.0222; Line Search: 33.5796
Adding measurement 210fc6cf to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-40.28573735966481;dx=-0.0010238449950973848
Armijo: th(0.0013786708730244741)=-40.28573735966481; dx=-0.0010232421904348484 evalInputDelta=0.0
Armijo: th(6.893354365122371E-4)=-40.28573735966481; dx=-0.0010234208843748318 evalInputDelta=0.0
Armijo: th(2.2977847883741236E-4)=-40.28573735966481; dx=-0.001023150568587389 evalInputDelta=0.0
Armijo: th(5.744461970935309E-5)=-40.28573236145328; dx=-0.0010235979664435795 evalInputDelta=-4.998211529994023E-6
Armijo: th(1.1488923941870617E-5)=-40.28573236145328; dx=-0.0010234476516551242 evalInputDelta=-4.998211529994023E-6
WOLFE (weak): th(1.9148206569784364E-6)=-40.28573735966481; dx=-0.001023358809558665 evalInputDelta=0.0
Armijo: th(6.701872299424527E-6)=-40.28573236145328; dx=-0.0010234798978527681 evalInputDelta=-4.998211529994023E-6
Armijo: th(4.308346478201481E-6)=-40.28573236145328; dx=-0.0010235120343347615 evalInputDelta=-4.998211529994023E-6
Armijo: th(3.1115835675899586E-6)=-40.28573486055912; dx=-0.0010234456789498666 evalInputDelta=-2.4991056903900244E-6
WOLFE (weak): th(2.5132021122841973E-6)=-40.28573735966481; dx=-0.001022872065213036 evalInputDelta=0.0
Armijo: th(2.812392839937078E-6)=-40.28573486055912; dx=-0.0010235480383194069 evalInputDelta=-2.4991056903900244E-6
WOLFE (weak): th(2.6627974761106376E-6)=-40.28573735966481; dx=-0.0010231282335809745 evalInputDelta=0.0
Armijo: th(2.737595158023858E-6)=-40.28573486055912; dx=-0.001023200905706493 evalInputDelta=-2.4991056903900244E-6
WOLFE (weak): th(2.7001963170672477E-6)=-40.28573735966481; dx=-0.0010234313190169678 evalInputDelta=0.0
Armijo: th(2.7188957375455528E-6)=-40.28573486055912; dx=-0.0010234290170326535 evalInputDelta=-2.4991056903900244E-6
Armijo: th(2.7095460273064E-6)=-40.28573486055912; dx=-0.0010233145033510898 evalInputDelta=-2.4991056903900244E-6
WOLFE (weak): th(2.704871172186824E-6)=-40.28573735966481; dx=-0.0010234006318875833 evalInputDelta=0.0
Armijo: th(2.7072085997466117E-6)=-40.28573486055912; dx=-0.0010235599592695532 evalInputDelta=-2.4991056903900244E-6
Armijo: th(2.7060398859667176E-6)=-40.28573486055912; dx=-0.0010232215840753037 evalInputDelta=-2.4991056903900244E-6
Armijo: th(2.7054555290767705E-6)=-40.28573486055912; dx=-0.0010234565023929608 evalInputDelta=-2.4991056903900244E-6
WOLFE (weak): th(2.705163350631797E-6)=-40.28573735966481; dx=-0.0010233985920918333 evalInputDelta=0.0
Armijo: th(2.7053094398542838E-6)=-40.28573486055912; dx=-0.0010228725759747147 evalInputDelta=-2.4991056903900244E-6
Armijo: th(2.7052363952430404E-6)=-40.28573486055912; dx=-0.0010235604258567491 evalInputDelta=-2.4991056903900244E-6
Armijo: th(2.7051998729374185E-6)=-40.28573486055912; dx=-0.0010233067318089273 evalInputDelta=-2.4991056903900244E-6
Armijo: th(2.7051816117846077E-6)=-40.28573486055912; dx=-0.0010231581709362286 evalInputDelta=-2.4991056903900244E-6
mu ~= nu (2.705163350631797E-6): th(0.0)=-40.28573735966481
Fitness changed from -40.28573735966481 to -40.28573735966481
Static Iteration Total: 32.3278; Orientation: 0.0202; Line Search: 31.2228
Iteration 24 failed. Error: -40.28573735966481
Previous Error: 0.0 -> -40.28573735966481
Retrying iteration 24
Reset training subject: 3091824336456
Adding measurement 433d89d7 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-40.28573735966481;dx=-0.0010240072460854744
Armijo: th(5.828117436034575E-6)=-40.28573486055912; dx=-0.001023538276393371 evalInputDelta=-2.4991056903900244E-6
Armijo: th(2.9140587180172877E-6)=-40.28573486055912; dx=-0.0010234925556618962 evalInputDelta=-2.4991056903900244E-6
WOLFE (weak): th(9.713529060057626E-7)=-40.28573735966481; dx=-0.001023537593671713 evalInputDelta=0.0
WOLFE (weak): th(1.942705812011525E-6)=-40.28573735966481; dx=-0.001023202454265672 evalInputDelta=0.0
WOLFE (weak): th(2.428382265014406E-6)=-40.28573735966481; dx=-0.0010233707166260953 evalInputDelta=0.0
WOLFE (weak): th(2.671220491515847E-6)=-40.28573735966481; dx=-0.0010235594319342512 evalInputDelta=0.0
Armijo: th(2.7926396047665676E-6)=-40.28573486055912; dx=-0.0010234418808581609 evalInputDelta=-2.4991056903900244E-6
Armijo: th(2.7319300481412074E-6)=-40.28573486055912; dx=-0.001023421957673263 evalInputDelta=-2.4991056903900244E-6
WOLFE (weak): th(2.7015752698285275E-6)=-40.28573735966481; dx=-0.0010234828718364269 evalInputDelta=0.0
Armijo: th(2.716752658984867E-6)=-40.28573486055912; dx=-0.0010234848569362276 evalInputDelta=-2.4991056903900244E-6
Armijo: th(2.7091639644066973E-6)=-40.28573486055912; dx=-0.0010231220862583043 evalInputDelta=-2.4991056903900244E-6
Armijo: th(2.7053696171176124E-6)=-40.28573486055912; dx=-0.001023326825470033 evalInputDelta=-2.4991056903900244E-6
WOLFE (weak): th(2.70347244347307E-6)=-40.28573735966481; dx=-0.00102355334046853 evalInputDelta=0.0
WOLFE (weak): th(2.704421030295341E-6)=-40.28573735966481; dx=-0.0010234938315314514 evalInputDelta=0.0
WOLFE (weak): th(2.7048953237064765E-6)=-40.28573735966481; dx=-0.0010232274030709241 evalInputDelta=0.0
WOLFE (weak): th(2.7051324704120442E-6)=-40.28573735966481; dx=-0.001023278618210003 evalInputDelta=0.0
Armijo: th(2.705251043764828E-6)=-40.28573486055912; dx=-0.0010234355110337382 evalInputDelta=-2.4991056903900244E-6
Armijo: th(2.705191757088436E-6)=-40.28573486055912; dx=-0.001023102328618266 evalInputDelta=-2.4991056903900244E-6
WOLFE (weak): th(2.70516211375024E-6)=-40.28573735966481; dx=-0.0010231990543419721 evalInputDelta=0.0
WOLFE (weak): th(2.705176935419338E-6)=-40.28573735966481; dx=-0.001023213555683329 evalInputDelta=0.0
mu ~= nu (2.705176935419338E-6): th(0.0)=-40.28573735966481
Fitness changed from -40.28573735966481 to -40.28573735966481
Static Iteration Total: 28.7679; Orientation: 0.0225; Line Search: 25.4227
Iteration 25 failed. Error: -40.28573735966481
Previous Error: 0.0 -> -40.28573735966481
Optimization terminated 25
Final threshold in iteration 25: -40.28573735966481 (> -Infinity) after 277.128s (< 3600.000s)

Returns

    -40.28573735966481