(self)
Generator that can be used to iterate over this dataset.

        Yields:
            tuple : the next minibatch of data.
Generator that can be used to iterate over this dataset.
Generator that can be used to iterate over this dataset .
def __iter__(self):
        """
        Generator that can be used to iterate over this dataset.

        Yields:
            tuple : the next minibatch of data.
        """
        self.batch_index = 0
        while self.batch_index < self.nbatches:
            # get the data for this batch and reshape to fit the device buffer
            # shape
            X_batch = self.X[:, self.batch_index].T.reshape(
                self.X_dev.shape).copy()
            y_batch = self.y[:, self.batch_index].T.reshape(
                self.y_dev.shape).copy()

            # make the data for this batch as backend tensor
            self.X_dev.set(X_batch)
            self.y_dev.set(y_batch)

            self.batch_index += 1

            yield self.X_dev, self.y_dev
def __iter__ ( self ) : self . batch_index = 0 while self . batch_index < self . nbatches : # get the data for this batch and reshape to fit the device buffer # shape X_batch = self . X [ : , self . batch_index ] . T . reshape ( self . X_dev . shape ) . copy ( ) y_batch = self . y [ : , self . batch_index ] . T . reshape ( self . y_dev . shape ) . copy ( ) # make the data for this batch as backend tensor self . X_dev . set ( X_batch ) self . y_dev . set ( y_batch ) self . batch_index += 1 yield self . X_dev , self . y_dev