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 ## 感谢支持 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) ``` diff --git a/tex_pdf/get_started/c1s01_introduction.tex b/tex_pdf/get_started/c1s01_introduction.tex index f1c8512..51a5b03 100644 --- a/tex_pdf/get_started/c1s01_introduction.tex +++ b/tex_pdf/get_started/c1s01_introduction.tex @@ -41,7 +41,7 @@ \section{Introduction || 简介} train = optimizer.minimize(loss) # Before starting, initialize the variables. We will 'run' this first. -init = tf.initialize_all_variables() +init = tf.global_variables_initializer() # Launch the graph. sess = tf.Session() diff --git a/tex_pdf/get_started/c1s03_basic_usage.tex b/tex_pdf/get_started/c1s03_basic_usage.tex index c89b59a..9a84a61 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)中载入启动这个图。 %%% @@ -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.]})) @@ -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}