BasicOptimizer.scala:89 executed in 66.37 seconds (0.930 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: 680572546397600
Reset training subject: 680573627372500
Adding measurement 71f4e45 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-276.0037080819749;dx=-0.006538711073478299
New Minimum: -276.0037080819749 > -276.023351593665
WOLFE (weak): th(2.154434690031884)=-276.023351593665; dx=-0.006517470988583022 evalInputDelta=0.019643511690105697
New Minimum: -276.023351593665 > -276.0429795566263
WOLFE (weak): th(4.308869380063768)=-276.0429795566263; dx=-0.006523298181686582 evalInputDelta=0.03927147465140024
New Minimum: -276.0429795566263 > -276.1215057497333
WOLFE (weak): th(12.926608140191302)=-276.1215057497333; dx=-0.006496861497222284 evalInputDelta=0.11779766775839562
New Minimum: -276.1215057497333 > -276.4750214757203
WOLFE (weak): th(51.70643256076521)=-276.4750214757203; dx=-0.006508837787713186 evalInputDelta=0.47131339374544723
New Minimum: -276.4750214757203 > -278.35594344292343
WOLFE (weak): th(258.53216280382605)=-278.35594344292343; dx=-0.0065160088535838765 evalInputDelta=2.352235360948555
New Minimum: -278.35594344292343 > -289.92013986613625
WOLFE (weak): th(1551.1929768229563)=-289.92013986613625; dx=-0.00632022427693428 evalInputDelta=13.916431784161375
New Minimum: -289.92013986613625 > -360.09795759279166
END: th(10858.350837760694)=-360.09795759279166; dx=-0.004726894336750559 evalInputDelta=84.09424951081678
Fitness changed from -276.0037080819749 to -360.09795759279166
Iteration 1 complete. Error: -360.09795759279166 Total: 11.0740; Orientation: 0.0124; Line Search: 8.0589
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/210f3d02-e282-4b9f-be97-afdf8bfa5c2d.jpg)
Adding measurement 58c994c9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-360.09795759279166;dx=-0.005345307385394391
New Minimum: -360.09795759279166 > -467.4332171551354
END: th(23393.607721408407)=-467.4332171551354; dx=-0.00283418241155508 evalInputDelta=107.33525956234377
Fitness changed from -360.09795759279166 to -467.4332171551354
Iteration 2 complete. Error: -467.4332171551354 Total: 3.0257; Orientation: 0.0121; Line Search: 1.9478
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/47a99a62-70e4-4fd6-96aa-acfac890a0e4.jpg)
Adding measurement 7a19222e to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-467.4332171551354;dx=-0.004268928685152329
New Minimum: -467.4332171551354 > -584.7430258241649
END: th(50400.00000000001)=-584.7430258241649; dx=-0.0014957197819950128 evalInputDelta=117.30980866902945
Fitness changed from -467.4332171551354 to -584.7430258241649
Iteration 3 complete. Error: -584.7430258241649 Total: 3.2018; Orientation: 0.0120; Line Search: 2.1332
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/592e6d79-0c9d-40ca-9db1-3ab5115e4635.jpg)
Adding measurement 3edad617 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.002e+04, gradient 6.191e-02, dot -0.359; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -584.7430258241649, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement 3edad617 to history. Total: 3
th(0)=-584.7430258241649;dx=-0.0037596376797860032
New Minimum: -584.7430258241649 > -692.6403513007309
END: th(108583.50837760697)=-692.6403513007309; dx=-4.7042622136855356E-4 evalInputDelta=107.89732547656604
Fitness changed from -584.7430258241649 to -692.6403513007309
Iteration 4 complete. Error: -692.6403513007309 Total: 3.2268; Orientation: 0.2356; Line Search: 1.9516
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/939a3404-8a67-4904-8c32-288bbcbcb68a.jpg)
Adding measurement 1672ac55 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.411e+03, gradient 6.058e-02, dot -0.240; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -692.6403513007309, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement 1672ac55 to history. Total: 3
th(0)=-692.6403513007309;dx=-0.003632116598479923
New Minimum: -692.6403513007309 > -695.3908298575701
WOLF (strong): th(233936.07721408413)=-695.3908298575701; dx=1.0563311499820632E-4 evalInputDelta=2.750478556839198
New Minimum: -695.3908298575701 > -887.8026244610904
END: th(116968.03860704206)=-887.8026244610904; dx=-2.5297853163424656E-4 evalInputDelta=195.16227316035952
Fitness changed from -692.6403513007309 to -887.8026244610904
Iteration 5 complete. Error: -887.8026244610904 Total: 4.4484; Orientation: 0.2383; Line Search: 3.0529
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/887c1c6c-d7fa-4ed1-9852-65e0269748ed.jpg)
Adding measurement 4a379c53 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.823e+03, gradient 5.301e-02, dot -0.217; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -887.8026244610904, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement 4a379c53 to history. Total: 3
th(0)=-887.8026244610904;dx=-0.002765690890385307
New Minimum: -887.8026244610904 > -893.1312193625301
WOLF (strong): th(252000.0000000001)=-893.1312193625301; dx=2.170517814104344E-4 evalInputDelta=5.328594901439715
New Minimum: -893.1312193625301 > -1096.1865717112212
END: th(126000.00000000004)=-1096.1865717112212; dx=-2.4140983398348887E-4 evalInputDelta=208.38394725013075
Fitness changed from -887.8026244610904 to -1096.1865717112212
Iteration 6 complete. Error: -1096.1865717112212 Total: 4.3911; Orientation: 0.2251; Line Search: 3.1028
Adding measurement 57b47f1f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.396e+03, gradient 4.926e-02, dot -0.195; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1096.1865717112212, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement 57b47f1f to history. Total: 3
th(0)=-1096.1865717112212;dx=-0.002411319099210437
Armijo: th(271458.77094401745)=-1041.1477440786202; dx=1.9761769014856785E-4 evalInputDelta=-55.03882763260094
New Minimum: -1096.1865717112212 > -1246.5787680688293
END: th(135729.38547200873)=-1246.5787680688293; dx=-1.343796565265921E-4 evalInputDelta=150.3921963576081
Fitness changed from -1096.1865717112212 to -1246.5787680688293
Iteration 7 complete. Error: -1246.5787680688293 Total: 4.0514; Orientation: 0.2331; Line Search: 2.8722
Adding measurement 562a7408 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.215e+04, gradient 4.825e-02, dot -0.206; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1246.5787680688293, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement 562a7408 to history. Total: 3
th(0)=-1246.5787680688293;dx=-0.002306184716549823
Armijo: th(292420.0965176052)=-1155.93106412104; dx=2.2799488016338735E-4 evalInputDelta=-90.6477039477893
New Minimum: -1246.5787680688293 > -1402.303863290692
END: th(146210.0482588026)=-1402.303863290692; dx=-2.24483236044327E-6 evalInputDelta=155.72509522186283
Fitness changed from -1246.5787680688293 to -1402.303863290692
Iteration 8 complete. Error: -1402.303863290692 Total: 4.3667; Orientation: 0.2059; Line Search: 2.9407
Adding measurement e79684b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.207e+04, gradient 4.877e-02, dot -0.179; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1402.303863290692, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement e79684b to history. Total: 3
th(0)=-1402.303863290692;dx=-0.0023648811988618455
Armijo: th(315000.0000000001)=-1232.0158278204058; dx=3.0384557149348303E-4 evalInputDelta=-170.28803547028633
New Minimum: -1402.303863290692 > -1535.9779458052124
WOLF (strong): th(157500.00000000006)=-1535.9779458052124; dx=8.86402164542426E-5 evalInputDelta=133.67408251452025
New Minimum: -1535.9779458052124 > -1571.0221990793127
END: th(52500.00000000002)=-1571.0221990793127; dx=-0.0012056399861440832 evalInputDelta=168.7183357886206
Fitness changed from -1402.303863290692 to -1571.0221990793127
Iteration 9 complete. Error: -1571.0221990793127 Total: 5.1683; Orientation: 0.2155; Line Search: 3.9795
Adding measurement 22a5ed79 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.932e+04, gradient 3.891e-02, dot -0.254; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1571.0221990793127, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement 22a5ed79 to history. Total: 3
th(0)=-1571.0221990793127;dx=-0.0015049441376773288
New Minimum: -1571.0221990793127 > -1709.465632880638
END: th(113107.82122667394)=-1709.465632880638; dx=-6.052899659827642E-4 evalInputDelta=138.44343380132523
Fitness changed from -1571.0221990793127 to -1709.465632880638
Iteration 10 complete. Error: -1709.465632880638 Total: 3.1826; Orientation: 0.2170; Line Search: 1.9782
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3b55e9f9-5b51-4278-9292-9899ec836426.jpg)
Adding measurement 1cf08287 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.725e+04, gradient 4.050e-02, dot -0.260; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1709.465632880638, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement 1cf08287 to history. Total: 3
th(0)=-1709.465632880638;dx=-0.001630203092576731
Armijo: th(243683.41376467102)=-1683.5054944965282; dx=-4.224562846246627E-5 evalInputDelta=-25.96013838410977
New Minimum: -1709.465632880638 > -1804.0710906169968
END: th(121841.70688233551)=-1804.0710906169968; dx=-3.1106108366577175E-4 evalInputDelta=94.60545773635886
Fitness changed from -1709.465632880638 to -1804.0710906169968
Iteration 11 complete. Error: -1804.0710906169968 Total: 4.3458; Orientation: 0.2210; Line Search: 2.9294
Adding measurement 4e935f53 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.317e+04, gradient 4.337e-02, dot -0.243; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1804.0710906169968, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement 4e935f53 to history. Total: 3
th(0)=-1804.0710906169968;dx=-0.0018695855308852262
Armijo: th(262500.0000000001)=-1696.4550539286327; dx=1.368614720243859E-4 evalInputDelta=-107.61603668836415
New Minimum: -1804.0710906169968 > -1898.7703915955715
END: th(131250.00000000006)=-1898.7703915955715; dx=-4.986905253981319E-5 evalInputDelta=94.69930097857468
Fitness changed from -1804.0710906169968 to -1898.7703915955715
Iteration 12 complete. Error: -1898.7703915955715 Total: 4.1808; Orientation: 0.2196; Line Search: 2.9841
Adding measurement 2340bd83 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.510e+04, gradient 4.567e-02, dot -0.215; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1898.7703915955715, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement 2340bd83 to history. Total: 3
th(0)=-1898.7703915955715;dx=-0.002064048792626337
Armijo: th(282769.55306668486)=-1722.3104394968987; dx=3.044133520211912E-4 evalInputDelta=-176.45995209867283
New Minimum: -1898.7703915955715 > -2012.5372667356994
WOLF (strong): th(141384.77653334243)=-2012.5372667356994; dx=7.322342432761905E-5 evalInputDelta=113.76687514012792
New Minimum: -2012.5372667356994 > -2037.2977813761051
END: th(47128.258844447475)=-2037.2977813761051; dx=-0.0011403154622185818 evalInputDelta=138.52738978053367
Fitness changed from -1898.7703915955715 to -2037.2977813761051
Iteration 13 complete. Error: -2037.2977813761051 Total: 5.0914; Orientation: 0.2106; Line Search: 3.8986
Adding measurement 14a98681 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.929e+04, gradient 3.584e-02, dot -0.300; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2037.2977813761051, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement 14a98681 to history. Total: 3
th(0)=-2037.2977813761051;dx=-0.0012396451667434105
New Minimum: -2037.2977813761051 > -2149.5527441772624
END: th(101534.75573527958)=-2149.5527441772624; dx=-6.018230975326014E-4 evalInputDelta=112.25496280115726
Fitness changed from -2037.2977813761051 to -2149.5527441772624
Iteration 14 complete. Error: -2149.5527441772624 Total: 3.3378; Orientation: 0.2250; Line Search: 2.1644
Adding measurement 68ba4e7d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.893e+04, gradient 3.641e-02, dot -0.295; [f1a54a7b-e839-42e2-958c-0655113a7923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2149.5527441772624, -467.4332171551354, -360.09795759279166, -276.0037080819749
LBFGS Accumulation History: 3 points
Removed measurement 68ba4e7d to history. Total: 3
th(0)=-2149.5527441772624;dx=-0.0013179291293776833
New Minimum: -2149.5527441772624 > -2162.0573535408353
END: th(218750.00000000012)=-2162.0573535408353; dx=-1.2392970323568065E-4 evalInputDelta=12.504609363572854
Fitness changed from -2149.5527441772624 to -2162.0573535408353
Iteration 15 complete. Error: -2162.0573535408353 Total: 3.1827; Orientation: 0.2128; Line Search: 1.9841
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/5af6d56a-7531-4fca-9863-970f784760fc.jpg)
Final threshold in iteration 16: -2162.0573535408353 (> -Infinity) after 66.370s (< 5400.000s)
Returns
-2162.0573535408353