*/
@Override
public void iteration(final int iterations) {
if (this.learningType == -1) {
throw new EncogEngineError(
"Learning type has not been defined yet, you must first call one of the learnXXXX methods, such as learnRPROP.");
}
this.iteration += iterations;
int currentIndex = 0;
this.error = 0;
int count = this.profile.getKernelNumberOfCalls();
// If we are using an OpenCL ratio other than 1.0, which means that we
// are
// braining up a single training iteration, there is no reason to try
// and batch
// up multiple iterations.
if ((count > 0) && (iterations > 1)) {
throw new EncogEngineError(
"Must use an OpenCL ratio of 1.0 if you are going to use an iteration count > 1.");
}
this.kernel.setGlobalWork(this.profile.getKernelGlobalWorkgroup());
this.kernel.setLocalWork(this.profile.getKernelLocalWorkgroup());