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

snapshot...

parent a37b03d9
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ abi_half_width = {'08': 12, '14': 12, '02': 48, '11': 12, '13': 12, '15': 12, '1
#abi_half_width = {'08': 6, '14': 6, '02': 24, '11': 6, '13': 6, '15': 6, '16': 6, '09': 6, '10': 6}
#abi_half_width = {'08': 3, '14': 3, '02': 12, '11': 3, '13': 3, '15': 3, '16': 3, '09': 3, '10': 3}
abi_stride = {'08': 1, '14': 1, '02': 4, '11': 1, '13': 1, '15': 1, '16': 1, '09': 1, '10': 1}
img_width = 24
img_width = 16
#img_width = 12
#img_width = 6
......@@ -204,10 +204,14 @@ class IcingIntensityNN:
# nda = do_normalize(nda)
data.append(nda)
data = np.stack(data)
data = np.transpose(data, axes=(1,0))
data = data.astype(np.float32)
data = np.transpose(data, axes=(1, 0))
label = self.h5f['icing_intensity'][nd_keys]
label = label.astype(np.int32)
label = np.where(label == -1, 0, label)
# binary
# binary, two class
label = np.where(label != 0, 1, label)
# TODO: Implement in memory cache
......@@ -228,7 +232,7 @@ class IcingIntensityNN:
@tf.function(input_signature=[tf.TensorSpec(None, tf.int32)])
def data_function(self, indexes):
out = tf.numpy_function(self.get_in_mem_data_batch, [indexes], [tf.float64, tf.float64, tf.int32])
out = tf.numpy_function(self.get_in_mem_data_batch, [indexes], [tf.float32, tf.float32, tf.int32])
return out
def get_train_dataset(self, indexes):
......
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