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 45.93 seconds (0.890 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: 222596634463700
Reset training subject: 222597429422500
Adding measurement 55c88d71 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-91.11434694245467;dx=-0.0822583057937976
New Minimum: -91.11434694245467 > -91.22039841032225
WOLFE (weak): th(2.154434690031884)=-91.22039841032225; dx=-0.08227146940622043 evalInputDelta=0.10605146786757302
New Minimum: -91.22039841032225 > -91.32672721057376
WOLFE (weak): th(4.308869380063768)=-91.32672721057376; dx=-0.08232375103273479 evalInputDelta=0.21238026811909094
New Minimum: -91.32672721057376 > -91.75327450699682
WOLFE (weak): th(12.926608140191302)=-91.75327450699682; dx=-0.08247775335503026 evalInputDelta=0.6389275645421435
New Minimum: -91.75327450699682 > -93.69101665992743
WOLFE (weak): th(51.70643256076521)=-93.69101665992743; dx=-0.0830788012756701 evalInputDelta=2.576669717472754
New Minimum: -93.69101665992743 > -103.28791551150158
WOLFE (weak): th(258.53216280382605)=-103.28791551150158; dx=-0.07568687170298921 evalInputDelta=12.173568569046907
New Minimum: -103.28791551150158 > -149.77530282301765
END: th(1551.1929768229563)=-149.77530282301765; dx=-0.04437858739245021 evalInputDelta=58.66095588056298
Fitness changed from -91.11434694245467 to -149.77530282301765
Iteration 1 complete. Error: -149.77530282301765 Total: 6.3785; Orientation: 0.0167; Line Search: 4.3496
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ef765e82-862a-4495-af5a-7602940ad6af.jpg)
Adding measurement 3a322908 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-149.77530282301765;dx=-0.15057910496915464
New Minimum: -149.77530282301765 > -225.04388636247646
END: th(3341.943960201201)=-225.04388636247646; dx=-0.01438937295640087 evalInputDelta=75.2685835394588
Fitness changed from -149.77530282301765 to -225.04388636247646
Iteration 2 complete. Error: -225.04388636247646 Total: 1.8980; Orientation: 0.0168; Line Search: 1.2804
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/22c424e4-9d5b-4d98-bab0-6ae98fd990a4.jpg)
Adding measurement 40d8b47b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-225.04388636247646;dx=-0.14972424502552328
New Minimum: -225.04388636247646 > -252.46312699385342
END: th(7200.000000000001)=-252.46312699385342; dx=-0.0038294435904562382 evalInputDelta=27.419240631376965
Fitness changed from -225.04388636247646 to -252.46312699385342
Iteration 3 complete. Error: -252.46312699385342 Total: 2.0459; Orientation: 0.0284; Line Search: 1.4132
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/9c379b9c-63f8-487f-afda-bef53d4eb4d7.jpg)
Adding measurement 5b02c975 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.937e+03, gradient 3.166e-01, dot -0.129; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -252.46312699385342, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 5b02c975 to history. Total: 3
th(0)=-252.46312699385342;dx=-0.10018213347196189
New Minimum: -252.46312699385342 > -326.620118333959
WOLF (strong): th(15511.929768229566)=-326.620118333959; dx=9.003004299606411E-4 evalInputDelta=74.15699134010558
New Minimum: -326.620118333959 > -379.157027088622
END: th(7755.964884114783)=-379.157027088622; dx=-0.009051291483475032 evalInputDelta=126.69390009476857
Fitness changed from -252.46312699385342 to -379.157027088622
Iteration 4 complete. Error: -379.157027088622 Total: 3.2295; Orientation: 0.3109; Line Search: 2.2804
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/874de64a-df9c-4545-9f20-78ec1c01fd2a.jpg)
Adding measurement 2d22e2ab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.710e+03, gradient 3.172e-01, dot -0.129; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -379.157027088622, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 2d22e2ab to history. Total: 3
th(0)=-379.157027088622;dx=-0.10023231650117473
New Minimum: -379.157027088622 > -418.78178546261745
WOLF (strong): th(16709.71980100601)=-418.78178546261745; dx=0.0029895752262742 evalInputDelta=39.62475837399546
New Minimum: -418.78178546261745 > -509.62736573834275
END: th(8354.859900503005)=-509.62736573834275; dx=-0.008335243474300784 evalInputDelta=130.47033864972076
Fitness changed from -379.157027088622 to -509.62736573834275
Iteration 5 complete. Error: -509.62736573834275 Total: 2.8386; Orientation: 0.3225; Line Search: 1.8793
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b24e4330-c3f3-4de3-b159-41e24163ed83.jpg)
Adding measurement 50d83400 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.601e+03, gradient 3.228e-01, dot -0.135; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -509.62736573834275, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 50d83400 to history. Total: 3
th(0)=-509.62736573834275;dx=-0.10393480261117391
Armijo: th(18000.000000000007)=-489.9065356979213; dx=0.00479814172508973 evalInputDelta=-19.720830040421447
New Minimum: -509.62736573834275 > -615.9110295245823
END: th(9000.000000000004)=-615.9110295245823; dx=-0.006765948675441311 evalInputDelta=106.28366378623957
Fitness changed from -509.62736573834275 to -615.9110295245823
Iteration 6 complete. Error: -615.9110295245823 Total: 3.8906; Orientation: 0.4787; Line Search: 2.7607
Adding measurement 9391dfe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.731e+03, gradient 3.235e-01, dot -0.130; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -615.9110295245823, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 9391dfe to history. Total: 3
th(0)=-615.9110295245823;dx=-0.10456787591676842
Armijo: th(19389.912210286962)=-589.3331975309599; dx=0.0047917272934332525 evalInputDelta=-26.577831993622453
New Minimum: -615.9110295245823 > -736.674041798406
END: th(9694.956105143481)=-736.674041798406; dx=-0.006495543517852602 evalInputDelta=120.76301227382373
Fitness changed from -615.9110295245823 to -736.674041798406
Iteration 7 complete. Error: -736.674041798406 Total: 2.8446; Orientation: 0.3494; Line Search: 1.9046
Adding measurement 6afe4684 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.408e+03, gradient 3.141e-01, dot -0.118; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -736.674041798406, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 6afe4684 to history. Total: 3
th(0)=-736.674041798406;dx=-0.09859336878440611
Armijo: th(20887.149751257515)=-694.1593014451967; dx=0.005377465790064083 evalInputDelta=-42.51474035320939
New Minimum: -736.674041798406 > -857.6155102295945
END: th(10443.574875628758)=-857.6155102295945; dx=-0.007258340005212127 evalInputDelta=120.94146843118847
Fitness changed from -736.674041798406 to -857.6155102295945
Iteration 8 complete. Error: -857.6155102295945 Total: 3.1404; Orientation: 0.3460; Line Search: 2.1996
Adding measurement 1baf5d53 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.190e+03, gradient 3.019e-01, dot -0.113; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -857.6155102295945, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 1baf5d53 to history. Total: 3
th(0)=-857.6155102295945;dx=-0.09109860251896482
Armijo: th(22500.00000000001)=-776.893698033975; dx=0.005954897333448568 evalInputDelta=-80.72181219561946
New Minimum: -857.6155102295945 > -979.0059279063007
END: th(11250.000000000005)=-979.0059279063007; dx=-0.007889131822431072 evalInputDelta=121.39041767670619
Fitness changed from -857.6155102295945 to -979.0059279063007
Iteration 9 complete. Error: -979.0059279063007 Total: 2.7712; Orientation: 0.2940; Line Search: 1.8572
Adding measurement 1923b0f1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.999e+03, gradient 3.055e-01, dot -0.112; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -979.0059279063007, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 1923b0f1 to history. Total: 3
th(0)=-979.0059279063007;dx=-0.09310793239645375
Armijo: th(24237.390262858706)=-865.9545120664687; dx=0.0071239949014638895 evalInputDelta=-113.05141583983198
New Minimum: -979.0059279063007 > -1086.8257599214098
END: th(12118.695131429353)=-1086.8257599214098; dx=-0.004183892240481937 evalInputDelta=107.81983201510911
Fitness changed from -979.0059279063007 to -1086.8257599214098
Iteration 10 complete. Error: -1086.8257599214098 Total: 2.8143; Orientation: 0.3138; Line Search: 1.8917
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e8ba3b43-2de6-4bcd-a320-f1b6ad3e15da.jpg)
Adding measurement 2af92f54 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.419e+03, gradient 3.041e-01, dot -0.104; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1086.8257599214098, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 2af92f54 to history. Total: 3
th(0)=-1086.8257599214098;dx=-0.09243554756258099
Armijo: th(26108.937189071898)=-955.7212307113452; dx=0.008532677383334476 evalInputDelta=-131.10452921006458
New Minimum: -1086.8257599214098 > -1208.979427370271
END: th(13054.468594535949)=-1208.979427370271; dx=-0.003118968942077651 evalInputDelta=122.15366744886114
Fitness changed from -1086.8257599214098 to -1208.979427370271
Iteration 11 complete. Error: -1208.979427370271 Total: 2.8052; Orientation: 0.3102; Line Search: 1.9062
Adding measurement 461cbb07 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.533e+03, gradient 3.068e-01, dot -0.110; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1208.979427370271, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 461cbb07 to history. Total: 3
th(0)=-1208.979427370271;dx=-0.0940212118800873
Armijo: th(28125.00000000002)=-1009.513214797191; dx=0.009260541228763347 evalInputDelta=-199.46621257307993
New Minimum: -1208.979427370271 > -1308.184657776974
END: th(14062.50000000001)=-1308.184657776974; dx=-7.451979178258543E-4 evalInputDelta=99.2052304067031
Fitness changed from -1208.979427370271 to -1308.184657776974
Iteration 12 complete. Error: -1308.184657776974 Total: 3.0522; Orientation: 0.3146; Line Search: 2.1542
Adding measurement 7d167622 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.032e+04, gradient 3.143e-01, dot -0.097; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1308.184657776974, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 7d167622 to history. Total: 3
th(0)=-1308.184657776974;dx=-0.09867686460814262
Armijo: th(30296.737828573387)=-1073.844600728362; dx=0.010027277187206807 evalInputDelta=-234.34005704861215
New Minimum: -1308.184657776974 > -1412.8609294940504
END: th(15148.368914286693)=-1412.8609294940504; dx=-9.624555396398111E-4 evalInputDelta=104.67627171707636
Fitness changed from -1308.184657776974 to -1412.8609294940504
Iteration 13 complete. Error: -1412.8609294940504 Total: 2.7057; Orientation: 0.2987; Line Search: 1.7966
Adding measurement 46f27958 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.348e+04, gradient 3.174e-01, dot -0.113; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1412.8609294940504, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 46f27958 to history. Total: 3
th(0)=-1412.8609294940504;dx=-0.10063114283126684
Armijo: th(32636.171486339877)=-1173.8871797291758; dx=0.010053855044007548 evalInputDelta=-238.97374976487458
New Minimum: -1412.8609294940504 > -1530.910810709672
END: th(16318.085743169939)=-1530.910810709672; dx=-4.915103670047757E-4 evalInputDelta=118.04988121562155
Fitness changed from -1412.8609294940504 to -1530.910810709672
Iteration 14 complete. Error: -1530.910810709672 Total: 2.7408; Orientation: 0.3099; Line Search: 1.8415
Adding measurement 4eb4eed6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.966e+04, gradient 3.079e-01, dot -0.092; [a7db07a2-9a6e-431f-9d90-d48b72233c42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1530.910810709672, -225.04388636247646, -149.77530282301765, -91.11434694245467
LBFGS Accumulation History: 3 points
Removed measurement 4eb4eed6 to history. Total: 3
th(0)=-1530.910810709672;dx=-0.09475936560258764
Armijo: th(35156.25000000003)=-1250.448541390653; dx=0.010154911325406447 evalInputDelta=-280.462269319019
New Minimum: -1530.910810709672 > -1665.8289909310208
END: th(17578.125000000015)=-1665.8289909310208; dx=-0.0013455818236881765 evalInputDelta=134.91818022134885
Fitness changed from -1530.910810709672 to -1665.8289909310208
Iteration 15 complete. Error: -1665.8289909310208 Total: 2.7569; Orientation: 0.3044; Line Search: 1.8627
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/901bbeb0-569d-4409-8e43-5285522a61ea.jpg)
Final threshold in iteration 16: -1665.8289909310208 (> -Infinity) after 45.934s (< 5400.000s)

Returns

    -1665.8289909310208