'Iterates over predictions.
Example Usage:
>>> for pred, i_batch, batch in module.iter_predict(eval_data):
...     # pred is a list of outputs from the module
...     # i_batch is a integer
...     # batch is the data batch from the data iterator
Parameters
eval_data : DataIter
Evaluation data to run prediction on.
num_batch : int
Default is ``None``, indicating running all the batches in the data iterator.
reset : bool
Default is ``True``, indicating whether we should reset the data iter before start
doing prediction.'

def iter_predict(self, eval_data, num_batch=None, reset=True):

    assert (self.binded and self.params_initialized)
    if reset:
        eval_data.reset()
    for (nbatch, eval_batch) in enumerate(eval_data):
        if ((num_batch is not None) and (nbatch == num_batch)):
            break
        self.forward(eval_batch, is_train=False)
        pad = eval_batch.pad
        outputs = [out[0:(out.shape[0] - pad)] for out in self.get_outputs()]
        (yield (outputs, nbatch, eval_batch))
