diff --git a/aimodel/src/lib/dataset/dataset.py b/aimodel/src/lib/dataset/dataset.py index 29901c4..b55147e 100644 --- a/aimodel/src/lib/dataset/dataset.py +++ b/aimodel/src/lib/dataset/dataset.py @@ -31,7 +31,7 @@ def parse_item(metadata): rainfall = tf.image.resize(rainfall, tf.cast(tf.constant(metadata["waterdepth"]) / 2, dtype=tf.int32)) # [width, height] → [width, height, channels] water = tf.expand_dims(water, axis=-1) - water = tf.image.central_crop(water, 0.75) # Predict for only the centre 75% of the water data + water = tf.image.central_crop(water, 0.5) # Predict for only the centre 75% of the water data # TODO: The shape of the resulting tensor can't be statically determined, so we need to reshape here print("DEBUG:dataset ITEM rainfall:shape", rainfall.shape, "water:shape", water.shape) diff --git a/aimodel/src/subcommands/pretrain.py b/aimodel/src/subcommands/pretrain.py index ec947b7..b05572f 100644 --- a/aimodel/src/subcommands/pretrain.py +++ b/aimodel/src/subcommands/pretrain.py @@ -53,7 +53,7 @@ def run(args): feature_dim=args.feature_dim, shape_rainfall=dataset_metadata["rainfallradar"], - shape_water=[ math.ceil(value * 0.75) for value in dataset_metadata["waterdepth"] ] + shape_water=[ math.ceil(value * 0.5) for value in dataset_metadata["waterdepth"] ] ) ai.train(dataset_train, dataset_validate)