BasicOptimizer.scala:89 executed in 152.46 seconds (2.591 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: 459794448000600
Reset training subject: 459797387522900
Adding measurement 4c2215f2 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-104.22299394279369;dx=-1.290001733582615E-5
New Minimum: -104.22299394279369 > -104.22302593101834
END: th(2.154434690031884)=-104.22302593101834; dx=-1.158988738745349E-5 evalInputDelta=3.198822464867135E-5
Fitness changed from -104.22299394279369 to -104.22302593101834
Iteration 1 complete. Error: -104.22302593101834 Total: 14.9824; Orientation: 0.1102; Line Search: 5.9679
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/dbf6caec-9bed-4638-ac1f-de908c3f28b1.jpg)
Adding measurement 79950928 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-104.22302593101834;dx=-1.1589229735692503E-5
New Minimum: -104.22302593101834 > -104.22308457607137
WOLFE (weak): th(4.641588833612779)=-104.22308457607137; dx=-1.1600040574067852E-5 evalInputDelta=5.8645053030659255E-5
New Minimum: -104.22308457607137 > -104.22313788972731
WOLFE (weak): th(9.283177667225559)=-104.22313788972731; dx=-1.1568967902705421E-5 evalInputDelta=1.119587089704055E-4
New Minimum: -104.22313788972731 > -104.22336180678444
WOLFE (weak): th(27.849533001676676)=-104.22336180678444; dx=-1.1585072878794679E-5 evalInputDelta=3.3587576609761527E-4
New Minimum: -104.22336180678444 > -104.22438009019024
WOLFE (weak): th(111.3981320067067)=-104.22438009019024; dx=-1.1580201718772946E-5 evalInputDelta=0.0013541591718961854
New Minimum: -104.22438009019024 > -104.22980188196817
WOLFE (weak): th(556.9906600335335)=-104.22980188196817; dx=-1.1542079325992837E-5 evalInputDelta=0.0067759509498301895
New Minimum: -104.22980188196817 > -104.26371233635666
WOLFE (weak): th(3341.9439602012008)=-104.26371233635666; dx=-1.1538213270976058E-5 evalInputDelta=0.04068640533832024
New Minimum: -104.26371233635666 > -104.50746091395708
WOLFE (weak): th(23393.607721408407)=-104.50746091395708; dx=-1.148837573322507E-5 evalInputDelta=0.28443498293873404
New Minimum: -104.50746091395708 > -106.46818376632456
WOLFE (weak): th(187148.86177126726)=-106.46818376632456; dx=-1.1208894849101089E-5 evalInputDelta=2.245157835306216
New Minimum: -106.46818376632456 > -121.7130796256162
END: th(1684339.7559414054)=-121.7130796256162; dx=-8.157266578067485E-6 evalInputDelta=17.49005369459786
Fitness changed from -104.22302593101834 to -121.7130796256162
Iteration 2 complete. Error: -121.7130796256162 Total: 32.2608; Orientation: 0.1100; Line Search: 28.8195
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a5302176-7038-48e3-be99-929eb70d07b6.jpg)
Adding measurement 6d22d57f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-121.7130796256162;dx=-8.108105879131554E-6
New Minimum: -121.7130796256162 > -144.04369980524643
END: th(3628800.0000000005)=-144.04369980524643; dx=-4.149996350686319E-6 evalInputDelta=22.33062017963023
Fitness changed from -121.7130796256162 to -144.04369980524643
Iteration 3 complete. Error: -144.04369980524643 Total: 9.4291; Orientation: 0.1092; Line Search: 5.8863
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b9c67eda-c810-4107-b7e1-ba24fd622085.jpg)
Adding measurement 3b19e312 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.133e+04, gradient 2.263e-03, dot -0.633; [911e819c-32ff-4f7c-a453-0a72ad342955 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -144.04369980524643, -121.7130796256162, -104.22302593101834, -104.22299394279369
LBFGS Accumulation History: 3 points
Removed measurement 3b19e312 to history. Total: 3
th(0)=-144.04369980524643;dx=-5.119850854468527E-6
New Minimum: -144.04369980524643 > -168.2749829394041
END: th(7818012.603187701)=-168.2749829394041; dx=-1.5716300354235983E-6 evalInputDelta=24.231283134157678
Fitness changed from -144.04369980524643 to -168.2749829394041
Iteration 4 complete. Error: -168.2749829394041 Total: 11.5358; Orientation: 1.9765; Line Search: 6.0109
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/8832183c-9d46-4fd4-bdb4-f02a483f0844.jpg)
Adding measurement f4e30b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.324e+04, gradient 2.201e-03, dot -0.399; [911e819c-32ff-4f7c-a453-0a72ad342955 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -168.2749829394041, -121.7130796256162, -104.22302593101834, -104.22299394279369
LBFGS Accumulation History: 3 points
Removed measurement f4e30b to history. Total: 3
th(0)=-168.2749829394041;dx=-4.8174374004824886E-6
New Minimum: -168.2749829394041 > -178.01751237013414
WOLF (strong): th(1.6843397559414055E7)=-178.01751237013414; dx=8.583096318728642E-7 evalInputDelta=9.74252943073003
New Minimum: -178.01751237013414 > -183.9023117886042
END: th(8421698.779707028)=-183.9023117886042; dx=-3.397998045657055E-8 evalInputDelta=15.627328849200097
Fitness changed from -168.2749829394041 to -183.9023117886042
Iteration 5 complete. Error: -183.9023117886042 Total: 14.1996; Orientation: 1.8956; Line Search: 8.7917
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1e3b0415-87d0-4bc9-a585-c1c322013e02.jpg)
Adding measurement 169bf7e3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.571e+04, gradient 2.286e-03, dot -0.313; [911e819c-32ff-4f7c-a453-0a72ad342955 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -183.9023117886042, -121.7130796256162, -104.22302593101834, -104.22299394279369
LBFGS Accumulation History: 3 points
Removed measurement 169bf7e3 to history. Total: 3
th(0)=-183.9023117886042;dx=-5.211393595519834E-6
Armijo: th(1.8144000000000004E7)=-181.0898877914664; dx=1.790319010344491E-6 evalInputDelta=-2.812423997137813
New Minimum: -183.9023117886042 > -197.77191966186163
WOLF (strong): th(9072000.000000002)=-197.77191966186163; dx=9.95089729400808E-7 evalInputDelta=13.869607873257422
END: th(3024000.0000000005)=-196.0398286418714; dx=-2.457683438977266E-6 evalInputDelta=12.137516853267186
Fitness changed from -183.9023117886042 to -197.77191966186163
Iteration 6 complete. Error: -197.77191966186163 Total: 17.0151; Orientation: 1.9771; Line Search: 11.5836
Adding measurement 1fca35a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.759e+04, gradient 2.293e-03, dot -0.258; [911e819c-32ff-4f7c-a453-0a72ad342955 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -197.77191966186163, -121.7130796256162, -104.22302593101834, -104.22299394279369
LBFGS Accumulation History: 3 points
Removed measurement 1fca35a0 to history. Total: 3
th(0)=-197.77191966186163;dx=-5.256925088850852E-6
New Minimum: -197.77191966186163 > -214.21228219775526
WOLF (strong): th(6515010.502656418)=-214.21228219775526; dx=1.1707370192356601E-7 evalInputDelta=16.440362535893627
END: th(3257505.251328209)=-210.8541934720851; dx=-2.3734358010609887E-6 evalInputDelta=13.082273810223455
Fitness changed from -197.77191966186163 to -214.21228219775526
Iteration 7 complete. Error: -214.21228219775526 Total: 14.0836; Orientation: 1.8859; Line Search: 9.0678
Adding measurement 6685b42e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.645e+04, gradient 1.708e-03, dot -0.418; [911e819c-32ff-4f7c-a453-0a72ad342955 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -214.21228219775526, -121.7130796256162, -104.22302593101834, -104.22299394279369
LBFGS Accumulation History: 3 points
Removed measurement 6685b42e to history. Total: 3
th(0)=-214.21228219775526;dx=-2.9164478491410017E-6
New Minimum: -214.21228219775526 > -224.12918710576523
END: th(7018082.316422524)=-224.12918710576523; dx=-1.590768040371761E-7 evalInputDelta=9.916904908009968
Fitness changed from -214.21228219775526 to -224.12918710576523
Iteration 8 complete. Error: -224.12918710576523 Total: 10.7858; Orientation: 1.8496; Line Search: 6.0451
Adding measurement 153066b2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.032e+04, gradient 1.634e-03, dot -0.421; [911e819c-32ff-4f7c-a453-0a72ad342955 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -224.12918710576523, -121.7130796256162, -104.22302593101834, -104.22299394279369
LBFGS Accumulation History: 3 points
Removed measurement 153066b2 to history. Total: 3
th(0)=-224.12918710576523;dx=-2.6663587428043E-6
New Minimum: -224.12918710576523 > -226.20036403810687
WOLF (strong): th(1.5120000000000006E7)=-226.20036403810687; dx=9.58224721101357E-7 evalInputDelta=2.0711769323416434
New Minimum: -226.20036403810687 > -232.2100112233145
WOLF (strong): th(7560000.000000003)=-232.2100112233145; dx=1.5097335599862556E-7 evalInputDelta=8.08082411754927
END: th(2520000.000000001)=-229.54056724473153; dx=-1.5088433648621538E-6 evalInputDelta=5.411380138966308
Fitness changed from -224.12918710576523 to -232.2100112233145
Iteration 9 complete. Error: -232.2100112233145 Total: 16.9016; Orientation: 1.8984; Line Search: 12.1382
Adding measurement 7e66dbc4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.188e+04, gradient 1.679e-03, dot -0.381; [911e819c-32ff-4f7c-a453-0a72ad342955 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -232.2100112233145, -121.7130796256162, -104.22302593101834, -104.22299394279369
LBFGS Accumulation History: 3 points
Removed measurement 7e66dbc4 to history. Total: 3
th(0)=-232.2100112233145;dx=-2.8087249812105756E-6
New Minimum: -232.2100112233145 > -240.31649435902244
END: th(5429175.418880349)=-240.31649435902244; dx=-2.286298954141385E-7 evalInputDelta=8.106483135707947
Fitness changed from -232.2100112233145 to -240.31649435902244
Iteration 10 complete. Error: -240.31649435902244 Total: 10.6113; Orientation: 1.8951; Line Search: 6.0207
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/5f35e864-ed04-4c4f-b1fc-ca7bb1faa12f.jpg)
Final threshold in iteration 11: -240.31649435902244 (> -Infinity) after 152.460s (< 5400.000s)
Returns
-240.31649435902244