BasicOptimizer.scala:89 executed in 111.44 seconds (1.696 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: 46932090781600
Reset training subject: 46934539797500
Adding measurement 31816b47 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-48.60119189906572;dx=-1.5699321485997378E-6
New Minimum: -48.60119189906572 > -48.60119549782233
END: th(2.154434690031884)=-48.60119549782233; dx=-1.1921298869304248E-6 evalInputDelta=3.5987566135986526E-6
Fitness changed from -48.60119189906572 to -48.60119549782233
Iteration 1 complete. Error: -48.60119549782233 Total: 11.7143; Orientation: 0.0624; Line Search: 4.7164
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f8a4c598-3738-4db3-a9d0-de05472b008a.jpg)
Adding measurement 52a2c42d to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-48.60119549782233;dx=-1.1756541148111122E-6
New Minimum: -48.60119549782233 > -48.60120089595676
WOLFE (weak): th(4.641588833612779)=-48.60120089595676; dx=-1.1738918076263613E-6 evalInputDelta=5.398134426570778E-6
New Minimum: -48.60120089595676 > -48.60120629409058
WOLFE (weak): th(9.283177667225559)=-48.60120629409058; dx=-1.171699327050312E-6 evalInputDelta=1.079626824918023E-5
New Minimum: -48.60120629409058 > -48.60122968599689
WOLFE (weak): th(27.849533001676676)=-48.60122968599689; dx=-1.1708944859604571E-6 evalInputDelta=3.418817455980161E-5
New Minimum: -48.60122968599689 > -48.60133584912249
WOLFE (weak): th(111.3981320067067)=-48.60133584912249; dx=-1.1704167114595632E-6 evalInputDelta=1.403513001605461E-4
New Minimum: -48.60133584912249 > -48.60190264832657
WOLFE (weak): th(556.9906600335335)=-48.60190264832657; dx=-1.1700089312725459E-6 evalInputDelta=7.071505042404169E-4
New Minimum: -48.60190264832657 > -48.605441844967174
WOLFE (weak): th(3341.9439602012008)=-48.605441844967174; dx=-1.169526794161155E-6 evalInputDelta=0.004246347144842844
New Minimum: -48.605441844967174 > -48.630912141416054
WOLFE (weak): th(23393.607721408407)=-48.630912141416054; dx=-1.1685744884808766E-6 evalInputDelta=0.029716643593722836
New Minimum: -48.630912141416054 > -48.837403479563505
WOLFE (weak): th(187148.86177126726)=-48.837403479563505; dx=-1.151981423523122E-6 evalInputDelta=0.23620798174117397
New Minimum: -48.837403479563505 > -50.59826298835169
END: th(1684339.7559414054)=-50.59826298835169; dx=-1.0198017795535233E-6 evalInputDelta=1.9970674905293606
Fitness changed from -48.60119549782233 to -50.59826298835169
Iteration 2 complete. Error: -50.59826298835169 Total: 25.7813; Orientation: 0.0654; Line Search: 22.9707
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/93055ab8-d836-4eb2-a5bd-f1100d8f8fd6.jpg)
Adding measurement 5d559391 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-50.59826298835169;dx=-1.0298084209499482E-6
New Minimum: -50.59826298835169 > -53.99080288177018
END: th(3628800.0000000005)=-53.99080288177018; dx=-7.633254391481201E-7 evalInputDelta=3.392539893418487
Fitness changed from -50.59826298835169 to -53.99080288177018
Iteration 3 complete. Error: -53.99080288177018 Total: 7.3954; Orientation: 0.0647; Line Search: 4.6786
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/52b457c4-c1df-47e6-9fad-72146ab589f4.jpg)
Adding measurement 56b57dce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.506e+04, gradient 8.549e-04, dot -0.885; [019540c7-ddb9-4372-a54c-7e993452fb25 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.99080288177018, -50.59826298835169, -48.60119549782233, -48.60119189906572
LBFGS Accumulation History: 3 points
Removed measurement 56b57dce to history. Total: 3
th(0)=-53.99080288177018;dx=-7.300569085076315E-7
New Minimum: -53.99080288177018 > -59.09756382725962
END: th(7818012.603187701)=-59.09756382725962; dx=-5.042088806289969E-7 evalInputDelta=5.106760945489441
Fitness changed from -53.99080288177018 to -59.09756382725962
Iteration 4 complete. Error: -59.09756382725962 Total: 8.7526; Orientation: 1.1576; Line Search: 4.8295
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/4222c812-dffa-4d17-8921-b1f1283ac5b0.jpg)
Adding measurement 373a1524 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.406e+04, gradient 7.285e-04, dot -0.771; [019540c7-ddb9-4372-a54c-7e993452fb25 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.09756382725962, -50.59826298835169, -48.60119549782233, -48.60119189906572
LBFGS Accumulation History: 3 points
Removed measurement 373a1524 to history. Total: 3
th(0)=-59.09756382725962;dx=-5.286531018170232E-7
New Minimum: -59.09756382725962 > -66.3356909135998
END: th(1.6843397559414055E7)=-66.3356909135998; dx=-3.063854288736403E-7 evalInputDelta=7.238127086340185
Fitness changed from -59.09756382725962 to -66.3356909135998
Iteration 5 complete. Error: -66.3356909135998 Total: 8.4402; Orientation: 1.1118; Line Search: 4.4726
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/69dd1ac9-3d0d-4541-9617-182da2a83a34.jpg)
Adding measurement 1ce6517a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.936e+04, gradient 6.703e-04, dot -0.623; [019540c7-ddb9-4372-a54c-7e993452fb25 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -66.3356909135998, -50.59826298835169, -48.60119549782233, -48.60119189906572
LBFGS Accumulation History: 3 points
Removed measurement 1ce6517a to history. Total: 3
th(0)=-66.3356909135998;dx=-4.48552042678869E-7
New Minimum: -66.3356909135998 > -74.45817774132261
END: th(3.628800000000001E7)=-74.45817774132261; dx=-9.416905403154204E-8 evalInputDelta=8.12248682772281
Fitness changed from -66.3356909135998 to -74.45817774132261
Iteration 6 complete. Error: -74.45817774132261 Total: 8.5825; Orientation: 1.0343; Line Search: 4.7101
Adding measurement 3fdc6b55 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.082e+04, gradient 8.164e-04, dot -0.306; [019540c7-ddb9-4372-a54c-7e993452fb25 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -74.45817774132261, -50.59826298835169, -48.60119549782233, -48.60119189906572
LBFGS Accumulation History: 3 points
Removed measurement 3fdc6b55 to history. Total: 3
th(0)=-74.45817774132261;dx=-6.652301301633358E-7
Armijo: th(7.818012603187701E7)=-70.37509371995657; dx=1.338826240441598E-7 evalInputDelta=-4.083084021366048
New Minimum: -74.45817774132261 > -77.70680944666944
WOLF (strong): th(3.9090063015938506E7)=-77.70680944666944; dx=1.5561832065412575E-7 evalInputDelta=3.248631705346824
New Minimum: -77.70680944666944 > -80.03410185436074
END: th(1.3030021005312836E7)=-80.03410185436074; dx=-1.5789689199686442E-7 evalInputDelta=5.575924113038127
Fitness changed from -74.45817774132261 to -80.03410185436074
Iteration 7 complete. Error: -80.03410185436074 Total: 12.8036; Orientation: 1.0452; Line Search: 9.6274
Adding measurement 77c6bec3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.474e+04, gradient 5.819e-04, dot -0.542; [019540c7-ddb9-4372-a54c-7e993452fb25 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.03410185436074, -50.59826298835169, -48.60119549782233, -48.60119189906572
LBFGS Accumulation History: 3 points
Removed measurement 77c6bec3 to history. Total: 3
th(0)=-80.03410185436074;dx=-3.3784875418937645E-7
New Minimum: -80.03410185436074 > -84.99575877432365
END: th(2.8072329265690096E7)=-84.99575877432365; dx=-5.7500012904296354E-8 evalInputDelta=4.9616569199629055
Fitness changed from -80.03410185436074 to -84.99575877432365
Iteration 8 complete. Error: -84.99575877432365 Total: 7.7218; Orientation: 1.0307; Line Search: 4.4660
Adding measurement 5d0eb2bd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.828e+04, gradient 7.055e-04, dot -0.384; [019540c7-ddb9-4372-a54c-7e993452fb25 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.99575877432365, -50.59826298835169, -48.60119549782233, -48.60119189906572
LBFGS Accumulation History: 3 points
Removed measurement 5d0eb2bd to history. Total: 3
th(0)=-84.99575877432365;dx=-4.965654172148124E-7
Armijo: th(6.048000000000002E7)=-82.48823091043731; dx=1.3423216292413064E-7 evalInputDelta=-2.507527863886338
New Minimum: -84.99575877432365 > -87.7324050800619
WOLF (strong): th(3.024000000000001E7)=-87.7324050800619; dx=1.2331926018515795E-7 evalInputDelta=2.7366463057382475
New Minimum: -87.7324050800619 > -88.56110096114526
END: th(1.0080000000000004E7)=-88.56110096114526; dx=-1.7364486468377674E-7 evalInputDelta=3.56534218682161
Fitness changed from -84.99575877432365 to -88.56110096114526
Iteration 9 complete. Error: -88.56110096114526 Total: 12.2035; Orientation: 1.0113; Line Search: 8.8872
Adding measurement 457b5a82 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.883e+04, gradient 4.821e-04, dot -0.618; [019540c7-ddb9-4372-a54c-7e993452fb25 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -88.56110096114526, -50.59826298835169, -48.60119549782233, -48.60119189906572
LBFGS Accumulation History: 3 points
Removed measurement 457b5a82 to history. Total: 3
th(0)=-88.56110096114526;dx=-2.3222983813920839E-7
New Minimum: -88.56110096114526 > -92.26645508455891
END: th(2.1716701675521396E7)=-92.26645508455891; dx=-1.215674474763253E-7 evalInputDelta=3.705354123413656
Fitness changed from -88.56110096114526 to -92.26645508455891
Iteration 10 complete. Error: -92.26645508455891 Total: 7.6315; Orientation: 1.0437; Line Search: 4.4195
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/64ef9dd8-370b-41f4-a21f-d6f3193f0999.jpg)
Final threshold in iteration 11: -92.26645508455891 (> -Infinity) after 111.439s (< 5400.000s)
Returns
-92.26645508455891