Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tranlate /tutorials/eager/custom_training.ipynb in simple-chinese #869

Merged
merged 12 commits into from Aug 12, 2019

Conversation

@chuyan0421
Copy link
Contributor

commented Jul 26, 2019

No description provided.

@chuyan0421 chuyan0421 requested review from lamberta and MarkDaoust as code owners Jul 26, 2019

@tfdocsbot

This comment has been minimized.

Copy link
Collaborator

commented Jul 26, 2019

Preview and run these notebook edits with Google Colab:

Notebook diffs available on ReviewNB.com.
@tfdocsbot

This comment has been minimized.

Copy link
Collaborator

commented Jul 26, 2019

Reviewers added, please take a look.
@kuri-leo, @JayYip, @yantaozhao, @loveunk, @Wind2esg, @tigerneil, @MofiiTech, @gaoljhy, @Mr-Linus, @flopsySong

When your review is finished, approve the pull request or include "LGTM" in your comment.

@googlebot googlebot added the cla: yes label Jul 26, 2019

@Mr-Linus
Copy link
Contributor

left a comment

You need to update the url and move the site/zh-cn/tutorials/eager/custom_training.ipynb to site/zh-cn/beta/eager/custom_training.ipynb

" <a target=\"_blank\" href=\"https://github.com/tensorflow/docs/blob/master/site/en/r2/tutorials/eager/custom_training.ipynb\"><img src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />GitHub浏览源码</a>\n",
" </td>\n",
" <td>\n",
" <a href=\"https://storage.googleapis.com/tensorflow_docs/docs/site/en/r2/tutorials/eager/custom_training.ipynb\"><img src=\"https://www.tensorflow.org/images/download_logo_32px.png\" />下载notebook</a>\n",

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Jul 27, 2019

Contributor

从 1 - 65 行,请根据 TF 汉化社区格式标准修改。https://docs.google.com/document/d/1v7kwEhvtbbI4S4gulxLJDDN78gv0ZlDJ0cN92BUPrm0

This comment has been minimized.

Copy link
@chuyan0421

chuyan0421 Jul 29, 2019

Author Contributor

Already update. Please review. Thanks!

chuyan0421 added some commits Jul 29, 2019

" <a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/r2/tutorials/eager/custom_training.ipynb\"><img src=\"https://tensorflow.google.cn/images/colab_logo_32px.png\" />在 Google Colab 运行</a>\n",
" </td>\n",
" <td>\n",
" <a target=\"_blank\" href=\"https://github.com/tensorflow/docs/blob/master/site/en/r2/tutorials/eager/custom_training.ipynb\"><img src=\"https://tensorflow.google.cn/images/GitHub-Mark-32px.png\" />在 Github 上查看源代码</a>\n",

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Jul 30, 2019

Contributor
Suggested change
" <a target=\"_blank\" href=\"https://github.com/tensorflow/docs/blob/master/site/en/r2/tutorials/eager/custom_training.ipynb\"><img src=\"https://tensorflow.google.cn/images/GitHub-Mark-32px.png\" />在 Github 上查看源代码</a>\n",
" <a target=\"_blank\" href=\"https://github.com/tensorflow/docs/blob/master/site/zh-cn/beta/tutorials/eager/custom_training.ipynb\"><img src=\"https://tensorflow.google.cn/images/GitHub-Mark-32px.png\" />在 Github 上查看源代码</a>\n",
" <a target=\"_blank\" href=\"https://tensorflow.google.cn/beta/tutorials/eager/custom_training\"><img src=\"https://tensorflow.google.cn/images/tf_logo_32px.png\" />在 Tensorflow.google.cn 上查看</a>\n",
" </td>\n",
" <td>\n",
" <a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/r2/tutorials/eager/custom_training.ipynb\"><img src=\"https://tensorflow.google.cn/images/colab_logo_32px.png\" />在 Google Colab 运行</a>\n",

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Jul 30, 2019

Contributor
Suggested change
" <a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/r2/tutorials/eager/custom_training.ipynb\"><img src=\"https://tensorflow.google.cn/images/colab_logo_32px.png\" />在 Google Colab 运行</a>\n",
" <a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/docs/blob/master/site/zh-cn/beta/tutorials/eager/custom_training.ipynb\"><img src=\"https://tensorflow.google.cn/images/colab_logo_32px.png\" />在 Google Colab 运行</a>\n",
" <a target=\"_blank\" href=\"https://github.com/tensorflow/docs/blob/master/site/en/r2/tutorials/eager/custom_training.ipynb\"><img src=\"https://tensorflow.google.cn/images/GitHub-Mark-32px.png\" />在 Github 上查看源代码</a>\n",
" </td>\n",
" <td>\n",
" <a href=\"https://storage.googleapis.com/tensorflow_docs/docs/site/en/r2/tutorials/eager/custom_training.ipynb\"><img src=\"https://tensorflow.google.cn/images/download_logo_32px.png\" />下载此 notebook</a>\n",

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Jul 30, 2019

