From b79cb57c60fa60c153b2146e4557c1eb194f8bde Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Wed, 3 Aug 2022 16:00:47 -0500 Subject: [PATCH] more fixing --- modules/util/viirs_l1b_l2.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/util/viirs_l1b_l2.py b/modules/util/viirs_l1b_l2.py index 6fc657c1..b4f6676c 100644 --- a/modules/util/viirs_l1b_l2.py +++ b/modules/util/viirs_l1b_l2.py @@ -123,6 +123,8 @@ def run_all(directory, out_directory): data_valid_tiles = [] data_train_tiles = [] + num_train_samples = data_train.shape[0] + num_valid_samples = data_valid.shape[0] print(' file # done: ', cnt) print('num_train_samples, num_valid_samples: ', num_train_samples, num_valid_samples) total_num_train_samples += num_train_samples @@ -152,8 +154,8 @@ def run_all(directory, out_directory): #np.save(out_directory+'label_train_' + str(cnt), label_train) #np.save(out_directory+'label_valid_' + str(cnt), label_valid) - num_train_samples += data_train.shape[0] - num_valid_samples += data_valid.shape[0] + num_train_samples = data_train.shape[0] + num_valid_samples = data_valid.shape[0] print('num_train_samples, num_valid_samples: ', num_train_samples, num_valid_samples) total_num_train_samples += num_train_samples -- GitLab