def __getitem__(self, idx):
    batch_x = self.X[(idx * self.batch_size):((idx + 1) * self.batch_size)]
    if (self.y is None):
        return tf.constant(batch_x)
    else:
        batch_y = self.y[(idx * self.batch_size):((idx + 1) * self.batch_size)]
        return (tf.constant(batch_x), tf.constant(batch_y))
def __getitem__(self, idx):
    batch_x = self.X[(idx * self.batch_size):((idx + 1) * self.batch_size)]
    if (self.y is None):
        return tf.constant(batch_x)
    else:
        batch_y = self.y[(idx * self.batch_size):((idx + 1) * self.batch_size)]
        return (tf.constant(batch_x), tf.constant(batch_y))