BasicOptimizer.scala:89 executed in 200.83 seconds (2.087 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: 17424952092272
Reset training subject: 17428943207954
Adding measurement 5a63a67d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.49314773082733154;dx=-7.339092173606695E-7
New Minimum: -0.49314773082733154 > -0.49314822256565094
END: th(2.154434690031884)=-0.49314822256565094; dx=-6.338360330112502E-7 evalInputDelta=4.917383193969727E-7
Fitness changed from -0.49314773082733154 to -0.49314822256565094
Iteration 1 complete. Error: -0.49314822256565094 Total: 20.2609; Orientation: 0.0444; Line Search: 8.0203
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/12c64923-85a4-48af-b0d4-6b4a84be2815.jpg)
Adding measurement 209ef5e4 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.49314822256565094;dx=-6.338437198424353E-7
New Minimum: -0.49314822256565094 > -0.49314992129802704
WOLFE (weak): th(4.641588833612779)=-0.49314992129802704; dx=-6.338336321427303E-7 evalInputDelta=1.6987323760986328E-6
New Minimum: -0.49314992129802704 > -0.49315133690834045
WOLFE (weak): th(9.283177667225559)=-0.49315133690834045; dx=-6.338410532096188E-7 evalInputDelta=3.11434268951416E-6
New Minimum: -0.49315133690834045 > -0.4931572377681732
WOLFE (weak): th(27.849533001676676)=-0.4931572377681732; dx=-6.33837628560619E-7 evalInputDelta=9.015202522277832E-6
New Minimum: -0.4931572377681732 > -0.4931836724281311
WOLFE (weak): th(111.3981320067067)=-0.4931836724281311; dx=-6.338008316192117E-7 evalInputDelta=3.5449862480163574E-5
New Minimum: -0.4931836724281311 > -0.4933248311281204
WOLFE (weak): th(556.9906600335335)=-0.4933248311281204; dx=-6.336561655957732E-7 evalInputDelta=1.7660856246948242E-4
New Minimum: -0.4933248311281204 > -0.49420681595802307
WOLFE (weak): th(3341.9439602012008)=-0.49420681595802307; dx=-6.3300356151663E-7 evalInputDelta=0.0010585933923721313
New Minimum: -0.49420681595802307 > -0.5005288422107697
WOLFE (weak): th(23393.607721408407)=-0.5005288422107697; dx=-6.281272668050042E-7 evalInputDelta=0.007380619645118713
New Minimum: -0.5005288422107697 > -0.5503229349851608
WOLFE (weak): th(187148.86177126726)=-0.5503229349851608; dx=-5.885203280169542E-7 evalInputDelta=0.05717471241950989
New Minimum: -0.5503229349851608 > -0.859088346362114
END: th(1684339.7559414054)=-0.859088346362114; dx=-2.685796521440356E-7 evalInputDelta=0.365940123796463
Fitness changed from -0.49314822256565094 to -0.859088346362114
Iteration 2 complete. Error: -0.859088346362114 Total: 47.3333; Orientation: 0.0443; Line Search: 43.0295
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6ce45ba4-f321-4297-829e-4b64cf989813.jpg)
Adding measurement 194398ff to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.859088346362114;dx=-2.7864130788383657E-7
New Minimum: -0.859088346362114 > -1.184558629989624
END: th(3628800.0000000005)=-1.184558629989624; dx=-1.1064008733199495E-7 evalInputDelta=0.32547028362751007
Fitness changed from -0.859088346362114 to -1.184558629989624
Iteration 3 complete. Error: -1.184558629989624 Total: 12.5953; Orientation: 0.0443; Line Search: 8.5375
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/28e3d622-7dc4-4805-9ae6-222b1dc3284d.jpg)
Adding measurement 76874d74 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.818e+03, gradient 3.994e-04, dot -0.574; [61f922ee-6be7-424d-b92d-6f423a930349 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.184558629989624, -0.859088346362114, -0.49314822256565094, -0.49314773082733154
LBFGS Accumulation History: 3 points
Removed measurement 76874d74 to history. Total: 3
th(0)=-1.184558629989624;dx=-1.595338768860531E-7
New Minimum: -1.184558629989624 > -1.4763101860880852
END: th(7818012.603187701)=-1.4763101860880852; dx=-2.7273316263508294E-8 evalInputDelta=0.29175155609846115
Fitness changed from -1.184558629989624 to -1.4763101860880852
Iteration 4 complete. Error: -1.4763101860880852 Total: 14.2719; Orientation: 1.0148; Line Search: 8.7913
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/255e3c4e-1929-496e-b9c6-d3a2bba7a252.jpg)
Adding measurement 3390dfd3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.578e+03, gradient 3.673e-04, dot -0.343; [61f922ee-6be7-424d-b92d-6f423a930349 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4763101860880852, -0.859088346362114, -0.49314822256565094, -0.49314773082733154
LBFGS Accumulation History: 3 points
Removed measurement 3390dfd3 to history. Total: 3
th(0)=-1.4763101860880852;dx=-1.348726676958106E-7
New Minimum: -1.4763101860880852 > -1.5876158624887466
WOLF (strong): th(1.6843397559414055E7)=-1.5876158624887466; dx=2.4784216259618548E-8 evalInputDelta=0.11130567640066147
New Minimum: -1.5876158624887466 > -1.6668915003538132
WOLF (strong): th(8421698.779707028)=-1.6668915003538132; dx=6.069186722252639E-9 evalInputDelta=0.190581314265728
END: th(2807232.926569009)=-1.6083128079771996; dx=-5.8335370596785426E-8 evalInputDelta=0.13200262188911438
Fitness changed from -1.4763101860880852 to -1.6668915003538132
Iteration 5 complete. Error: -1.6668915003538132 Total: 22.7265; Orientation: 1.0249; Line Search: 17.4724
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ddc0256e-52ca-452c-b0c6-658c64aaa935.jpg)
Adding measurement 3b8edbc6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.758e+03, gradient 3.202e-04, dot -0.294; [61f922ee-6be7-424d-b92d-6f423a930349 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6668915003538132, -0.859088346362114, -0.49314822256565094, -0.49314773082733154
LBFGS Accumulation History: 3 points
Removed measurement 3b8edbc6 to history. Total: 3
th(0)=-1.6668915003538132;dx=-1.025010386155291E-7
New Minimum: -1.6668915003538132 > -1.8219719380140305
END: th(6048000.000000001)=-1.8219719380140305; dx=-1.5746305475674793E-8 evalInputDelta=0.15508043766021729
Fitness changed from -1.6668915003538132 to -1.8219719380140305
Iteration 6 complete. Error: -1.8219719380140305 Total: 13.7795; Orientation: 1.0252; Line Search: 8.5386
Adding measurement 75c81a9d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.201e+03, gradient 2.139e-04, dot -0.472; [61f922ee-6be7-424d-b92d-6f423a930349 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8219719380140305, -0.859088346362114, -0.49314822256565094, -0.49314773082733154
LBFGS Accumulation History: 3 points
Removed measurement 75c81a9d to history. Total: 3
th(0)=-1.8219719380140305;dx=-4.5749336326934385E-8
New Minimum: -1.8219719380140305 > -1.9401459321379662
WOLF (strong): th(1.3030021005312836E7)=-1.9401459321379662; dx=2.195817547276061E-9 evalInputDelta=0.1181739941239357
END: th(6515010.502656418)=-1.9198905676603317; dx=-1.6261946112007967E-8 evalInputDelta=0.09791862964630127
Fitness changed from -1.8219719380140305 to -1.9401459321379662
Iteration 7 complete. Error: -1.9401459321379662 Total: 18.2680; Orientation: 1.0132; Line Search: 13.3115
Adding measurement 30f000c6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.881e+03, gradient 2.663e-04, dot -0.254; [61f922ee-6be7-424d-b92d-6f423a930349 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9401459321379662, -0.859088346362114, -0.49314822256565094, -0.49314773082733154
LBFGS Accumulation History: 3 points
Removed measurement 30f000c6 to history. Total: 3
th(0)=-1.9401459321379662;dx=-7.09391625889582E-8
New Minimum: -1.9401459321379662 > -1.9812466949224472
WOLF (strong): th(1.4036164632845048E7)=-1.9812466949224472; dx=2.2670655858234688E-8 evalInputDelta=0.04110076278448105
New Minimum: -1.9812466949224472 > -2.0337245985865593
WOLF (strong): th(7018082.316422524)=-2.0337245985865593; dx=2.222437552838263E-9 evalInputDelta=0.09357866644859314
END: th(2339360.7721408415)=-2.001783676445484; dx=-3.559702902645302E-8 evalInputDelta=0.061637744307518005
Fitness changed from -1.9401459321379662 to -2.0337245985865593
Iteration 8 complete. Error: -2.0337245985865593 Total: 23.2061; Orientation: 1.0091; Line Search: 18.1460
Adding measurement 7c28e8ec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.191e+03, gradient 1.834e-04, dot -0.389; [61f922ee-6be7-424d-b92d-6f423a930349 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0337245985865593, -0.859088346362114, -0.49314822256565094, -0.49314773082733154
LBFGS Accumulation History: 3 points
Removed measurement 7c28e8ec to history. Total: 3
th(0)=-2.0337245985865593;dx=-3.362132326800599E-8
New Minimum: -2.0337245985865593 > -2.0914488956332207
END: th(5040000.000000002)=-2.0914488956332207; dx=-1.2948128259548475E-8 evalInputDelta=0.05772429704666138
Fitness changed from -2.0337245985865593 to -2.0914488956332207
Iteration 9 complete. Error: -2.0914488956332207 Total: 14.7318; Orientation: 1.0308; Line Search: 9.3104
Adding measurement 49d43f05 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.394e+03, gradient 1.371e-04, dot -0.526; [61f922ee-6be7-424d-b92d-6f423a930349 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0914488956332207, -0.859088346362114, -0.49314822256565094, -0.49314773082733154
LBFGS Accumulation History: 3 points
Removed measurement 49d43f05 to history. Total: 3
th(0)=-2.0914488956332207;dx=-1.8802196227590105E-8
New Minimum: -2.0914488956332207 > -2.15603319555521
END: th(1.0858350837760698E7)=-2.15603319555521; dx=-6.759669942408472E-9 evalInputDelta=0.06458429992198944
Fitness changed from -2.0914488956332207 to -2.15603319555521
Iteration 10 complete. Error: -2.15603319555521 Total: 13.5854; Orientation: 1.0097; Line Search: 8.5238
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0735d4a5-2207-472d-b21e-af1e61125ae2.jpg)
Final threshold in iteration 11: -2.15603319555521 (> -Infinity) after 200.827s (< 5400.000s)
Returns
-2.15603319555521