From 9445121f20a254a01bfaa3f799699657e7d3a932 Mon Sep 17 00:00:00 2001 From: hutuxian Date: Thu, 24 Oct 2019 16:53:06 +0800 Subject: [PATCH] fix path bug and add some optimization (#3749) --- PaddleRec/din/data/data_process.sh | 6 ++++-- PaddleRec/din/train.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/PaddleRec/din/data/data_process.sh b/PaddleRec/din/data/data_process.sh index 93b1c32d..7bcfc55f 100644 --- a/PaddleRec/din/data/data_process.sh +++ b/PaddleRec/din/data/data_process.sh @@ -1,12 +1,14 @@ #! /bin/bash +set -e echo "begin download data" -mkdir raw_data && cd raw_data +mkdir raw_data +cd raw_data wget -c http://snap.stanford.edu/data/amazon/productGraph/categoryFiles/reviews_Electronics_5.json.gz gzip -d reviews_Electronics_5.json.gz wget -c http://snap.stanford.edu/data/amazon/productGraph/categoryFiles/meta_Electronics.json.gz gzip -d meta_Electronics.json.gz -echo "download data successful" +echo "download data successfully" cd .. python convert_pd.py diff --git a/PaddleRec/din/train.py b/PaddleRec/din/train.py index 36e99580..dbf0e77e 100644 --- a/PaddleRec/din/train.py +++ b/PaddleRec/din/train.py @@ -136,7 +136,7 @@ def train(): if (global_step > 400000 and global_step % PRINT_STEP == 0) or ( global_step <= 400000 and global_step % 50000 == 0): - save_dir = os.path.join(args.model_dir, "/global_step_" + str( + save_dir = os.path.join(args.model_dir, "global_step_" + str( global_step)) feed_var_name = [ "hist_item_seq", "hist_cat_seq", "target_item", -- GitLab