BasicOptimizer.scala:89 executed in 108.89 seconds (1.321 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: 44753519282400
Reset training subject: 44755830856600
Corrupt weights measurement
LBFGS Accumulation History: 0 points
Constructing line search parameters: GD+Trust
New Minimum: -49.46045912071159 > -49.69721283245882
th(0)=-49.69721283245882;dx=-1.8388031829934807E-6
New Minimum: -49.69721283245882 > -49.69721635184857
WOLFE (weak): th(2.154434690031884)=-49.69721635184857; dx=-1.703476430049338E-6 evalInputDelta=3.5193897502949767E-6
New Minimum: -49.69721635184857 > -49.697219871238055
WOLFE (weak): th(4.308869380063768)=-49.697219871238055; dx=-1.703548855817681E-6 evalInputDelta=7.038779237689141E-6
New Minimum: -49.697219871238055 > -49.6972357084877
WOLFE (weak): th(12.926608140191302)=-49.6972357084877; dx=-1.7038234340343559E-6 evalInputDelta=2.287602888628726E-5
New Minimum: -49.6972357084877 > -49.69730785589443
WOLFE (weak): th(51.70643256076521)=-49.69730785589443; dx=-1.7037464977906613E-6 evalInputDelta=9.502343561251791E-5
New Minimum: -49.69730785589443 > -49.69768970749808
WOLFE (weak): th(258.53216280382605)=-49.69768970749808; dx=-1.7029586670011377E-6 evalInputDelta=4.7687503926141517E-4
New Minimum: -49.69768970749808 > -49.70008281202712
WOLFE (weak): th(1551.1929768229563)=-49.70008281202712; dx=-1.7039112370401363E-6 evalInputDelta=0.002869979568302483
New Minimum: -49.70008281202712 > -49.71730976422016
WOLFE (weak): th(10858.350837760694)=-49.71730976422016; dx=-1.7032749186141232E-6 evalInputDelta=0.020096931761344194
New Minimum: -49.71730976422016 > -49.85765271539191
WOLFE (weak): th(86866.80670208555)=-49.85765271539191; dx=-1.6936175260542914E-6 evalInputDelta=0.16043988293309042
New Minimum: -49.85765271539191 > -51.0940950966016
END: th(781801.26031877)=-51.0940950966016; dx=-1.5848902853749756E-6 evalInputDelta=1.396882264142782
Fitness changed from -49.46045912071159 to -51.0940950966016
Iteration 1 complete. Error: -51.0940950966016 Total: 29.2747; Orientation: 0.0394; Line Search: 22.3819
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4eef91eb-485d-4591-9329-b3719eced8ef.jpg)
Adding measurement 2cd04267 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-51.0940950966016;dx=-1.5360355464957919E-6
New Minimum: -51.0940950966016 > -53.727878818973515
END: th(1684339.7559414052)=-53.727878818973515; dx=-1.3509710165262905E-6 evalInputDelta=2.6337837223719163
Fitness changed from -51.0940950966016 to -53.727878818973515
Iteration 2 complete. Error: -53.727878818973515 Total: 7.3047; Orientation: 0.0627; Line Search: 4.4589
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/00a4da9f-39a5-48e8-a010-080461b0f5ef.jpg)
Adding measurement 57576bfb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-53.727878818973515;dx=-1.2782795130978664E-6
New Minimum: -53.727878818973515 > -58.218726097370975
END: th(3628800.0)=-58.218726097370975; dx=-1.014311201410255E-6 evalInputDelta=4.49084727839746
Fitness changed from -53.727878818973515 to -58.218726097370975
Iteration 3 complete. Error: -58.218726097370975 Total: 7.3238; Orientation: 0.0597; Line Search: 4.4358
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/683f83f5-ee77-4ed0-9b90-5b7aaefea246.jpg)
Adding measurement 68889d24 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-58.218726097370975;dx=-9.39396901961161E-7
New Minimum: -58.218726097370975 > -64.8111647829817
END: th(7818012.6031877)=-64.8111647829817; dx=-6.422837266758733E-7 evalInputDelta=6.59243868561073
Fitness changed from -58.218726097370975 to -64.8111647829817
Iteration 4 complete. Error: -64.8111647829817 Total: 7.3711; Orientation: 0.0627; Line Search: 4.4342
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/bdbdd7a0-e283-4166-9802-00a75041a7a6.jpg)
Adding measurement 53069c8e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.983e+04, gradient 7.921e-04, dot -0.864; [8abe00ff-a98b-47f6-aaf3-d87df23345d8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.8111647829817, -58.218726097370975, -53.727878818973515, -51.0940950966016
LBFGS Accumulation History: 3 points
Removed measurement 53069c8e to history. Total: 3
th(0)=-64.8111647829817;dx=-6.260550562008111E-7
New Minimum: -64.8111647829817 > -73.45655731706469
END: th(1.684339755941405E7)=-73.45655731706469; dx=-3.6253393412554583E-7 evalInputDelta=8.645392534082987
Fitness changed from -64.8111647829817 to -73.45655731706469
Iteration 5 complete. Error: -73.45655731706469 Total: 8.7575; Orientation: 1.0836; Line Search: 4.7907
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1fb507ed-a2d3-4671-a279-d388d7d046b5.jpg)
Adding measurement 3622868a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.802e+04, gradient 6.668e-04, dot -0.719; [8abe00ff-a98b-47f6-aaf3-d87df23345d8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.45655731706469, -58.218726097370975, -53.727878818973515, -51.0940950966016
LBFGS Accumulation History: 3 points
Removed measurement 3622868a to history. Total: 3
th(0)=-73.45655731706469;dx=-4.445799394012498E-7
New Minimum: -73.45655731706469 > -83.1474847556802
END: th(3.6288E7)=-83.1474847556802; dx=-1.3720649725954103E-7 evalInputDelta=9.690927438615503
Fitness changed from -73.45655731706469 to -83.1474847556802
Iteration 6 complete. Error: -83.1474847556802 Total: 8.4162; Orientation: 1.0621; Line Search: 4.7373
Adding measurement 78846bae to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.884e+04, gradient 7.289e-04, dot -0.459; [8abe00ff-a98b-47f6-aaf3-d87df23345d8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -83.1474847556802, -58.218726097370975, -53.727878818973515, -51.0940950966016
LBFGS Accumulation History: 3 points
Removed measurement 78846bae to history. Total: 3
th(0)=-83.1474847556802;dx=-5.302422188672864E-7
Armijo: th(7.8180126031877E7)=-80.0176618369583; dx=1.45736663679178E-7 evalInputDelta=-3.1298229187218993
New Minimum: -83.1474847556802 > -86.75434053024249
WOLF (strong): th(3.90900630159385E7)=-86.75434053024249; dx=1.165313639248061E-7 evalInputDelta=3.606855774562291
New Minimum: -86.75434053024249 > -87.84403183422064
END: th(1.3030021005312832E7)=-87.84403183422064; dx=-1.6257909673224883E-7 evalInputDelta=4.696547078540448
Fitness changed from -83.1474847556802 to -87.84403183422064
Iteration 7 complete. Error: -87.84403183422064 Total: 12.2304; Orientation: 1.0447; Line Search: 9.0433
Adding measurement 5fc2f520 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.725e+04, gradient 5.491e-04, dot -0.613; [8abe00ff-a98b-47f6-aaf3-d87df23345d8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.84403183422064, -58.218726097370975, -53.727878818973515, -51.0940950966016
LBFGS Accumulation History: 3 points
Removed measurement 5fc2f520 to history. Total: 3
th(0)=-87.84403183422064;dx=-3.0106246016336423E-7
New Minimum: -87.84403183422064 > -92.65617908484984
END: th(2.807232926569009E7)=-92.65617908484984; dx=-7.4859107782589E-8 evalInputDelta=4.812147250629195
Fitness changed from -87.84403183422064 to -92.65617908484984
Iteration 8 complete. Error: -92.65617908484984 Total: 7.8176; Orientation: 1.0635; Line Search: 4.6394
Adding measurement 208b9020 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.050e+04, gradient 6.532e-04, dot -0.466; [8abe00ff-a98b-47f6-aaf3-d87df23345d8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.65617908484984, -58.218726097370975, -53.727878818973515, -51.0940950966016
LBFGS Accumulation History: 3 points
Removed measurement 208b9020 to history. Total: 3
th(0)=-92.65617908484984;dx=-4.262435693126736E-7
Armijo: th(6.048000000000001E7)=-90.58674543114718; dx=1.2779503712569007E-7 evalInputDelta=-2.06943365370266
New Minimum: -92.65617908484984 > -95.26293655154335
WOLF (strong): th(3.0240000000000004E7)=-95.26293655154335; dx=1.0017536733098669E-7 evalInputDelta=2.6067574666935087
New Minimum: -95.26293655154335 > -95.78583336231455
END: th(1.0080000000000002E7)=-95.78583336231455; dx=-1.6269970209928047E-7 evalInputDelta=3.1296542774647094
Fitness changed from -92.65617908484984 to -95.78583336231455
Iteration 9 complete. Error: -95.78583336231455 Total: 12.2216; Orientation: 0.9994; Line Search: 8.9834
Adding measurement 234f4065 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.614e+04, gradient 4.572e-04, dot -0.654; [8abe00ff-a98b-47f6-aaf3-d87df23345d8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.78583336231455, -58.218726097370975, -53.727878818973515, -51.0940950966016
LBFGS Accumulation History: 3 points
Removed measurement 234f4065 to history. Total: 3
th(0)=-95.78583336231455;dx=-2.08436675679926E-7
New Minimum: -95.78583336231455 > -99.22148019931325
END: th(2.1716701675521392E7)=-99.22148019931325; dx=-1.18021924745226E-7 evalInputDelta=3.4356468369987
Fitness changed from -95.78583336231455 to -99.22148019931325
Iteration 10 complete. Error: -99.22148019931325 Total: 7.7661; Orientation: 1.0445; Line Search: 4.5132
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e5a4793a-27e1-40ba-94f0-0e48156649c9.jpg)
Final threshold in iteration 11: -99.22148019931325 (> -Infinity) after 108.889s (< 5400.000s)
Returns
-99.22148019931325