-
Notifications
You must be signed in to change notification settings - Fork 474
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
创建定制化 Estimator #53
创建定制化 Estimator #53
Conversation
创建定制化 Estimators
@Starriers 失效的图,需要你去 TensorFlow 官方找图源进行替换 |
校对认领 |
@luochen1992 ok |
get_started/custom_estimators.md
Outdated
Let's see how to solve the Iris problem with a custom Estimator. A quick | ||
reminder--here's the organization of the Iris model that we're trying to mimic: | ||
让我们看看如何使用定制化 Estimator 解决 Iris 问题。 | ||
快速提醒 -- 这是我们尝试模仿虹膜模型的组织结构: |
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.
『 -- 』=>『 —— 』
多打了一个空格
get_started/custom_estimators.md
Outdated
本文档介绍定制化 Estimators。特别是, | ||
本文档将演示如何创建定制化 @{tf.estimator.Estimator$Estimator} , | ||
@{tf.estimator.DNNClassifier$`DNNClassifier`} 在解决 Iris 问题的行为中, | ||
它可以模拟预制的 Estimator。 |
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.
『 Iris 』=>『虹膜 』
@Starriers @leviding 校对完成 |
@Starriers 调整一下吧,该是一行的就调整到一行。然后我再 Review 一遍就行了。 |
@Starriers @luochen1992 有空校对下新的那个 PR 哈 |
校对修改建议完成 |
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.
@Starriers 问题太多了!!
@luochen1992 校对的时候,格式问题也要指出的。
get_started/custom_estimators.md
Outdated
@{tf.estimator.DNNClassifier$`DNNClassifier`} in solving the Iris problem. See | ||
the @{$get_started/premade_estimators$Pre-Made Estimators chapter} for details | ||
on the Iris problem. | ||
本文档介绍定制化 Estimator。特别是,本文档将演示如何创建定制化 @{tf.estimator.Estimator$Estimator} ,@{tf.estimator.DNNClassifier$`DNNClassifier`} 在解决虹膜问题的行为中,它可以模拟预制的 Estimator。有关虹膜问题的详细信息,请参阅 @{$get_started/premade_estimators$Pre-Made Estimators chapter} 。 |
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.
段尾多了空格
get_started/custom_estimators.md
Outdated
</div> | ||
<div style="text-align: center"> | ||
Pre-made and custom Estimators are all Estimators. | ||
预制和定制化 Estimator 都是 Estimator. |
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.
句号
get_started/custom_estimators.md
Outdated
dataset = dataset.shuffle(1000).repeat().batch(batch_size) | ||
|
||
# Return the read end of the pipeline. | ||
# 返回管道读取的结束端 |
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.
句号
get_started/custom_estimators.md
Outdated
the following lines create the estimator and set the params to configure the | ||
model. This configuration step is similar to how we configured the @{tf.estimator.DNNClassifier} in | ||
@{$get_started/premade_estimators}. | ||
调用者可以将 `params` 传递给 Estimator 的构造函数。任何传递给构造函数的`params` 接着都会传递给 `model_fn`。在 [`custom_estimator.py`](https://github.com/tensorflow/models/blob/master/samples/core/get_started/custom_estimator.py) 中以下几行会创建 estimator 并设置参数来配置该参数模型。此配置步骤与我们在 @{$get_started/premade_estimators} 中如何配置 @{tf.estimator.DNNClassifier} 相似。 |
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.
空格少了
get_started/custom_estimators.md
Outdated
* [Evaluate](#evaluate) | ||
* [Train](#train) | ||
* [定义模型](#define_the_model) | ||
* 为每种[三种不同模式](#modes): |
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.
多了空格
get_started/custom_estimators.md
Outdated
@{tf.train.AdagradOptimizer} because we're mimicking the `DNNClassifier`, which | ||
also uses `Adagrad` by default. The `tf.train` package provides many other | ||
optimizers—feel free to experiment with them. | ||
构建训练操作将需要一个优化器。我们将使用 @{tf.tra.AdagradOptimizer},因为我们正在模`DNNClassifier`,默认情况下也使用 `Adagrad`。 `tf.train` 包提供了许多其他优化器--可以随意使用它们。 |
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.
空格多了
get_started/custom_estimators.md
Outdated
|
||
```python | ||
# Build 2 hidden layer DNN with 10, 10 units respectively. | ||
# 分别用 10 个单元和 10 个单元 建立 2 个隐藏层 DNN。 |
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.
空格问题 + 用两个 10 单元建立有 2 个隐藏层的 DNN
get_started/custom_estimators.md
Outdated
Here the `params` dictionary serves the same purpose as the key-word | ||
arguments of `DNNClassifier`; that is, the `params` dictionary lets you | ||
configure your Estimator without modifying the code in the `model_fn`. | ||
在这里 `params` 字典的作用与关键字相同。`DNNClassifier` 的参数; 也就是说, `params` 字典允许您在不修改 `model_fn` 中代码的情况下配置您的 Estimator。 |
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.
空格多了一个
get_started/custom_estimators.md
Outdated
|
||
* loss: The loss reported. | ||
* 损失:损失报告。 |
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.
格式乱码
get_started/custom_estimators.md
Outdated
These tensorboard graphs are one of the main reasons it's important to pass a | ||
`global_step` to your optimizer's `minimize` method. The model can't record | ||
the x-coordinate for these graphs without it. | ||
这些 tensorboard 是向优化的`minimize` 方法传递 `global_step` 的主要原因之一。没有它,模型就不能记录这些图的 x 坐标。 |
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.
空格少了
|
||
## Implement training, evaluation, and prediction {#modes} |
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.
这是锚点啊,怎么能翻译呢
@Starriers @luochen1992 看看我的 修改,下次注意哈,还有什么问题吗? |
格式问题 确实挺多的…… 一次一定注意! |
翻译完成 #3