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

snapshot...

parent 8d2a4482
No related branches found
No related tags found
No related merge requests found
......@@ -286,7 +286,7 @@ class UNET:
def get_in_mem_data_batch(self, idxs, is_training):
if is_training:
train_data = []
label_data = []
train_label = []
for k in idxs:
f = self.train_data_files[k]
nda = np.load(f)
......@@ -294,35 +294,35 @@ class UNET:
f = self.train_label_files[k]
nda = np.load(f)
label_data.append(nda)
train_label.append(nda)
data = np.concatenate(train_data)
data = np.expand_dims(data, axis=3)
label = np.concatenate(label_data)
label = np.concatenate(train_label)
label = np.expand_dims(label, axis=3)
else:
train_data = []
label_data = []
test_data = []
test_label = []
for k in idxs:
f = self.test_data_files[k]
nda = np.load(f)
train_data.append(nda)
test_data.append(nda)
f = self.test_label_files[k]
nda = np.load(f)
label_data.append(nda)
test_label.append(nda)
data = np.concatenate(train_data)
data = np.concatenate(test_data)
data = np.expand_dims(data, axis=3)
label = np.concatenate(label_data)
label = np.concatenate(test_label)
label = np.expand_dims(label, axis=3)
data = data.astype(np.float32)
label = label.astype(np.float32)
normalize(data, 'M15', mean_std_dct)
normalize(label, 'M15', mean_std_dct)
data = normalize(data, 'M15', mean_std_dct)
label = normalize(label, 'M15', mean_std_dct)
if is_training and DO_AUGMENT:
data_ud = np.flip(data, axis=1)
......
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