BasicOptimizer.scala:89 executed in 86.51 seconds (1.204 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: 310030806751100
Reset training subject: 310032549147700
Adding measurement c6a53c5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-150.18484047749374;dx=-2.8788756688877792E-5
New Minimum: -150.18484047749374 > -150.18488159001836
END: th(2.154434690031884)=-150.18488159001836; dx=-1.7860165537889736E-5 evalInputDelta=4.111252462735138E-5
Fitness changed from -150.18484047749374 to -150.18488159001836
Iteration 1 complete. Error: -150.18488159001836 Total: 8.1361; Orientation: 0.0623; Line Search: 3.1989
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d8de8cc1-6493-49d1-b54d-e1747a944abb.jpg)
Adding measurement 1aa7a260 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-150.18488159001836;dx=-1.770675519320115E-5
New Minimum: -150.18488159001836 > -150.18497066711646
WOLFE (weak): th(4.641588833612779)=-150.18497066711646; dx=-1.7701092653303004E-5 evalInputDelta=8.907709809591324E-5
New Minimum: -150.18497066711646 > -150.18506659623992
WOLFE (weak): th(9.283177667225559)=-150.18506659623992; dx=-1.7679816450649257E-5 evalInputDelta=1.8500622155670499E-4
New Minimum: -150.18506659623992 > -150.18542975593806
WOLFE (weak): th(27.849533001676676)=-150.18542975593806; dx=-1.7687175360530772E-5 evalInputDelta=5.481659196959754E-4
New Minimum: -150.18542975593806 > -150.18706738970607
WOLFE (weak): th(111.3981320067067)=-150.18706738970607; dx=-1.767358338351485E-5 evalInputDelta=0.0021857996877088226
New Minimum: -150.18706738970607 > -150.19579656718108
WOLFE (weak): th(556.9906600335335)=-150.19579656718108; dx=-1.7661520136571427E-5 evalInputDelta=0.010914977162713058
New Minimum: -150.19579656718108 > -150.25033216276987
WOLFE (weak): th(3341.9439602012008)=-150.25033216276987; dx=-1.764830897749976E-5 evalInputDelta=0.06545057275150157
New Minimum: -150.25033216276987 > -150.64220616575324
WOLFE (weak): th(23393.607721408407)=-150.64220616575324; dx=-1.759009170704466E-5 evalInputDelta=0.45732457573487295
New Minimum: -150.64220616575324 > -153.7832066477872
WOLFE (weak): th(187148.86177126726)=-153.7832066477872; dx=-1.6997067019999786E-5 evalInputDelta=3.5983250577688466
New Minimum: -153.7832066477872 > -176.39087851047222
END: th(1684339.7559414054)=-176.39087851047222; dx=-1.0021842475045062E-5 evalInputDelta=26.205996920453856
Fitness changed from -150.18488159001836 to -176.39087851047222
Iteration 2 complete. Error: -176.39087851047222 Total: 18.1667; Orientation: 0.0555; Line Search: 16.1081
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1c74e7e9-0378-4898-97c5-cdc4122d20bf.jpg)
Adding measurement 7a0658ef to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-176.39087851047222;dx=-1.2339616323491991E-5
New Minimum: -176.39087851047222 > -206.39884459711737
END: th(3628800.0000000005)=-206.39884459711737; dx=-4.3189289834671624E-6 evalInputDelta=30.007966086645155
Fitness changed from -176.39087851047222 to -206.39884459711737
Iteration 3 complete. Error: -206.39884459711737 Total: 5.3080; Orientation: 0.0653; Line Search: 3.4020
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b8dfa3d9-82a3-450c-944c-e7d79f4ade36.jpg)
Adding measurement 7624811e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.342e+04, gradient 3.086e-03, dot -0.423; [5b6cbde6-bdc2-4b99-a25d-f0b026f18f5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -206.39884459711737, -176.39087851047222, -150.18488159001836, -150.18484047749374
LBFGS Accumulation History: 3 points
Removed measurement 7624811e to history. Total: 3
th(0)=-206.39884459711737;dx=-9.519734352708356E-6
New Minimum: -206.39884459711737 > -232.02206623225925
END: th(7818012.603187701)=-232.02206623225925; dx=-2.626367374751048E-7 evalInputDelta=25.623221635141874
Fitness changed from -206.39884459711737 to -232.02206623225925
Iteration 4 complete. Error: -232.02206623225925 Total: 6.4146; Orientation: 1.0760; Line Search: 3.4284
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/55da2d15-a3f4-434b-b437-56072bccb073.jpg)
Adding measurement 1931daf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.038e+04, gradient 3.609e-03, dot -0.171; [5b6cbde6-bdc2-4b99-a25d-f0b026f18f5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -232.02206623225925, -176.39087851047222, -150.18488159001836, -150.18484047749374
LBFGS Accumulation History: 3 points
Removed measurement 1931daf to history. Total: 3
th(0)=-232.02206623225925;dx=-1.3024229331454376E-5
Armijo: th(1.6843397559414055E7)=-209.2382570915939; dx=3.0220892227795476E-6 evalInputDelta=-22.78380914066534
New Minimum: -232.02206623225925 > -244.85809314311675
WOLF (strong): th(8421698.779707028)=-244.85809314311675; dx=3.736948306840734E-6 evalInputDelta=12.836026910857498
New Minimum: -244.85809314311675 > -256.8703446326086
END: th(2807232.926569009)=-256.8703446326086; dx=-3.2082177558076503E-6 evalInputDelta=24.84827840034933
Fitness changed from -232.02206623225925 to -256.8703446326086
Iteration 5 complete. Error: -256.8703446326086 Total: 9.7554; Orientation: 1.0771; Line Search: 6.8241
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/aa1c5853-4df8-4621-9db4-638af6fc1d50.jpg)
Adding measurement 64429dd6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.436e+04, gradient 2.444e-03, dot -0.410; [5b6cbde6-bdc2-4b99-a25d-f0b026f18f5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -256.8703446326086, -176.39087851047222, -150.18488159001836, -150.18484047749374
LBFGS Accumulation History: 3 points
Removed measurement 64429dd6 to history. Total: 3
th(0)=-256.8703446326086;dx=-5.96191151331878E-6
New Minimum: -256.8703446326086 > -274.71351936789324
END: th(6048000.000000001)=-274.71351936789324; dx=-5.256316512562865E-7 evalInputDelta=17.843174735284663
Fitness changed from -256.8703446326086 to -274.71351936789324
Iteration 6 complete. Error: -274.71351936789324 Total: 6.2069; Orientation: 1.0562; Line Search: 3.2700
Adding measurement 7e7921cb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.463e+04, gradient 2.814e-03, dot -0.289; [5b6cbde6-bdc2-4b99-a25d-f0b026f18f5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -274.71351936789324, -176.39087851047222, -150.18488159001836, -150.18484047749374
LBFGS Accumulation History: 3 points
Removed measurement 7e7921cb to history. Total: 3
th(0)=-274.71351936789324;dx=-7.89917926168546E-6
Armijo: th(1.3030021005312836E7)=-261.0390535686242; dx=2.6411521901602805E-6 evalInputDelta=-13.674465799269058
New Minimum: -274.71351936789324 > -282.7159475137869
WOLF (strong): th(6515010.502656418)=-282.7159475137869; dx=2.465618282675827E-6 evalInputDelta=8.002428145893646
New Minimum: -282.7159475137869 > -287.10374302722914
END: th(2171670.167552139)=-287.10374302722914; dx=-2.600614029193999E-6 evalInputDelta=12.390223659335902
Fitness changed from -274.71351936789324 to -287.10374302722914
Iteration 7 complete. Error: -287.10374302722914 Total: 9.5011; Orientation: 1.0261; Line Search: 6.9164
Adding measurement 1009a1c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.319e+04, gradient 1.875e-03, dot -0.503; [5b6cbde6-bdc2-4b99-a25d-f0b026f18f5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -287.10374302722914, -176.39087851047222, -150.18488159001836, -150.18484047749374
LBFGS Accumulation History: 3 points
Removed measurement 1009a1c1 to history. Total: 3
th(0)=-287.10374302722914;dx=-3.5130341229190337E-6
New Minimum: -287.10374302722914 > -298.80209462912666
END: th(4678721.544281682)=-298.80209462912666; dx=-1.4909242935782627E-6 evalInputDelta=11.698351601897514
Fitness changed from -287.10374302722914 to -298.80209462912666
Iteration 8 complete. Error: -298.80209462912666 Total: 5.8475; Orientation: 1.0215; Line Search: 3.2249
Adding measurement b33f6a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.322e+04, gradient 1.968e-03, dot -0.430; [5b6cbde6-bdc2-4b99-a25d-f0b026f18f5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -298.80209462912666, -176.39087851047222, -150.18488159001836, -150.18484047749374
LBFGS Accumulation History: 3 points
Removed measurement b33f6a0 to history. Total: 3
th(0)=-298.80209462912666;dx=-3.863579493195689E-6
New Minimum: -298.80209462912666 > -303.31897645575935
WOLF (strong): th(1.0080000000000002E7)=-303.31897645575935; dx=8.863102083380283E-7 evalInputDelta=4.516881826632698
New Minimum: -303.31897645575935 > -307.03033791271474
END: th(5040000.000000001)=-307.03033791271474; dx=-9.111590622793488E-8 evalInputDelta=8.228243283588085
Fitness changed from -298.80209462912666 to -307.03033791271474
Iteration 9 complete. Error: -307.03033791271474 Total: 7.5569; Orientation: 1.0233; Line Search: 4.8529
Adding measurement 13a55f0f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.971e+04, gradient 2.246e-03, dot -0.316; [5b6cbde6-bdc2-4b99-a25d-f0b026f18f5e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -307.03033791271474, -176.39087851047222, -150.18488159001836, -150.18484047749374
LBFGS Accumulation History: 3 points
Removed measurement 13a55f0f to history. Total: 3
th(0)=-307.03033791271474;dx=-5.035559569310757E-6
Armijo: th(1.0858350837760696E7)=-298.15332254826967; dx=2.5257711539856087E-6 evalInputDelta=-8.877015364445072
New Minimum: -307.03033791271474 > -313.3933117690351
WOLF (strong): th(5429175.418880348)=-313.3933117690351; dx=1.6509244606506716E-6 evalInputDelta=6.362973856320366
New Minimum: -313.3933117690351 > -314.19108161399
END: th(1809725.1396267826)=-314.19108161399; dx=-2.2905539506683846E-6 evalInputDelta=7.160743701275237
Fitness changed from -307.03033791271474 to -314.19108161399
Iteration 10 complete. Error: -314.19108161399 Total: 9.3368; Orientation: 0.9955; Line Search: 6.4865
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1db6c043-f61e-42d8-974d-b15056889d23.jpg)
Final threshold in iteration 11: -314.19108161399 (> -Infinity) after 86.508s (< 5400.000s)
Returns
-314.19108161399