Contributor
Suggested change
" <a href=\"https://storage.googleapis.com/tensorflow_docs/docs/site/en/r2/tutorials/eager/custom_training.ipynb\"><img src=\"https://tensorflow.google.cn/images/download_logo_32px.png\" />下载此 notebook</a>\n",
" <a href=\"https://storage.googleapis.com/tensorflow_docs/docs/site/zh-cn/beta/tutorials/eager/custom_training.ipynb\"><img src=\"https://tensorflow.google.cn/images/download_logo_32px.png\" />下载此 notebook</a>\n",
"source": [
"## 变量\n",
"\n",
"Tensorflow中的tensor是不可变无状态对象。机器学习模型需要可改变状态,比如模型训练和模型预测的代码是相同的,但变量值随着时间而不同(希望尽量小的loss)。为了应对随着计算而改变的状态,可以利用Python的状态可变性。"

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Jul 30, 2019

Contributor
Suggested change
"Tensorflow中的tensor是不可变无状态对象。机器学习模型需要可改变状态,比如模型训练和模型预测的代码是相同的,但变量值随着时间而不同(希望尽量小的loss)。为了应对随着计算而改变的状态,可以利用Python的状态可变性"
"Tensorflow 中的 tensor 是不可变无状态对象。机器学习模型需要可改变状态,比如模型训练和模型预测的代码是相同的,但变量值随着时间而不同(希望尽量小的 loss)。为了应对随着计算而改变的状态,可以利用 Python 的状态可变性"
"source": [
"在之前的教程中,我们讨论了自动差分,一个基本的机器学习模块。在这个教程中,我们将使用在之前介绍的Tensorflow基础语句实现简单的机器学习模型。\n",
"\n",
"Tensorflow也提供了高级神经网络API(`tf.keras`),可以精简范例代码。我们强烈建议在神经网络方面的工作使用高级的API。在这篇教程中,我们使用基本规则用于神经网络的训练,为以后打下坚实的基础。"

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Jul 30, 2019

Contributor

中英文直接需要有空格,下面的也改下

This comment has been minimized.

Copy link
@chuyan0421

chuyan0421 Aug 5, 2019

Author Contributor

已按要求修改,请审核

"source": [
"### 定义损失函数\n",
"\n",
"损失函数用来衡量在给定输入的情况下,模型的预测输出与实际输出的偏差。我们这里使用标准L2损失函数。"

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Aug 7, 2019

Contributor
Suggested change
"损失函数用来衡量在给定输入的情况下,模型的预测输出与实际输出的偏差。我们这里使用标准L2损失函数"
"损失函数用来衡量在给定输入的情况下,模型的预测输出与实际输出的偏差。我们这里使用标准 L2 损失函数"
"source": [
"### 定义训练循环\n",
"\n",
"我们现在有了网络模型和训练数据。现在来训练模型,即,基于[梯度下降](https://en.wikipedia.org/wiki/Gradient_descent)使用训练数据来更新模型的变量(`W` 和 `b`)使得损失量变小。梯度下降方案中有很多参数,通过`tf.train.Optimizer`实现。我们强烈建议使用这些实现方式,但基于通过基本规则创建模型的精神,在这个特别示例中,我们自己实现基本的数学运算。"

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Aug 7, 2019

Contributor

改句建议再次斟酌,逻辑存在些许问题

"id": "RwWPaJryD2aN"
},
"source": [
"最后,我们对训练数据重复地运行,观察`W` 和 `b`是怎么变化的。"

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Aug 7, 2019

Contributor
Suggested change
"最后,我们对训练数据重复地运行,观察`W` 和 `b`是怎么变化的。"
"最后,我们对训练数据重复地运行,观察 `W` 和 `b` 是怎么变化的。"
"source": [
"## 下一步\n",
"\n",
"在这个教程中,我们讨论了`Variable`,而且创建和训练了一个简单的线性模型,使用了在此之前所学习的 TensorFlow 知识点。\n",

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Aug 7, 2019

Contributor
Suggested change
"在这个教程中,我们讨论了`Variable`,而且创建和训练了一个简单的线性模型,使用了在此之前所学习的 TensorFlow 知识点。\n",
"在这个教程中,我们讨论了 `Variable`,而且创建和训练了一个简单的线性模型,使用了在此之前所学习的 TensorFlow 知识点。\n",
"\n",
"在这个教程中,我们讨论了`Variable`,而且创建和训练了一个简单的线性模型,使用了在此之前所学习的 TensorFlow 知识点。\n",
"\n",
"理论而言,用在机器学习研究上,跟 TensorFlow 相关的内容差不多就这些。实际上,特别是神经网络,高级的 API 比如`tf.keras`是更方便的,因为它提供了更高级别的内建模块(命名为\"layers\"),可以保存和恢复状态,成套的损失函数和优化策略等。\n"

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Aug 7, 2019

Contributor
Suggested change
"理论而言,用在机器学习研究上,跟 TensorFlow 相关的内容差不多就这些。实际上,特别是神经网络,高级的 API 比如`tf.keras`是更方便的,因为它提供了更高级别的内建模块(命名为\"layers\"),可以保存和恢复状态,成套的损失函数和优化策略等。\n"
"理论而言,用在机器学习研究上,跟 TensorFlow 相关的内容差不多就这些。实际上,特别是神经网络,高级的 API 比如 `tf.keras` 是更方便的,因为它提供了更高级别的内建模块(命名为\"layers\"),可以保存和恢复状态,成套的损失函数和优化策略等。\n"

chuyan0421 added some commits Aug 8, 2019

@Mr-Linus
Copy link
Contributor

left a comment

LGTM
👍

lamberta added some commits Aug 12, 2019

@lamberta
Copy link
Member

left a comment

Thanks!

@TensorFlow-Docs-Copybara TensorFlow-Docs-Copybara merged commit 2431640 into tensorflow:master Aug 12, 2019

2 checks passed

cla/google All necessary CLAs are signed
import/copybara Change imported to the internal review system
Details

TensorFlow-Docs-Copybara pushed a commit that referenced this pull request Aug 12, 2019

Copybara-Service
Merge pull request #869 from chuyan0421:master
PiperOrigin-RevId: 262974655
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.