BasicOptimizer.scala:89 executed in 203.87 seconds (1.837 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: 20972346007532
Reset training subject: 20977080856487
Adding measurement 4a77c264 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.39337894320487976;dx=-8.347308475866403E-7
New Minimum: -0.39337894320487976 > -0.39337964355945587
END: th(2.154434690031884)=-0.39337964355945587; dx=-7.480940540934465E-7 evalInputDelta=7.003545761108398E-7
Fitness changed from -0.39337894320487976 to -0.39337964355945587
Iteration 1 complete. Error: -0.39337964355945587 Total: 22.1649; Orientation: 0.0443; Line Search: 8.6478
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3afa9318-3e35-4c0a-9747-3981081e238d.jpg)
Adding measurement 502fe75c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.39337964355945587;dx=-7.48085590041674E-7
New Minimum: -0.39337964355945587 > -0.39338140189647675
WOLFE (weak): th(4.641588833612779)=-0.39338140189647675; dx=-7.480873257326973E-7 evalInputDelta=1.7583370208740234E-6
New Minimum: -0.39338140189647675 > -0.3933831751346588
WOLFE (weak): th(9.283177667225559)=-0.3933831751346588; dx=-7.480872189323123E-7 evalInputDelta=3.5315752029418945E-6
New Minimum: -0.3933831751346588 > -0.393390029668808
WOLFE (weak): th(27.849533001676676)=-0.393390029668808; dx=-7.480741298412432E-7 evalInputDelta=1.0386109352111816E-5
New Minimum: -0.393390029668808 > -0.39342135190963745
WOLFE (weak): th(111.3981320067067)=-0.39342135190963745; dx=-7.480467724962954E-7 evalInputDelta=4.170835018157959E-5
New Minimum: -0.39342135190963745 > -0.39358794689178467
WOLFE (weak): th(556.9906600335335)=-0.39358794689178467; dx=-7.478363037195646E-7 evalInputDelta=2.083033323287964E-4
New Minimum: -0.39358794689178467 > -0.3946288228034973
WOLFE (weak): th(3341.9439602012008)=-0.3946288228034973; dx=-7.471132508212664E-7 evalInputDelta=0.0012491792440414429
New Minimum: -0.3946288228034973 > -0.402087077498436
WOLFE (weak): th(23393.607721408407)=-0.402087077498436; dx=-7.407692495331569E-7 evalInputDelta=0.008707433938980103
New Minimum: -0.402087077498436 > -0.4607067406177521
WOLFE (weak): th(187148.86177126726)=-0.4607067406177521; dx=-6.89632160984252E-7 evalInputDelta=0.0673270970582962
New Minimum: -0.4607067406177521 > -0.8109021037817001
END: th(1684339.7559414054)=-0.8109021037817001; dx=-2.868963857299504E-7 evalInputDelta=0.41752246022224426
Fitness changed from -0.39337964355945587 to -0.8109021037817001
Iteration 2 complete. Error: -0.8109021037817001 Total: 49.0173; Orientation: 0.0467; Line Search: 44.0591
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1ef212f4-06e9-43b6-9305-c389e8cdc278.jpg)
Adding measurement 19235bb7 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.8109021037817001;dx=-2.963839149029764E-7
New Minimum: -0.8109021037817001 > -1.1523535251617432
END: th(3628800.0000000005)=-1.1523535251617432; dx=-1.1154738246702224E-7 evalInputDelta=0.34145142138004303
Fitness changed from -0.8109021037817001 to -1.1523535251617432
Iteration 3 complete. Error: -1.1523535251617432 Total: 13.4415; Orientation: 0.0452; Line Search: 9.1388
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ea3ef596-a7f6-485d-ae82-9aa0ea091808.jpg)
Adding measurement 6fe08d62 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.679e+03, gradient 4.116e-04, dot -0.552; [e0cde887-3bb7-46bb-86ef-2d8d51aa2101 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1523535251617432, -0.8109021037817001, -0.39337964355945587, -0.39337894320487976
LBFGS Accumulation History: 3 points
Removed measurement 6fe08d62 to history. Total: 3
th(0)=-1.1523535251617432;dx=-1.6938061847027139E-7
New Minimum: -1.1523535251617432 > -1.43890780210495
END: th(7818012.603187701)=-1.43890780210495; dx=-2.2179273487782674E-8 evalInputDelta=0.2865542769432068
Fitness changed from -1.1523535251617432 to -1.43890780210495
Iteration 4 complete. Error: -1.43890780210495 Total: 13.8565; Orientation: 1.0223; Line Search: 8.5014
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/23c27c0c-afcf-4912-8dee-1a03d8f3f098.jpg)
Adding measurement 7fe9f420 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.457e+03, gradient 3.844e-04, dot -0.312; [e0cde887-3bb7-46bb-86ef-2d8d51aa2101 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.43890780210495, -0.8109021037817001, -0.39337964355945587, -0.39337894320487976
LBFGS Accumulation History: 3 points
Removed measurement 7fe9f420 to history. Total: 3
th(0)=-1.43890780210495;dx=-1.4779438522751413E-7
New Minimum: -1.43890780210495 > -1.5086223930120468
WOLF (strong): th(1.6843397559414055E7)=-1.5086223930120468; dx=3.434319733180011E-8 evalInputDelta=0.06971459090709686
New Minimum: -1.5086223930120468 > -1.6255207508802414
WOLF (strong): th(8421698.779707028)=-1.6255207508802414; dx=1.3815155644064459E-8 evalInputDelta=0.18661294877529144
END: th(2807232.926569009)=-1.578793853521347; dx=-5.9156139043623466E-8 evalInputDelta=0.1398860514163971
Fitness changed from -1.43890780210495 to -1.6255207508802414
Iteration 5 complete. Error: -1.6255207508802414 Total: 22.2764; Orientation: 1.0160; Line Search: 17.1141
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f7e39444-687f-4a45-9c07-3f9bcaa46266.jpg)
Adding measurement 3ce7f12a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.517e+03, gradient 3.403e-04, dot -0.253; [e0cde887-3bb7-46bb-86ef-2d8d51aa2101 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6255207508802414, -0.8109021037817001, -0.39337964355945587, -0.39337894320487976
LBFGS Accumulation History: 3 points
Removed measurement 3ce7f12a to history. Total: 3
th(0)=-1.6255207508802414;dx=-1.1581351914898763E-7
New Minimum: -1.6255207508802414 > -1.7877604514360428
END: th(6048000.000000001)=-1.7877604514360428; dx=-1.2509131647786742E-8 evalInputDelta=0.1622397005558014
Fitness changed from -1.6255207508802414 to -1.7877604514360428
Iteration 6 complete. Error: -1.7877604514360428 Total: 13.6799; Orientation: 1.0226; Line Search: 8.2145
Adding measurement 67b32eab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.990e+03, gradient 2.203e-04, dot -0.435; [e0cde887-3bb7-46bb-86ef-2d8d51aa2101 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7877604514360428, -0.8109021037817001, -0.39337964355945587, -0.39337894320487976
LBFGS Accumulation History: 3 points
Removed measurement 67b32eab to history. Total: 3
th(0)=-1.7877604514360428;dx=-4.8553072217644885E-8
New Minimum: -1.7877604514360428 > -1.9018042385578156
WOLF (strong): th(1.3030021005312836E7)=-1.9018042385578156; dx=5.662262180708457E-9 evalInputDelta=0.11404378712177277
END: th(6515010.502656418)=-1.8885644227266312; dx=-1.5618202890106617E-8 evalInputDelta=0.10080397129058838
Fitness changed from -1.7877604514360428 to -1.9018042385578156
Iteration 7 complete. Error: -1.9018042385578156 Total: 18.4563; Orientation: 1.0054; Line Search: 13.3989
Adding measurement 43387235 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.695e+03, gradient 2.732e-04, dot -0.236; [e0cde887-3bb7-46bb-86ef-2d8d51aa2101 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9018042385578156, -0.8109021037817001, -0.39337964355945587, -0.39337894320487976
LBFGS Accumulation History: 3 points
Removed measurement 43387235 to history. Total: 3
th(0)=-1.9018042385578156;dx=-7.462056006058539E-8
New Minimum: -1.9018042385578156 > -1.9299046695232391
WOLF (strong): th(1.4036164632845048E7)=-1.9299046695232391; dx=2.8251967147893375E-8 evalInputDelta=0.028100430965423584
New Minimum: -1.9299046695232391 > -1.9968414306640625
WOLF (strong): th(7018082.316422524)=-1.9968414306640625; dx=4.358421994303735E-9 evalInputDelta=0.09503719210624695
END: th(2339360.7721408415)=-1.9662629663944244; dx=-3.6730156125369627E-8 evalInputDelta=0.06445872783660889
Fitness changed from -1.9018042385578156 to -1.9968414306640625
Iteration 8 complete. Error: -1.9968414306640625 Total: 23.4965; Orientation: 1.0064; Line Search: 18.4882
Adding measurement 6f6477fe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.046e+03, gradient 1.902e-04, dot -0.370; [e0cde887-3bb7-46bb-86ef-2d8d51aa2101 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9968414306640625, -0.8109021037817001, -0.39337964355945587, -0.39337894320487976
LBFGS Accumulation History: 3 points
Removed measurement 6f6477fe to history. Total: 3
th(0)=-1.9968414306640625;dx=-3.61582975398994E-8
New Minimum: -1.9968414306640625 > -2.056121438741684
END: th(5040000.000000002)=-2.056121438741684; dx=-1.2199914325585455E-8 evalInputDelta=0.05928000807762146
Fitness changed from -1.9968414306640625 to -2.056121438741684
Iteration 9 complete. Error: -2.056121438741684 Total: 14.0762; Orientation: 1.0256; Line Search: 8.9331
Adding measurement 2fdfbb61 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.267e+03, gradient 1.409e-04, dot -0.511; [e0cde887-3bb7-46bb-86ef-2d8d51aa2101 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.056121438741684, -0.8109021037817001, -0.39337964355945587, -0.39337894320487976
LBFGS Accumulation History: 3 points
Removed measurement 2fdfbb61 to history. Total: 3
th(0)=-2.056121438741684;dx=-1.985195629013612E-8
New Minimum: -2.056121438741684 > -2.11742801964283
END: th(1.0858350837760698E7)=-2.11742801964283; dx=-4.987997851685324E-9 evalInputDelta=0.061306580901145935
Fitness changed from -2.056121438741684 to -2.11742801964283
Iteration 10 complete. Error: -2.11742801964283 Total: 13.3399; Orientation: 0.9993; Line Search: 8.1579
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d7789e2b-4d89-4684-b554-0176e88550f9.jpg)
Final threshold in iteration 11: -2.11742801964283 (> -Infinity) after 203.873s (< 5400.000s)
Returns
-2.11742801964283