BasicOptimizer.scala:89 executed in 202.73 seconds (2.107 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: 5576602366702
Reset training subject: 5580898790918
Adding measurement 11cd14bd to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.0768156349658966;dx=-5.42926285560373E-7
New Minimum: -0.0768156349658966 > -0.07681573927402496
END: th(2.154434690031884)=-0.07681573927402496; dx=-4.6176519607939566E-7 evalInputDelta=1.043081283569336E-7
Fitness changed from -0.0768156349658966 to -0.07681573927402496
Iteration 1 complete. Error: -0.07681573927402496 Total: 21.2518; Orientation: 0.0454; Line Search: 8.2450
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 2de671fd to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.07681573927402496;dx=-4.617681540572293E-7
New Minimum: -0.07681573927402496 > -0.07681684195995331
WOLFE (weak): th(4.641588833612779)=-0.07681684195995331; dx=-4.6176178778843415E-7 evalInputDelta=1.1026859283447266E-6
New Minimum: -0.07681684195995331 > -0.07681834697723389
WOLFE (weak): th(9.283177667225559)=-0.07681834697723389; dx=-4.6176472546324424E-7 evalInputDelta=2.60770320892334E-6
New Minimum: -0.07681834697723389 > -0.07682284712791443
WOLFE (weak): th(27.849533001676676)=-0.07682284712791443; dx=-4.617608173093506E-7 evalInputDelta=7.107853889465332E-6
New Minimum: -0.07682284712791443 > -0.07684206962585449
WOLFE (weak): th(111.3981320067067)=-0.07684206962585449; dx=-4.617464195264708E-7 evalInputDelta=2.633035182952881E-5
New Minimum: -0.07684206962585449 > -0.07694487273693085
WOLFE (weak): th(556.9906600335335)=-0.07694487273693085; dx=-4.61653846405569E-7 evalInputDelta=1.291334629058838E-4
New Minimum: -0.07694487273693085 > -0.07758745551109314
WOLFE (weak): th(3341.9439602012008)=-0.07758745551109314; dx=-4.6124033705394173E-7 evalInputDelta=7.717162370681763E-4
New Minimum: -0.07758745551109314 > -0.08219966292381287
WOLFE (weak): th(23393.607721408407)=-0.08219966292381287; dx=-4.587915465290661E-7 evalInputDelta=0.005383923649787903
New Minimum: -0.08219966292381287 > -0.11889339983463287
WOLFE (weak): th(187148.86177126726)=-0.11889339983463287; dx=-4.372933119243456E-7 evalInputDelta=0.04207766056060791
New Minimum: -0.11889339983463287 > -0.3734017461538315
END: th(1684339.7559414054)=-0.3734017461538315; dx=-2.5170469375837844E-7 evalInputDelta=0.2965860068798065
Fitness changed from -0.07681573927402496 to -0.3734017461538315
Iteration 2 complete. Error: -0.3734017461538315 Total: 48.8965; Orientation: 0.0433; Line Search: 44.4417
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 74b54d8a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.3734017461538315;dx=-2.4181783260257543E-7
New Minimum: -0.3734017461538315 > -0.682103618979454
END: th(3628800.0000000005)=-0.682103618979454; dx=-1.1644724189095691E-7 evalInputDelta=0.30870187282562256
Fitness changed from -0.3734017461538315 to -0.682103618979454
Iteration 3 complete. Error: -0.682103618979454 Total: 13.4795; Orientation: 0.0463; Line Search: 9.0120
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 7536231d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.152e+03, gradient 3.890e-04, dot -0.631; [320fa68e-7c79-44e0-b8c1-0d8f7ec54d62 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.682103618979454, -0.3734017461538315, -0.07681573927402496, -0.0768156349658966
LBFGS Accumulation History: 3 points
Removed measurement 7536231d to history. Total: 3
th(0)=-0.682103618979454;dx=-1.513207450272939E-7
New Minimum: -0.682103618979454 > -0.9855030179023743
END: th(7818012.603187701)=-0.9855030179023743; dx=-3.700735789582845E-8 evalInputDelta=0.3033993989229202
Fitness changed from -0.682103618979454 to -0.9855030179023743
Iteration 4 complete. Error: -0.9855030179023743 Total: 13.5375; Orientation: 1.0128; Line Search: 8.5118
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 3ce8e128 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.824e+03, gradient 3.577e-04, dot -0.387; [320fa68e-7c79-44e0-b8c1-0d8f7ec54d62 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.9855030179023743, -0.3734017461538315, -0.07681573927402496, -0.0768156349658966
LBFGS Accumulation History: 3 points
Removed measurement 3ce8e128 to history. Total: 3
th(0)=-0.9855030179023743;dx=-1.279732348232911E-7
New Minimum: -0.9855030179023743 > -1.1212393790483475
WOLF (strong): th(1.6843397559414055E7)=-1.1212393790483475; dx=2.230068585031975E-8 evalInputDelta=0.1357363611459732
New Minimum: -1.1212393790483475 > -1.1826788038015366
WOLF (strong): th(8421698.779707028)=-1.1826788038015366; dx=1.2584052388734713E-9 evalInputDelta=0.1971757858991623
END: th(2807232.926569009)=-1.1159593760967255; dx=-6.100415495080847E-8 evalInputDelta=0.1304563581943512
Fitness changed from -0.9855030179023743 to -1.1826788038015366
Iteration 5 complete. Error: -1.1826788038015366 Total: 23.4387; Orientation: 1.4347; Line Search: 17.4233
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 7b8016a6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.175e+03, gradient 3.329e-04, dot -0.315; [320fa68e-7c79-44e0-b8c1-0d8f7ec54d62 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1826788038015366, -0.3734017461538315, -0.07681573927402496, -0.0768156349658966
LBFGS Accumulation History: 3 points
Removed measurement 7b8016a6 to history. Total: 3
th(0)=-1.1826788038015366;dx=-1.1079839549017476E-7
New Minimum: -1.1826788038015366 > -1.3509240597486496
END: th(6048000.000000001)=-1.3509240597486496; dx=-1.4234077614581386E-8 evalInputDelta=0.16824525594711304
Fitness changed from -1.1826788038015366 to -1.3509240597486496
Iteration 6 complete. Error: -1.3509240597486496 Total: 13.6513; Orientation: 1.0496; Line Search: 7.8866
Adding measurement 53160462 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.684e+03, gradient 2.325e-04, dot -0.477; [320fa68e-7c79-44e0-b8c1-0d8f7ec54d62 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3509240597486496, -0.3734017461538315, -0.07681573927402496, -0.0768156349658966
LBFGS Accumulation History: 3 points
Removed measurement 53160462 to history. Total: 3
th(0)=-1.3509240597486496;dx=-5.406910144600049E-8
New Minimum: -1.3509240597486496 > -1.4764819741249084
WOLF (strong): th(1.3030021005312836E7)=-1.4764819741249084; dx=7.572195897508752E-9 evalInputDelta=0.12555791437625885
END: th(6515010.502656418)=-1.463678315281868; dx=-1.771405344901632E-8 evalInputDelta=0.11275425553321838
Fitness changed from -1.3509240597486496 to -1.4764819741249084
Iteration 7 complete. Error: -1.4764819741249084 Total: 18.7192; Orientation: 1.1089; Line Search: 12.5938
Adding measurement 73d5e4d6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.260e+03, gradient 2.979e-04, dot -0.244; [320fa68e-7c79-44e0-b8c1-0d8f7ec54d62 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4764819741249084, -0.3734017461538315, -0.07681573927402496, -0.0768156349658966
LBFGS Accumulation History: 3 points
Removed measurement 73d5e4d6 to history. Total: 3
th(0)=-1.4764819741249084;dx=-8.872468461156794E-8
New Minimum: -1.4764819741249084 > -1.4915748238563538
WOLF (strong): th(1.4036164632845048E7)=-1.4915748238563538; dx=3.872920233522943E-8 evalInputDelta=0.015092849731445312
New Minimum: -1.4915748238563538 > -1.5881997346878052
WOLF (strong): th(7018082.316422524)=-1.5881997346878052; dx=7.749439658893595E-9 evalInputDelta=0.11171776056289673
END: th(2339360.7721408415)=-1.5533037036657333; dx=-4.358631716295215E-8 evalInputDelta=0.07682172954082489
Fitness changed from -1.4764819741249084 to -1.5881997346878052
Iteration 8 complete. Error: -1.5881997346878052 Total: 22.9800; Orientation: 1.0707; Line Search: 17.7037
Adding measurement 4ed93e5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.648e+03, gradient 2.018e-04, dot -0.382; [320fa68e-7c79-44e0-b8c1-0d8f7ec54d62 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5881997346878052, -0.3734017461538315, -0.07681573927402496, -0.0768156349658966
LBFGS Accumulation History: 3 points
Removed measurement 4ed93e5 to history. Total: 3
th(0)=-1.5881997346878052;dx=-4.071268230875789E-8
New Minimum: -1.5881997346878052 > -1.6573495268821716
END: th(5040000.000000002)=-1.6573495268821716; dx=-1.5699119746034934E-8 evalInputDelta=0.06914979219436646
Fitness changed from -1.5881997346878052 to -1.6573495268821716
Iteration 9 complete. Error: -1.6573495268821716 Total: 13.6713; Orientation: 1.0165; Line Search: 8.6782
Adding measurement 2d749f26 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.962e+03, gradient 1.479e-04, dot -0.537; [320fa68e-7c79-44e0-b8c1-0d8f7ec54d62 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6573495268821716, -0.3734017461538315, -0.07681573927402496, -0.0768156349658966
LBFGS Accumulation History: 3 points
Removed measurement 2d749f26 to history. Total: 3
th(0)=-1.6573495268821716;dx=-2.1878572574622783E-8
New Minimum: -1.6573495268821716 > -1.730248048901558
END: th(1.0858350837760698E7)=-1.730248048901558; dx=-6.242676362562816E-9 evalInputDelta=0.07289852201938629
Fitness changed from -1.6573495268821716 to -1.730248048901558
Iteration 10 complete. Error: -1.730248048901558 Total: 13.0294; Orientation: 1.0064; Line Search: 7.9328
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -1.730248048901558 (> -Infinity) after 202.725s (< 5400.000s)
Returns
-1.730248048901558