From 81e087466f1fde202c97c4bb68d1edafab08a5cc Mon Sep 17 00:00:00 2001 From: enjoy <934389697@qq.com> Date: Sun, 25 Nov 2018 22:42:38 +0800 Subject: [PATCH 1/4] Create README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..bd4e9ca --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# TensorFlow-Coding + +本代码库为我在小象学院开的一个课程《深度学习之Tensorflow高级编程的代码》,需要了解代码的编写思路和相应的知识可以在小象学院上找相应视频。小象课程链接: +http://www.chinahadoop.cn/course/1227 From 7afe3dc5234e201f9904e353dd8663e02d09c923 Mon Sep 17 00:00:00 2001 From: zhaoyingjun Date: Mon, 26 Nov 2018 10:38:09 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0keep=5Fprop=20=E6=88=90ke?= =?UTF-8?q?ep=5Fprob?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lessonSix/vgg16/execute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lessonSix/vgg16/execute.py b/lessonSix/vgg16/execute.py index 63849a4..5a8a189 100644 --- a/lessonSix/vgg16/execute.py +++ b/lessonSix/vgg16/execute.py @@ -147,11 +147,11 @@ def train(): softmax_predictions = tf.argmax(softmax_propabilities, axis=1) data_tensor = graph.get_tensor_by_name(name="data_tensor:0") label_tensor = graph.get_tensor_by_name(name="label_tensor:0") - keep_prop = graph.get_tensor_by_name(name="keep_prop:0") + keep_prob = graph.get_tensor_by_name(name="keep_prob:0") feed_dict_testing = {data_tensor: shuffled_datas_test, label_tensor: shuffled_labels_test, - keep_prop: 1.0} + keep_prob: 1.0} softmax_propabilities_, softmax_predictions_ = sess.run([softmax_propabilities, softmax_predictions], feed_dict=feed_dict_testing) From 197e69e4b7c255ef11e7c0ff9b7581fdc2e04cbf Mon Sep 17 00:00:00 2001 From: zhaoyingjun Date: Mon, 26 Nov 2018 17:20:44 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0learningrate=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=9B=B4=E6=96=B0=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lessonOne/imgClassifierWeb/execute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lessonOne/imgClassifierWeb/execute.py b/lessonOne/imgClassifierWeb/execute.py index 5688c34..807c50d 100644 --- a/lessonOne/imgClassifierWeb/execute.py +++ b/lessonOne/imgClassifierWeb/execute.py @@ -131,7 +131,7 @@ def train(): # 达到一个训练模型保存点后,将模型保存下来,并打印出这个保存点的平均准确率 if current_step % gConfig['steps_per_checkpoint'] == 0: #如果超过三次预测正确率没有升高则改变学习率 - if len(previous_correct) > 2 and accuracy == min(previous_correct[-3:]): + if len(previous_correct) > 2 and accuracy < min(previous_correct[-3:]): sess.run(model.learning_rate_decay_op) previous_correct.append(accuracy) checkpoint_path = os.path.join(gConfig['working_directory'], "cnn.ckpt") From be9923813a303001550d7d92e09f34d291033833 Mon Sep 17 00:00:00 2001 From: zhaoyingjun Date: Mon, 26 Nov 2018 23:25:22 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0lessonSIx=E7=9A=84learnin?= =?UTF-8?q?grate=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lessonSix/vgg16/execute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lessonSix/vgg16/execute.py b/lessonSix/vgg16/execute.py index 5a8a189..fba45ff 100644 --- a/lessonSix/vgg16/execute.py +++ b/lessonSix/vgg16/execute.py @@ -132,7 +132,7 @@ def train(): # 达到一个训练模型保存点后,将模型保存下来,并打印出这个保存点的平均准确率 if current_step % gConfig['steps_per_checkpoint'] == 0: #如果超过三次预测正确率没有升高则改变学习率 - if len(previous_correct) > 2 and accuracy == min(previous_correct[-3:]): + if len(previous_correct) > 2 and accuracy < min(previous_correct[-3:]): sess.run(model.learning_rate_decay_op) previous_correct.append(accuracy) checkpoint_path = os.path.join(gConfig['working_directory'], "cnn.ckpt")