'Forward computation. It supports data batches with different shapes, such as
different batch sizes or different image sizes.
If reshaping of data batch relates to modification of symbol or module, such as
changing image layout ordering or switching from training to predicting, module
rebinding is required.
See Also
:meth:`BaseModule.forward`.
Parameters
data_batch : DataBatch
Could be anything with similar API implemented.
is_train : bool
Default is ``None``, which means ``is_train`` takes the value of ``self.for_training``.'

def forward(self, data_batch, is_train=None):

    assert (self.binded and self.params_initialized)
    curr_data_shapes = tuple((i.shape for i in self._data_shapes))
    new_data_shapes = tuple((i.shape for i in data_batch.data))
    if (curr_data_shapes != new_data_shapes):
        if (hasattr(data_batch, 'provide_data') and data_batch.provide_data):
            new_dshape = data_batch.provide_data
        else:
            new_dshape = [DataDesc(i.name, shape, i.dtype, i.layout) for (i, shape) in zip(self._data_shapes, new_data_shapes)]
        if (hasattr(data_batch, 'provide_label') and data_batch.provide_label):
            new_lshape = data_batch.provide_label
        elif (hasattr(data_batch, 'label') and data_batch.label):
            new_lshape = [DataDesc(i.name, j.shape, i.dtype, i.layout) for (i, j) in zip(self._label_shapes, data_batch.label)]
        else:
            new_lshape = None
        self.reshape(new_dshape, new_lshape)
    self._exec_group.forward(data_batch, is_train)
