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
tranlate /tutorials/eager/custom_training.ipynb in simple-chinese #869
Conversation
Preview and run these notebook edits with Google Colab: Notebook diffs available on ReviewNB.com. |
Reviewers added, please take a look. When your review is finished, approve the pull request or include "LGTM" in your comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从 1 - 65 行,请根据 TF 汉化社区格式标准修改。https://docs.google.com/document/d/1v7kwEhvtbbI4S4gulxLJDDN78gv0ZlDJ0cN92BUPrm0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already update. Please review. Thanks!
" <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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" <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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" <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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" <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的状态可变性。" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Tensorflow中的tensor是不可变无状态对象。机器学习模型需要可改变状态,比如模型训练和模型预测的代码是相同的,但变量值随着时间而不同(希望尽量小的loss)。为了应对随着计算而改变的状态,可以利用Python的状态可变性。" | |
"Tensorflow 中的 tensor 是不可变无状态对象。机器学习模型需要可改变状态,比如模型训练和模型预测的代码是相同的,但变量值随着时间而不同(希望尽量小的 loss)。为了应对随着计算而改变的状态,可以利用 Python 的状态可变性。" |
"source": [ | ||
"在之前的教程中,我们讨论了自动差分,一个基本的机器学习模块。在这个教程中,我们将使用在之前介绍的Tensorflow基础语句实现简单的机器学习模型。\n", | ||
"\n", | ||
"Tensorflow也提供了高级神经网络API(`tf.keras`),可以精简范例代码。我们强烈建议在神经网络方面的工作使用高级的API。在这篇教程中,我们使用基本规则用于神经网络的训练,为以后打下坚实的基础。" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中英文直接需要有空格,下面的也改下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已按要求修改,请审核
"source": [ | ||
"### 定义损失函数\n", | ||
"\n", | ||
"损失函数用来衡量在给定输入的情况下,模型的预测输出与实际输出的偏差。我们这里使用标准L2损失函数。" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"损失函数用来衡量在给定输入的情况下,模型的预测输出与实际输出的偏差。我们这里使用标准L2损失函数。" | |
"损失函数用来衡量在给定输入的情况下,模型的预测输出与实际输出的偏差。我们这里使用标准 L2 损失函数。" |
"source": [ | ||
"### 定义训练循环\n", | ||
"\n", | ||
"我们现在有了网络模型和训练数据。现在来训练模型,即,基于[梯度下降](https://en.wikipedia.org/wiki/Gradient_descent)使用训练数据来更新模型的变量(`W` 和 `b`)使得损失量变小。梯度下降方案中有很多参数,通过`tf.train.Optimizer`实现。我们强烈建议使用这些实现方式,但基于通过基本规则创建模型的精神,在这个特别示例中,我们自己实现基本的数学运算。" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改句建议再次斟酌,逻辑存在些许问题
"id": "RwWPaJryD2aN" | ||
}, | ||
"source": [ | ||
"最后,我们对训练数据重复地运行,观察`W` 和 `b`是怎么变化的。" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"最后,我们对训练数据重复地运行,观察`W` 和 `b`是怎么变化的。" | |
"最后,我们对训练数据重复地运行,观察 `W` 和 `b` 是怎么变化的。" |
"source": [ | ||
"## 下一步\n", | ||
"\n", | ||
"在这个教程中,我们讨论了`Variable`,而且创建和训练了一个简单的线性模型,使用了在此之前所学习的 TensorFlow 知识点。\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"在这个教程中,我们讨论了`Variable`,而且创建和训练了一个简单的线性模型,使用了在此之前所学习的 TensorFlow 知识点。\n", | |
"在这个教程中,我们讨论了 `Variable`,而且创建和训练了一个简单的线性模型,使用了在此之前所学习的 TensorFlow 知识点。\n", |
"\n", | ||
"在这个教程中,我们讨论了`Variable`,而且创建和训练了一个简单的线性模型,使用了在此之前所学习的 TensorFlow 知识点。\n", | ||
"\n", | ||
"理论而言,用在机器学习研究上,跟 TensorFlow 相关的内容差不多就这些。实际上,特别是神经网络,高级的 API 比如`tf.keras`是更方便的,因为它提供了更高级别的内建模块(命名为\"layers\"),可以保存和恢复状态,成套的损失函数和优化策略等。\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"理论而言,用在机器学习研究上,跟 TensorFlow 相关的内容差不多就这些。实际上,特别是神经网络,高级的 API 比如`tf.keras`是更方便的,因为它提供了更高级别的内建模块(命名为\"layers\"),可以保存和恢复状态,成套的损失函数和优化策略等。\n" | |
"理论而言,用在机器学习研究上,跟 TensorFlow 相关的内容差不多就这些。实际上,特别是神经网络,高级的 API 比如 `tf.keras` 是更方便的,因为它提供了更高级别的内建模块(命名为\"layers\"),可以保存和恢复状态,成套的损失函数和优化策略等。\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
PiperOrigin-RevId: 262974655
No description provided.