Skip to content
Snippets Groups Projects
Commit 10c03106 authored by b.gong's avatar b.gong
Browse files

address the hardcoding for loading temporal and hickle files for postprocessing

parent d769c2d4
Branches
Tags
No related merge requests found
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
python -u ../scripts/generate_transfer_learning_finetune.py \ python -u ../scripts/generate_transfer_learning_finetune.py \
--input_dir /home/${USER}/preprocessedData/era5-Y2015toY2017M01to12-128x160-74d00N71d00E-T_MSL_gph500/tfrecords/ \ --input_dir /home/${USER}/preprocessedData/era5-Y2015toY2017M01to12-128x160-74d00N71d00E-T_MSL_gph500/tfrecords \
--dataset_hparams sequence_length=20 --checkpoint /home/${USER}/models/era5-Y2015toY2017M01to12-128x160-74d00N71d00E-T_MSL_gph500/ours_savp \ --dataset_hparams sequence_length=20 --checkpoint /home/${USER}/models/era5-Y2015toY2017M01to12-128x160-74d00N71d00E-T_MSL_gph500/ours_savp \
--mode test --results_dir /home/${USER}/results/era5-Y2017M01to12-64x64-50d00N11d50E-T_T_T \ --mode test --results_dir /home/${USER}/results/era5-Y2015toY2017M01to12-128x160-74d00N71d00E-T_MSL_gph500 \
--batch_size 4 --dataset era5 > generate_era5-out.out --batch_size 2 --dataset era5 > generate_era5-out.out
#srun python scripts/train.py --input_dir data/era5 --dataset era5 --model savp --model_hparams_dict hparams/kth/ours_savp/model_hparams.json --output_dir logs/era5/ours_savp #srun python scripts/train.py --input_dir data/era5 --dataset era5 --model savp --model_hparams_dict hparams/kth/ours_savp/model_hparams.json --output_dir logs/era5/ours_savp
...@@ -91,7 +91,10 @@ def main(): ...@@ -91,7 +91,10 @@ def main():
tf.set_random_seed(args.seed) tf.set_random_seed(args.seed)
np.random.seed(args.seed) np.random.seed(args.seed)
random.seed(args.seed) random.seed(args.seed)
#Bing:20200518
input_dir = args.input_dir
temporal_dir = os.path.split(input_dir)[0] + "/hickle/splits/"
print ("temporal_dir:",temporal_dir)
args.results_gif_dir = args.results_gif_dir or args.results_dir args.results_gif_dir = args.results_gif_dir or args.results_dir
args.results_png_dir = args.results_png_dir or args.results_dir args.results_png_dir = args.results_png_dir or args.results_dir
dataset_hparams_dict = {} dataset_hparams_dict = {}
...@@ -197,12 +200,13 @@ def main(): ...@@ -197,12 +200,13 @@ def main():
persistent_images_all = [] persistent_images_all = []
input_images_all = [] input_images_all = []
#Bing:20201417 #Bing:20201417
test_temporal_pkl = pickle.load(open("/p/scratch/deepacf/video_prediction_shared_folder/preprocessedData/era5-Y2017M01to12-64x64-50d00N11d50E-T_T_T/hickle/splits/T_test.pkl","rb")) print ("temporal_dir:",temporal_dir)
test_temporal_pkl = pickle.load(open(os.path.join(temporal_dir,"T_test.pkl"),"rb"))
#val_temporal_pkl = pickle.load(open("/p/scratch/deepacf/video_prediction_shared_folder/preprocessedData/era5-Y2017M01to12-64x64-50d00N11d50E-T_T_T/hickle/splits/T_val.pkl","rb")) #val_temporal_pkl = pickle.load(open("/p/scratch/deepacf/video_prediction_shared_folder/preprocessedData/era5-Y2017M01to12-64x64-50d00N11d50E-T_T_T/hickle/splits/T_val.pkl","rb"))
print("test temporal_pkl file looks like folowing", test_temporal_pkl) print("test temporal_pkl file looks like folowing", test_temporal_pkl)
#X_val = hickle.load("/p/scratch/deepacf/video_prediction_shared_folder/preprocessedData/era5-Y2017M01to12-64x64-50d00N11d50E-T_T_T/hickle/splits/X_val.hkl") #X_val = hickle.load("/p/scratch/deepacf/video_prediction_shared_folder/preprocessedData/era5-Y2017M01to12-64x64-50d00N11d50E-T_T_T/hickle/splits/X_val.hkl")
X_test = hickle.load("/p/scratch/deepacf/video_prediction_shared_folder/preprocessedData/era5-Y2017M01to12-64x64-50d00N11d50E-T_T_T/hickle/splits/X_test.hkl") X_test = hickle.load(os.path.join(temporal_dir,"X_test.hkl"))
is_first=True is_first=True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment