diff --git a/modules/deeplearning/cloud_opd_srcnn_abi.py b/modules/deeplearning/cloud_opd_srcnn_abi.py index 6d3cba9931704b381c1a6006d15736933e74ddc7..ddfe51c6d6c9692cb25735c460ff61a14beb4690 100644 --- a/modules/deeplearning/cloud_opd_srcnn_abi.py +++ b/modules/deeplearning/cloud_opd_srcnn_abi.py @@ -261,7 +261,7 @@ class SRCNN: for param in data_params_half: idx = params.index(param) tmp = input_data[:, idx, :, :] - tmp = np.where(np.isnan(tmp), 0, tmp) + tmp = np.where(np.isnan(tmp), 0.0, tmp) tmp = tmp[:, self.slc_y_m, self.slc_x_m] tmp = self.upsample(tmp) tmp = normalize(tmp, param, mean_std_dct) @@ -270,13 +270,13 @@ class SRCNN: for param in sub_fields: idx = params.index(param) tmp = input_data[:, idx, :, :] - tmp = np.where(np.isnan(tmp), 0, tmp) + tmp = np.where(np.isnan(tmp), 0.0, tmp) tmp = tmp[:, self.slc_y_m, self.slc_x_m] tmp = self.upsample(tmp) if param != 'refl_substddev_ch01': tmp = normalize(tmp, 'refl_0_65um_nom', mean_std_dct) else: - tmp = np.where(np.isnan(tmp), 0, tmp) + tmp = np.where(np.isnan(tmp), 0.0, tmp) data_norm.append(tmp) # for param in sub_fields: @@ -292,7 +292,7 @@ class SRCNN: # --------------------------------------------------- tmp = input_label[:, label_idx_i, ::2, ::2] tmp = tmp.copy() - tmp = np.where(np.isnan(tmp), 0, tmp) + tmp = np.where(np.isnan(tmp), 0.0, tmp) tmp = tmp[:, self.slc_y_2, self.slc_x_2] tmp = self.upsample(tmp) tmp = normalize(tmp, label_param, mean_std_dct) @@ -300,7 +300,6 @@ class SRCNN: # --------- data = np.stack(data_norm, axis=3) data = data.astype(np.float32) - print(data.shape) # ----------------------------------------------------- # ----------------------------------------------------- @@ -310,7 +309,7 @@ class SRCNN: label = scale(label, label_param, mean_std_dct) label = label[:, self.y_128, self.x_128] - label = np.where(np.isnan(label), 0, label) + label = np.where(np.isnan(label), 0.0, label) label = np.expand_dims(label, axis=3) data = data.astype(np.float32)