From efbbd6ddfe1d8d1627d3c367ebf607ca07da548a Mon Sep 17 00:00:00 2001 From: saber Date: Thu, 26 Oct 2017 20:00:06 +0800 Subject: [PATCH 1/6] initialize_all_variables() has been deprecated --- tex_pdf/get_started/c1s01_introduction.tex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tex_pdf/get_started/c1s01_introduction.tex b/tex_pdf/get_started/c1s01_introduction.tex index f1c8512..3e87ec8 100644 --- a/tex_pdf/get_started/c1s01_introduction.tex +++ b/tex_pdf/get_started/c1s01_introduction.tex @@ -41,7 +41,9 @@ \section{Introduction || 简介} train = optimizer.minimize(loss) # Before starting, initialize the variables. We will 'run' this first. -init = tf.initialize_all_variables() +# initialize_all_variables() has been deprecated, and will be deleted after 2017/03/02 +# Update: use tf.global_variables_initializer() instead. +init = tf.global_variables_initializer() # Launch the graph. sess = tf.Session() From 04c36e271ec9fa85470bcd6a6e388a3a145ddb9d Mon Sep 17 00:00:00 2001 From: saber Date: Thu, 26 Oct 2017 20:08:20 +0800 Subject: [PATCH 2/6] tf.global_variables_initializer() --- tex_pdf/get_started/c1s01_introduction.tex | 2 -- 1 file changed, 2 deletions(-) diff --git a/tex_pdf/get_started/c1s01_introduction.tex b/tex_pdf/get_started/c1s01_introduction.tex index 3e87ec8..51a5b03 100644 --- a/tex_pdf/get_started/c1s01_introduction.tex +++ b/tex_pdf/get_started/c1s01_introduction.tex @@ -41,8 +41,6 @@ \section{Introduction || 简介} train = optimizer.minimize(loss) # Before starting, initialize the variables. We will 'run' this first. -# initialize_all_variables() has been deprecated, and will be deleted after 2017/03/02 -# Update: use tf.global_variables_initializer() instead. init = tf.global_variables_initializer() # Launch the graph. From 67b0ab9810c67dbea5dcc9fae0b72341b38065f8 Mon Sep 17 00:00:00 2001 From: saber Date: Thu, 26 Oct 2017 21:13:38 +0800 Subject: [PATCH 3/6] Modified some have been deprecated apis --- tex_pdf/get_started/c1s03_basic_usage.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tex_pdf/get_started/c1s03_basic_usage.tex b/tex_pdf/get_started/c1s03_basic_usage.tex index c89b59a..83c62b1 100644 --- a/tex_pdf/get_started/c1s03_basic_usage.tex +++ b/tex_pdf/get_started/c1s03_basic_usage.tex @@ -201,7 +201,7 @@ \subsection{Interactive Usage | 交互式使用} x.initializer.run() # Add an op to subtract 'a' from 'x'. Run it and print the result -sub = tf.sub(x, a) +sub = tf.subtract(x, a) print(sub.eval()) # ==> [-2. -1.] @@ -239,7 +239,7 @@ \subsection{Variables | 变量} # Variables must be initialized by running an `init` Op after having # launched the graph. We first have to add the `init` Op to the graph. -init_op = tf.initialize_all_variables() +init_op = tf.global_variables_initializer() # Launch the graph and run the ops. with tf.Session() as sess: @@ -282,7 +282,7 @@ \subsection{Fetches | 取回} input2 = tf.constant(2.0) input3 = tf.constant(5.0) intermed = tf.add(input2, input3) -mul = tf.mul(input1, intermed) +mul = tf.multiply(input1, intermed) with tf.Session() as sess: result = sess.run([mul, intermed]) @@ -311,7 +311,7 @@ \subsection{Feeds | 供给} \begin{lstlisting} input1 = tf.placeholder(tf.float32) input2 = tf.placeholder(tf.float32) -output = tf.mul(input1, input2) +output = tf.multiply(input1, input2) with tf.Session() as sess: print(sess.run([output], feed_dict={input1:[7.], input2:[2.]})) From 9ec86c65bd7f247015c5f9e9cf0f074b7d6b2177 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 12 Apr 2018 16:33:54 +0800 Subject: [PATCH 4/6] =?UTF-8?q?[FIX]=E8=A7=A3=E5=86=B3=E6=BC=94=E7=A4=BA?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=97=A0=E6=B3=95=E6=89=A7=E8=A1=8C=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决演示代码无法执行的问题 --- SOURCE/tutorials/mnist_beginners.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOURCE/tutorials/mnist_beginners.md b/SOURCE/tutorials/mnist_beginners.md index f518f7e..a277e35 100755 --- a/SOURCE/tutorials/mnist_beginners.md +++ b/SOURCE/tutorials/mnist_beginners.md @@ -20,7 +20,7 @@ MNIST是一个入门级的计算机视觉数据集,它包含各种手写数字 MNIST数据集的官网是[Yann LeCun's website](http://yann.lecun.com/exdb/mnist/)。在这里,我们提供了一份python源代码用于自动下载和安装这个数据集。你可以下载[这份代码](https://raw.githubusercontent.com/tensorflow/tensorflow/master/tensorflow/examples/tutorials/mnist/input_data.py),然后用下面的代码导入到你的项目里面,也可以直接复制粘贴到你的代码文件里面。 ```python -import tensorflow.examples.tutorials.mnist.input_data +import tensorflow.examples.tutorials.mnist.input_data as input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) ``` From 4a34e91a1472ce74b796cd893b5ef5e5c7e7a6e9 Mon Sep 17 00:00:00 2001 From: gmagogsfm Date: Thu, 19 Apr 2018 10:36:34 -0700 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=97=85=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “载入动这个图”-》”载入启动这个图“ --- tex_pdf/get_started/c1s03_basic_usage.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tex_pdf/get_started/c1s03_basic_usage.tex b/tex_pdf/get_started/c1s03_basic_usage.tex index c89b59a..7630d3b 100644 --- a/tex_pdf/get_started/c1s03_basic_usage.tex +++ b/tex_pdf/get_started/c1s03_basic_usage.tex @@ -99,7 +99,7 @@ \subsection{Overview | 总览} Ⓔ \textcolor{etc}{The default graph now has three nodes: two constant() ops and one matmul() op. To actually multiply the matrices, and get the result of the multiplication, you must launch the graph in a session.} -Ⓒ 默认图现在拥有三个节点,两个\lstinline{constant()} op,一个\lstinline{matmul()} op. 为了真正进行矩阵乘法运算,得到乘法结果, 你必须在一个会话(session)中载入动这个图。 +Ⓒ 默认图现在拥有三个节点,两个\lstinline{constant()} op,一个\lstinline{matmul()} op. 为了真正进行矩阵乘法运算,得到乘法结果, 你必须在一个会话(session)中载入启动这个图。 %%% @@ -324,4 +324,4 @@ \subsection{Feeds | 供给} Ⓒ 如果没有正确供给, \lstinline{placeholder()} 操作将会产生一个错误提示.关于feed的规模更大的案例,参见\hyperref[minist_tf]{MNIST 全连通 feed 教程}以及其\href{https://tensorflow.googlesource.com/tensorflow/+/master/tensorflow/g3doc/tutorials/mnist/fully_connected_feed.py}{源代码}。 -\href{http://tensorflow.org/get_started/basic_usage.md}{原文:Basic Usage} \ No newline at end of file +\href{http://tensorflow.org/get_started/basic_usage.md}{原文:Basic Usage} From 882bc848cc9a9ba1f967092061dd0060d54b1ef1 Mon Sep 17 00:00:00 2001 From: floydzhang Date: Sat, 12 May 2018 15:05:28 +0800 Subject: [PATCH 6/6] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 042b5d2..500f30e 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,8 @@ Jeff回信原文: 这样的一个高技术领域的文档,我们在翻译的过程中,难免会有不完善的地方,希望请大家一起帮助我们持续改进文档的翻译质量,帮助更多的人,方法: - 在GitHub上提Issue或Pull Request,地址为: [https://github.com/jikexueyuanwiki/tensorflow-zh](https://github.com/jikexueyuanwiki/tensorflow-zh) -- 加入我们的QQ群提建议--协同翻译群:248320884,技术交流群:551830261 +- 加入TensorFlow技术交流群,与TensorFlower们一起研究交流技术干货--TensorFlow技术交流群:782484288 +- 对翻译感兴趣?加入协同翻译群:248320884,与翻译大神一道研究TensorFlow的本地化 - 给我们写邮件: wiki@jikexueyuan.com ## 感谢支持