BasicOptimizer.scala:88 executed in 843.22 seconds (4.700 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
Reset training subject: 3022082914762
Reset training subject: 3040517902012
Adding measurement 41a69114 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=8.863649420440197;dx=-2.981637890496126E-7
New Minimum: 8.863649420440197 > 8.863647401332855
WOLFE (weak): th(2.154434690031884)=8.863647401332855; dx=-2.969641116684597E-7 evalInputDelta=2.0191073417663574E-6
New Minimum: 8.863647401332855 > 8.863644361495972
WOLFE (weak): th(4.308869380063768)=8.863644361495972; dx=-2.973896895711924E-7 evalInputDelta=5.058944225311279E-6
New Minimum: 8.863644361495972 > 8.863634131848812
WOLFE (weak): th(12.926608140191302)=8.863634131848812; dx=-2.9705393982541696E-7 evalInputDelta=1.5288591384887695E-5
New Minimum: 8.863634131848812 > 8.86358679831028
WOLFE (weak): th(51.70643256076521)=8.86358679831028; dx=-2.973801372165059E-7 evalInputDelta=6.262212991714478E-5
New Minimum: 8.86358679831028 > 8.8633371591568
WOLFE (weak): th(258.53216280382605)=8.8633371591568; dx=-2.976694414316026E-7 evalInputDelta=3.1226128339767456E-4
New Minimum: 8.8633371591568 > 8.86177533864975
WOLFE (weak): th(1551.1929768229563)=8.86177533864975; dx=-2.966782076179909E-7 evalInputDelta=0.001874081790447235
New Minimum: 8.86177533864975 > 8.85052664577961
WOLFE (weak): th(10858.350837760694)=8.85052664577961; dx=-2.9900226382131366E-7 evalInputDelta=0.01312277466058731
New Minimum: 8.85052664577961 > 8.75859310477972
WOLFE (weak): th(86866.80670208555)=8.75859310477972; dx=-2.9600473182206635E-7 evalInputDelta=0.10505631566047668
New Minimum: 8.75859310477972 > 7.950164169073105
END: th(781801.26031877)=7.950164169073105; dx=-2.663766184694253E-7 evalInputDelta=0.9134852513670921
Fitness changed from 8.863649420440197 to 7.950164169073105
Iteration 1 complete. Error: 7.950164169073105 Total: 241.8287; Orientation: 0.0169; Line Search: 186.1992
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/983b2845-b9d3-411b-855a-0d86dd6b1ff7.jpg)
Adding measurement 583a789c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=7.950164169073105;dx=-3.213476691968967E-7
New Minimum: 7.950164169073105 > 6.436832472681999
END: th(1684339.7559414052)=6.436832472681999; dx=-1.823617738524444E-7 evalInputDelta=1.5133316963911057
Fitness changed from 7.950164169073105 to 6.436832472681999
Iteration 2 complete. Error: 6.436832472681999 Total: 56.8498; Orientation: 0.0144; Line Search: 37.5856
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/db4767ac-9194-4f53-9847-0d0393e75e91.jpg)
Adding measurement 3244da64 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=6.436832472681999;dx=-2.3427527005298874E-7
New Minimum: 6.436832472681999 > 4.854175850749016
END: th(3628800.0)=4.854175850749016; dx=-9.360871610995343E-8 evalInputDelta=1.5826566219329834
Fitness changed from 6.436832472681999 to 4.854175850749016
Iteration 3 complete. Error: 4.854175850749016 Total: 56.6941; Orientation: 0.0138; Line Search: 37.9596
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b61a2034-8258-45b0-98e2-08999b8024e1.jpg)
Adding measurement 19e6c0e9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.779e+04, gradient 4.230e-04, dot -0.468; [a5a4b66b-88d2-4a53-bfa3-6ba6a2f27485 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.854175850749016, 6.436832472681999, 7.950164169073105, 8.863649420440197
LBFGS Accumulation History: 3 points
Removed measurement 19e6c0e9 to history. Total: 3
th(0)=4.854175850749016;dx=-1.7350797518787067E-7
New Minimum: 4.854175850749016 > 2.9979340881109238
END: th(7818012.6031877)=2.9979340881109238; dx=-4.529858349254137E-8 evalInputDelta=1.856241762638092
Fitness changed from 4.854175850749016 to 2.9979340881109238
Iteration 4 complete. Error: 2.9979340881109238 Total: 57.5154; Orientation: 0.3673; Line Search: 38.6738
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/eebec4b4-0175-434f-aaa9-1d6f8230cab9.jpg)
Adding measurement 22f3824d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.159e+04, gradient 3.297e-04, dot -0.393; [a5a4b66b-88d2-4a53-bfa3-6ba6a2f27485 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.9979340881109238, 6.436832472681999, 7.950164169073105, 8.863649420440197
LBFGS Accumulation History: 3 points
Removed measurement 22f3824d to history. Total: 3
th(0)=2.9979340881109238;dx=-1.048404529512738E-7
New Minimum: 2.9979340881109238 > 1.6261111944913864
END: th(1.684339755941405E7)=1.6261111944913864; dx=-1.0324313486681803E-8 evalInputDelta=1.3718228936195374
Fitness changed from 2.9979340881109238 to 1.6261111944913864
Iteration 5 complete. Error: 1.6261111944913864 Total: 56.8834; Orientation: 0.3432; Line Search: 37.6152
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/25ddd187-7aef-4914-8734-8c8a8179b1c0.jpg)
Adding measurement 5b151d59 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.265e+03, gradient 2.549e-04, dot -0.271; [a5a4b66b-88d2-4a53-bfa3-6ba6a2f27485 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.6261111944913864, 6.436832472681999, 7.950164169073105, 8.863649420440197
LBFGS Accumulation History: 3 points
Removed measurement 5b151d59 to history. Total: 3
th(0)=1.6261111944913864;dx=-6.284463650771457E-8
New Minimum: 1.6261111944913864 > 0.7647862955927849
WOLF (strong): th(3.6288E7)=0.7647862955927849; dx=7.97863305142525E-9 evalInputDelta=0.8613248988986015
New Minimum: 0.7647862955927849 > 0.28626903891563416
END: th(1.8144E7)=0.28626903891563416; dx=-1.0098921240660294E-8 evalInputDelta=1.3398421555757523
Fitness changed from 1.6261111944913864 to 0.28626903891563416
Iteration 6 complete. Error: 0.28626903891563416 Total: 75.3621; Orientation: 0.3442; Line Search: 56.7958
Adding measurement b178cfc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.049e+03, gradient 2.086e-04, dot -0.206; [a5a4b66b-88d2-4a53-bfa3-6ba6a2f27485 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.28626903891563416, 6.436832472681999, 7.950164169073105, 8.863649420440197
LBFGS Accumulation History: 3 points
Removed measurement b178cfc to history. Total: 3
th(0)=0.28626903891563416;dx=-4.2214762528998666E-8
Armijo: th(3.90900630159385E7)=0.9696361273527145; dx=6.812150315364892E-9 evalInputDelta=-0.6833670884370804
New Minimum: 0.28626903891563416 > -0.03682570159435272
WOLF (strong): th(1.954503150796925E7)=-0.03682570159435272; dx=1.9939887860622417E-9 evalInputDelta=0.3230947405099869
New Minimum: -0.03682570159435272 > -0.29743726551532745
END: th(6515010.502656416)=-0.29743726551532745; dx=-1.5222076528741094E-8 evalInputDelta=0.5837063044309616
Fitness changed from 0.28626903891563416 to -0.29743726551532745
Iteration 7 complete. Error: -0.29743726551532745 Total: 93.8535; Orientation: 0.3352; Line Search: 74.9291
Adding measurement 17bfcde7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.874e+03, gradient 1.674e-04, dot -0.281; [a5a4b66b-88d2-4a53-bfa3-6ba6a2f27485 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.29743726551532745, 6.436832472681999, 7.950164169073105, 8.863649420440197
LBFGS Accumulation History: 3 points
Removed measurement 17bfcde7 to history. Total: 3
th(0)=-0.29743726551532745;dx=-2.7250876117666466E-8
New Minimum: -0.29743726551532745 > -0.5167698860168457
END: th(1.4036164632845044E7)=-0.5167698860168457; dx=-4.418943937232164E-9 evalInputDelta=0.21933262050151825
Fitness changed from -0.29743726551532745 to -0.5167698860168457
Iteration 8 complete. Error: -0.5167698860168457 Total: 55.7490; Orientation: 0.3434; Line Search: 36.9071
Adding measurement 6e790004 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.923e+03, gradient 2.179e-04, dot -0.188; [a5a4b66b-88d2-4a53-bfa3-6ba6a2f27485 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.5167698860168457, 6.436832472681999, 7.950164169073105, 8.863649420440197
LBFGS Accumulation History: 3 points
Removed measurement 6e790004 to history. Total: 3
th(0)=-0.5167698860168457;dx=-4.5756291088305415E-8
Armijo: th(3.0240000000000004E7)=1.0802976340055466; dx=1.2991724440847482E-8 evalInputDelta=-1.5970675200223923
Armijo: th(1.5120000000000002E7)=-0.24916812777519226; dx=1.2487790321616809E-8 evalInputDelta=-0.26760175824165344
New Minimum: -0.5167698860168457 > -0.9719409272074699
END: th(5040000.000000001)=-0.9719409272074699; dx=-4.3098533893689604E-9 evalInputDelta=0.45517104119062424
Fitness changed from -0.5167698860168457 to -0.9719409272074699
Iteration 9 complete. Error: -0.9719409272074699 Total: 92.3411; Orientation: 0.4178; Line Search: 73.1671
Adding measurement 70f06329 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.478e+03, gradient 1.291e-04, dot -0.320; [a5a4b66b-88d2-4a53-bfa3-6ba6a2f27485 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.9719409272074699, 6.436832472681999, 7.950164169073105, 8.863649420440197
LBFGS Accumulation History: 3 points
Removed measurement 70f06329 to history. Total: 3
th(0)=-0.9719409272074699;dx=-1.6045447021056037E-8
New Minimum: -0.9719409272074699 > -1.2182577103376389
END: th(1.0858350837760696E7)=-1.2182577103376389; dx=-5.843931057537821E-9 evalInputDelta=0.24631678313016891
Fitness changed from -0.9719409272074699 to -1.2182577103376389
Iteration 10 complete. Error: -1.2182577103376389 Total: 55.9627; Orientation: 0.3430; Line Search: 37.3490
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/fbbdb9fb-7b50-4d0a-898f-5a3217eae235.jpg)
Final threshold in iteration 11: -1.2182577103376389 (> -Infinity) after 843.220s (< 1800.000s)
Returns
-1.2182577103376389