BasicOptimizer.scala:89 executed in 220.51 seconds (4.232 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: 693586633604000
Reset training subject: 693591130387400
Adding measurement 4be1ee2d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-969.3265381180895;dx=-0.006115782770943599
New Minimum: -969.3265381180895 > -969.339917160126
WOLFE (weak): th(2.154434690031884)=-969.339917160126; dx=-0.005717949262696827 evalInputDelta=0.013379042036490318
New Minimum: -969.339917160126 > -969.3533282554922
WOLFE (weak): th(4.308869380063768)=-969.3533282554922; dx=-0.005719420394565547 evalInputDelta=0.0267901374027133
New Minimum: -969.3533282554922 > -969.4068740730075
WOLFE (weak): th(12.926608140191302)=-969.4068740730075; dx=-0.005719214073534623 evalInputDelta=0.08033595491804135
New Minimum: -969.4068740730075 > -969.6478420024457
WOLFE (weak): th(51.70643256076521)=-969.6478420024457; dx=-0.005714896182224111 evalInputDelta=0.3213038843562117
New Minimum: -969.6478420024457 > -970.9317046013072
WOLFE (weak): th(258.53216280382605)=-970.9317046013072; dx=-0.005707919977094826 evalInputDelta=1.6051664832176584
New Minimum: -970.9317046013072 > -978.9065966679354
WOLFE (weak): th(1551.1929768229563)=-978.9065966679354; dx=-0.005644668720721322 evalInputDelta=9.580058549845944
New Minimum: -978.9065966679354 > -1033.5755898820366
END: th(10858.350837760694)=-1033.5755898820366; dx=-0.005139958553709821 evalInputDelta=64.24905176394714
Fitness changed from -969.3265381180895 to -1033.5755898820366
Iteration 1 complete. Error: -1033.5755898820366 Total: 49.8186; Orientation: 0.0976; Line Search: 36.3435
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bb88e03b-8904-4dce-a13b-4c8b2f3f1576.jpg)
Adding measurement 3e309225 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1033.5755898820366;dx=-0.004837297950949518
New Minimum: -1033.5755898820366 > -1144.3360520406582
END: th(23393.607721408407)=-1144.3360520406582; dx=-0.0038485724859255886 evalInputDelta=110.76046215862152
Fitness changed from -1033.5755898820366 to -1144.3360520406582
Iteration 2 complete. Error: -1144.3360520406582 Total: 15.2679; Orientation: 0.0970; Line Search: 9.6157
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/dac7c346-5c75-45cb-96f7-c1245c26362a.jpg)
Adding measurement 70895b99 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1144.3360520406582;dx=-0.003557721689380061
New Minimum: -1144.3360520406582 > -1307.7131279451162
END: th(50400.00000000001)=-1307.7131279451162; dx=-0.0024183931427336895 evalInputDelta=163.37707590445802
Fitness changed from -1144.3360520406582 to -1307.7131279451162
Iteration 3 complete. Error: -1307.7131279451162 Total: 15.0499; Orientation: 0.0998; Line Search: 9.3820
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ab955307-140d-4455-bbfa-b8165026b82a.jpg)
Adding measurement 5e1952b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.155e+04, gradient 4.943e-02, dot -0.850; [3580c56c-8403-4271-9c05-0c8d72a1db5b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1307.7131279451162, -1144.3360520406582, -1033.5755898820366, -969.3265381180895
LBFGS Accumulation History: 3 points
Removed measurement 5e1952b1 to history. Total: 3
th(0)=-1307.7131279451162;dx=-0.0024374580111642015
New Minimum: -1307.7131279451162 > -1518.5628073938858
END: th(108583.50837760697)=-1518.5628073938858; dx=-0.0012958791479142852 evalInputDelta=210.84967944876962
Fitness changed from -1307.7131279451162 to -1518.5628073938858
Iteration 4 complete. Error: -1518.5628073938858 Total: 16.8212; Orientation: 1.8885; Line Search: 9.3762
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e523f770-578a-424f-b698-80ed2f59344a.jpg)
Adding measurement 862cdb5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.208e+04, gradient 4.840e-02, dot -0.636; [3580c56c-8403-4271-9c05-0c8d72a1db5b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1518.5628073938858, -1144.3360520406582, -1033.5755898820366, -969.3265381180895
LBFGS Accumulation History: 3 points
Removed measurement 862cdb5 to history. Total: 3
th(0)=-1518.5628073938858;dx=-0.0023375478504389525
New Minimum: -1518.5628073938858 > -1725.3193907216137
END: th(233936.07721408413)=-1725.3193907216137; dx=-3.780240104899605E-4 evalInputDelta=206.75658332772787
Fitness changed from -1518.5628073938858 to -1725.3193907216137
Iteration 5 complete. Error: -1725.3193907216137 Total: 16.6581; Orientation: 1.7445; Line Search: 9.2868
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c4160695-5cee-49d4-a5fd-fc729c7548cd.jpg)
Adding measurement 6d8af6ce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.134e+04, gradient 5.613e-02, dot -0.369; [3580c56c-8403-4271-9c05-0c8d72a1db5b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1725.3193907216137, -1144.3360520406582, -1033.5755898820366, -969.3265381180895
LBFGS Accumulation History: 3 points
Removed measurement 6d8af6ce to history. Total: 3
th(0)=-1725.3193907216137;dx=-0.0031486907095330417
New Minimum: -1725.3193907216137 > -1803.1039903455373
WOLF (strong): th(504000.0000000002)=-1803.1039903455373; dx=3.062678401479381E-4 evalInputDelta=77.78459962392367
New Minimum: -1803.1039903455373 > -1897.8448303272846
WOLF (strong): th(252000.0000000001)=-1897.8448303272846; dx=2.21480858419916E-4 evalInputDelta=172.52543960567095
END: th(84000.00000000003)=-1888.584522863618; dx=-7.309089138379762E-4 evalInputDelta=163.2651321420044
Fitness changed from -1725.3193907216137 to -1897.8448303272846
Iteration 6 complete. Error: -1897.8448303272846 Total: 25.8929; Orientation: 1.6041; Line Search: 18.6315
Adding measurement 4b3f54b2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.411e+04, gradient 5.777e-02, dot -0.293; [3580c56c-8403-4271-9c05-0c8d72a1db5b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1897.8448303272846, -1144.3360520406582, -1033.5755898820366, -969.3265381180895
LBFGS Accumulation History: 3 points
Removed measurement 4b3f54b2 to history. Total: 3
th(0)=-1897.8448303272846;dx=-0.0033296632492964624
New Minimum: -1897.8448303272846 > -2156.64044291115
WOLF (strong): th(180972.5139626783)=-2156.64044291115; dx=8.923454694642101E-5 evalInputDelta=258.79561258386525
END: th(90486.25698133915)=-2117.4946280923596; dx=-0.0011445192775590071 evalInputDelta=219.64979776507494
Fitness changed from -1897.8448303272846 to -2156.64044291115
Iteration 7 complete. Error: -2156.64044291115 Total: 20.1755; Orientation: 1.5960; Line Search: 14.3001
Adding measurement 13ec99fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.110e+04, gradient 5.341e-02, dot -0.329; [3580c56c-8403-4271-9c05-0c8d72a1db5b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2156.64044291115, -1144.3360520406582, -1033.5755898820366, -969.3265381180895
LBFGS Accumulation History: 3 points
Removed measurement 13ec99fb to history. Total: 3
th(0)=-2156.64044291115;dx=-0.0028492660234542425
New Minimum: -2156.64044291115 > -2324.6832042237497
WOLF (strong): th(194946.7310117368)=-2324.6832042237497; dx=3.728293088861816E-4 evalInputDelta=168.04276131259985
New Minimum: -2324.6832042237497 > -2328.4224273099585
END: th(97473.3655058684)=-2328.4224273099585; dx=-5.748570042381645E-4 evalInputDelta=171.78198439880862
Fitness changed from -2156.64044291115 to -2328.4224273099585
Iteration 8 complete. Error: -2328.4224273099585 Total: 20.3211; Orientation: 1.6362; Line Search: 14.0878
Adding measurement 6ca08df7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.263e+04, gradient 4.212e-02, dot -0.466; [3580c56c-8403-4271-9c05-0c8d72a1db5b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2328.4224273099585, -1144.3360520406582, -1033.5755898820366, -969.3265381180895
LBFGS Accumulation History: 3 points
Removed measurement 6ca08df7 to history. Total: 3
th(0)=-2328.4224273099585;dx=-0.0017716937396890335
New Minimum: -2328.4224273099585 > -2476.757759652728
END: th(210000.0000000001)=-2476.757759652728; dx=-1.1879950157823015E-4 evalInputDelta=148.33533234276956
Fitness changed from -2328.4224273099585 to -2476.757759652728
Iteration 9 complete. Error: -2476.757759652728 Total: 15.1441; Orientation: 1.6280; Line Search: 9.1486
Adding measurement 822ca1d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.452e+04, gradient 5.358e-02, dot -0.339; [3580c56c-8403-4271-9c05-0c8d72a1db5b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2476.757759652728, -1144.3360520406582, -1033.5755898820366, -969.3265381180895
LBFGS Accumulation History: 3 points
Removed measurement 822ca1d to history. Total: 3
th(0)=-2476.757759652728;dx=-0.0028693493867854762
Armijo: th(452431.2849066958)=-2375.0079999865266; dx=6.892210619975289E-4 evalInputDelta=-101.7497596662015
New Minimum: -2476.757759652728 > -2564.332466744513
WOLF (strong): th(226215.6424533479)=-2564.332466744513; dx=6.128463486401454E-4 evalInputDelta=87.57470709178506
New Minimum: -2564.332466744513 > -2613.073860418033
END: th(75405.21415111596)=-2613.073860418033; dx=-5.674919310853216E-4 evalInputDelta=136.31610076530478
Fitness changed from -2476.757759652728 to -2613.073860418033
Iteration 10 complete. Error: -2613.073860418033 Total: 24.3877; Orientation: 1.6105; Line Search: 18.1218
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a0c40389-6645-4861-92e3-09d944ac2e05.jpg)
Final threshold in iteration 11: -2613.073860418033 (> -Infinity) after 220.507s (< 5400.000s)
Returns
-2613.073860418033