diff --git a/modules/deeplearning/cloud_fraction_fcn.py b/modules/deeplearning/cloud_fraction_fcn.py index b4f797b6ffec1a2033f14c8725a36fb03ad3c300..14e58ec8564c54e8ae40e41090aff8554b3a20a0 100644 --- a/modules/deeplearning/cloud_fraction_fcn.py +++ b/modules/deeplearning/cloud_fraction_fcn.py @@ -15,7 +15,7 @@ LOG_DEVICE_PLACEMENT = False PROC_BATCH_SIZE = 4 PROC_BATCH_BUFFER_SIZE = 5000 -NumClasses = 5 +NumClasses = 3 if NumClasses == 2: NumLogits = 1 else: @@ -172,6 +172,7 @@ def get_label_data(grd_k): def get_label_data_5cat(grd_k): grd_k = np.where(np.isnan(grd_k), 0, grd_k) + # grd_u = np.where(np.logical_and(grd_k > 0.45, grd_k < 0.55), 1, 0) grd_k = np.where(grd_k < 0.5, 0, 1) a = grd_k[:, 0::2, 0::2] @@ -192,8 +193,17 @@ def get_label_data_5cat(grd_k): s[cat_3] = 3 s[cat_4] = 4 + # a = grd_u[:, 0::2, 0::2] + # b = grd_u[:, 1::2, 0::2] + # c = grd_u[:, 0::2, 1::2] + # d = grd_u[:, 1::2, 1::2] + # s_u = a + b + c + d + # cat_u = (s_u == 4) + # s[cat_u] = 5 + return s + class SRCNN: def __init__(self):