From 483cb4eb3eba5a219644cf60146d83687a728418 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Fri, 8 Feb 2019 16:35:00 +0100 Subject: [PATCH] Removed obsolete function Signed-off-by: Jim Martens --- src/twomartens/masterthesis/aae/train.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/twomartens/masterthesis/aae/train.py b/src/twomartens/masterthesis/aae/train.py index 9ddfa4a..76ac6a6 100644 --- a/src/twomartens/masterthesis/aae/train.py +++ b/src/twomartens/masterthesis/aae/train.py @@ -507,19 +507,6 @@ def normalize(feature: tf.Tensor, label: tf.Tensor) -> Tuple[tf.Tensor, tf.Tenso return k.expand_dims(tf.divide(feature, 255.0)), label -def extract_batch(data: np.ndarray, it: int, batch_size: int) -> tfe.Variable: - """ - Extracts a batch from data. - - :param data: numpy array of data - :param it: current iteration in epoch (or batch number) - :param batch_size: size of batch - :return: tensor - """ - x = data[it * batch_size:(it + 1) * batch_size, :, :] / 255.0 - return k.variable(x) - - if __name__ == "__main__": tf.enable_eager_execution() inlier_classes = [0]