Skip to content
Snippets Groups Projects
Commit 25fa822f authored by tomrink's avatar tomrink
Browse files

snapshot...

parent fdf72240
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ import tensorflow as tf
from util.setup import logdir, modeldir, cachepath, now, ancillary_path, home_dir
from util.util import EarlyStop, normalize
from util.geos_nav import get_navigation
from util.augment import augment_image_3arg
from util.augment import augment_icing
import os, datetime
import numpy as np
......@@ -323,27 +323,6 @@ class IcingIntensityFCN:
label = np.where(np.invert(np.logical_or(label == 0, label == 1)), 2, label)
label = label.reshape((label.shape[0], 1))
# if is_training and DO_AUGMENT:
# data_ud = np.flip(data, axis=1)
# data_alt_ud = np.copy(data_alt)
# label_ud = np.copy(label)
#
# data_lr = np.flip(data, axis=2)
# data_alt_lr = np.copy(data_alt)
# label_lr = np.copy(label)
#
# data_r1 = np.rot90(data, k=1, axes=(1, 2))
# data_alt_r1 = np.copy(data_alt)
# label_r1 = np.copy(label)
#
# data_r2 = np.rot90(data, k=1, axes=(1, 2))
# data_alt_r2 = np.copy(data_alt)
# label_r2 = np.copy(label)
#
# data = np.concatenate([data, data_ud, data_lr, data_r1, data_r2])
# data_alt = np.concatenate([data_alt, data_alt_ud, data_alt_lr, data_alt_r1, data_alt_r2])
# label = np.concatenate([label, label_ud, label_lr, label_r1, label_r2])
return data, data_alt, label
def get_parameter_data(self, param, nd_idxs, is_training):
......@@ -469,7 +448,7 @@ class IcingIntensityFCN:
dataset = dataset.cache()
dataset = dataset.shuffle(PROC_BATCH_BUFFER_SIZE, reshuffle_each_iteration=True)
if DO_AUGMENT:
dataset = dataset.map(augment_image_3arg(), num_parallel_calls=8)
dataset = dataset.map(augment_icing(), num_parallel_calls=8)
dataset = dataset.prefetch(buffer_size=1)
self.train_dataset = dataset
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment