From c0e9d456f31870f9b545f48b024171cceb8a11fa Mon Sep 17 00:00:00 2001 From: wu-lanchabu <1098900762@qq.com> Date: Tue, 22 Mar 2022 03:01:25 +0000 Subject: [PATCH 1/9] update TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py. --- .../cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py index fcf2a8236..d3f3c7734 100644 --- a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py +++ b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py @@ -143,9 +143,10 @@ def train(args, model, sess, saver): def test(args, model, sess, saver, file, step=-1, loading=False): if loading: - saver.restore(sess, args.pre_trained_model) + latest_checkpoint = tf.train.latest_checkpoint(args.pre_trained_model) + saver.restore(sess, latest_checkpoint) print("saved model is loaded for test!") - print("model path is %s" % args.pre_trained_model) + print("model path is %s" % lastest_checkpoint) blur_img_name = sorted(os.listdir(args.test_Blur_path)) sharp_img_name = sorted(os.listdir(args.test_Sharp_path)) -- Gitee From 0815617b07a523bd87b0a7ed7e798b7e4d4962f1 Mon Sep 17 00:00:00 2001 From: wu-lanchabu <1098900762@qq.com> Date: Tue, 22 Mar 2022 03:02:22 +0000 Subject: [PATCH 2/9] update TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh. --- .../DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh index efa122787..5d0967523 100644 --- a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh +++ b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh @@ -134,7 +134,7 @@ do python3 main.py \ --train_Sharp_path=${data_path}/data/train/sharp \ --train_Blur_path=${data_path}/data/train/blur \ - --max_epoch=300 \ + --max_epoch=5 \ --vgg_path=${ckpt_path}/vgg19.npy \ --model_path=${cur_path}/test/output/$ASCEND_DEVICE_ID/ckpt \ --mode=train > ${cur_path}test/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log 2>&1 -- Gitee From f672bbc6981a2248fcfe707ef1688ba44718d666 Mon Sep 17 00:00:00 2001 From: wu-lanchabu <1098900762@qq.com> Date: Tue, 22 Mar 2022 06:52:13 +0000 Subject: [PATCH 3/9] update TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py. --- .../cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py index d3f3c7734..5d9a57a21 100644 --- a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py +++ b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py @@ -146,7 +146,7 @@ def test(args, model, sess, saver, file, step=-1, loading=False): latest_checkpoint = tf.train.latest_checkpoint(args.pre_trained_model) saver.restore(sess, latest_checkpoint) print("saved model is loaded for test!") - print("model path is %s" % lastest_checkpoint) + print("model path is: ", lastest_checkpoint) blur_img_name = sorted(os.listdir(args.test_Blur_path)) sharp_img_name = sorted(os.listdir(args.test_Sharp_path)) -- Gitee From ce57bba31a7d5056481032ae620f247e4ca0388f Mon Sep 17 00:00:00 2001 From: wu-lanchabu <1098900762@qq.com> Date: Tue, 22 Mar 2022 07:49:10 +0000 Subject: [PATCH 4/9] update TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py. --- .../cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py index 5d9a57a21..43d8a47f5 100644 --- a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py +++ b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/mode.py @@ -146,7 +146,7 @@ def test(args, model, sess, saver, file, step=-1, loading=False): latest_checkpoint = tf.train.latest_checkpoint(args.pre_trained_model) saver.restore(sess, latest_checkpoint) print("saved model is loaded for test!") - print("model path is: ", lastest_checkpoint) + #print("model path is: ", lastest_checkpoint) blur_img_name = sorted(os.listdir(args.test_Blur_path)) sharp_img_name = sorted(os.listdir(args.test_Sharp_path)) -- Gitee From 18fbfb9b504f7782feb82e9136874d6893690b8f Mon Sep 17 00:00:00 2001 From: wu-lanchabu <1098900762@qq.com> Date: Tue, 22 Mar 2022 08:55:25 +0000 Subject: [PATCH 5/9] update TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh. --- .../DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh index 5d0967523..1a33d213f 100644 --- a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh +++ b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh @@ -137,6 +137,9 @@ do --max_epoch=5 \ --vgg_path=${ckpt_path}/vgg19.npy \ --model_path=${cur_path}/test/output/$ASCEND_DEVICE_ID/ckpt \ + --save_test_result=True \ + --in_memory=True \ + --result_path=./result \ --mode=train > ${cur_path}test/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log 2>&1 python3 main.py \ -- Gitee From 9e9d1fa78b5b866025981e56c6b03c614b3e6072 Mon Sep 17 00:00:00 2001 From: wu-lanchabu <1098900762@qq.com> Date: Tue, 22 Mar 2022 11:53:29 +0000 Subject: [PATCH 6/9] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20result?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/result/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/result/.keep diff --git a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/result/.keep b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/result/.keep new file mode 100644 index 000000000..e69de29bb -- Gitee From 5e825ba137faf48fc795b876c29547ea625d7d86 Mon Sep 17 00:00:00 2001 From: wu-lanchabu <1098900762@qq.com> Date: Tue, 22 Mar 2022 12:10:55 +0000 Subject: [PATCH 7/9] update TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/main.py. --- .../cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/main.py b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/main.py index 6b55a29e8..4adcb4f39 100644 --- a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/main.py +++ b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/main.py @@ -112,6 +112,9 @@ sess = tf.Session(config=config) sess.run(tf.global_variables_initializer()) saver = tf.train.Saver(max_to_keep=10) +if not os.path.exists(args.result_path): + os.makedirs(args.result_path) + if args.mode == 'train': train(args, model, sess, saver) -- Gitee From 270b8a36c71b40b35453f485c60aad0e557be34e Mon Sep 17 00:00:00 2001 From: wu-lanchabu <1098900762@qq.com> Date: Tue, 22 Mar 2022 12:11:03 +0000 Subject: [PATCH 8/9] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20Tens?= =?UTF-8?q?orFlow/contrib/cv/deblur=5Fgan/DeblurGAN=5FID0207=5Ffor=5FTenso?= =?UTF-8?q?rFlow/result?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/result/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/result/.keep diff --git a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/result/.keep b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/result/.keep deleted file mode 100644 index e69de29bb..000000000 -- Gitee From 0788f1dbebf656c9ea7a78db29c5f77d5bb23d6d Mon Sep 17 00:00:00 2001 From: wu-lanchabu <1098900762@qq.com> Date: Tue, 22 Mar 2022 12:36:14 +0000 Subject: [PATCH 9/9] update TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh. --- .../DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh index 1a33d213f..d65d3555d 100644 --- a/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh +++ b/TensorFlow/contrib/cv/deblur_gan/DeblurGAN_ID0207_for_TensorFlow/test/train_full_1p.sh @@ -22,7 +22,7 @@ export ASCEND_GLOBAL_LOG_LEVEL=3 #网络名称,同目录名称 Network="DeblurGAN_ID0207_for_TensorFlow" #训练epoch -train_epochs=10 +train_epochs=300 #训练batch_size batch_size=1 #训练step @@ -134,7 +134,7 @@ do python3 main.py \ --train_Sharp_path=${data_path}/data/train/sharp \ --train_Blur_path=${data_path}/data/train/blur \ - --max_epoch=5 \ + --max_epoch=300 \ --vgg_path=${ckpt_path}/vgg19.npy \ --model_path=${cur_path}/test/output/$ASCEND_DEVICE_ID/ckpt \ --save_test_result=True \ -- Gitee