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

zh-CN: tutorials/generative/dcgan.ipynb #1072

Merged
merged 6 commits into from Oct 7, 2019

Conversation

@Berrywrq
Copy link
Contributor

commented Oct 2, 2019

No description provided.

@Berrywrq Berrywrq requested review from lamberta and MarkDaoust as code owners Oct 2, 2019
@tfdocsbot

This comment has been minimized.

Copy link
Collaborator

commented Oct 2, 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 Oct 2, 2019

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

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

" model.add(layers.LeakyReLU())\n",
"\n",
" model.add(layers.Reshape((7, 7, 256)))\n",
" assert model.output_shape == (None, 7, 7, 256) # Note: None is the batch size\n",

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Oct 3, 2019

Contributor
Suggested change
" assert model.output_shape == (None, 7, 7, 256) # Note: None is the batch size\n",
" assert model.output_shape == (None, 7, 7, 256) # 注意: batch size 没有限制\n",
"\n",
"[生成对抗网络](https://arxiv.org/abs/1406.2661)(GANs)是当今计算机科学领域最有趣的想法之一。两个模型通过对抗过程同时训练。一个*生成器*(“艺术家”)学习创造看起来真实的图像,而*判别器*(“艺术评论家”)学习区分真假图像。\n",
"\n",
"![生成器和判别器图示](./images/gan1.png)\n",

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Oct 3, 2019

Contributor

Excuse me, does the path here need us to modify it? @lamberta

This comment has been minimized.

Copy link
@lamberta

lamberta Oct 3, 2019

Member

Relative path should stay the same.
On tensorflow.org, it will first check if the file exists in the language directory, then will fall back to English.
Though it does mean some broken image links when previewing notebooks on GitHub, unfortunately.

"outputs": [],
"source": [
"train_images = train_images.reshape(train_images.shape[0], 28, 28, 1).astype('float32')\n",
"train_images = (train_images - 127.5) / 127.5 # Normalize the images to [-1, 1]"

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Oct 3, 2019

Contributor
Suggested change
"train_images = (train_images - 127.5) / 127.5 # Normalize the images to [-1, 1]"
"train_images = (train_images - 127.5) / 127.5 # 将图像规格化为 [-1, 1]"
"source": [
"## 创建模型\n",
"\n",
"生成器和判别器均使用 [Keras Sequential API](https://www.tensorflow.org/guide/keras#sequential_model) 定义。"

This comment has been minimized.

Copy link
@Mr-Linus

Mr-Linus Oct 3, 2019

Contributor
Suggested change
"生成器和判别器均使用 [Keras Sequential API](https://www.tensorflow.org/guide/keras#sequential_model) 定义。"
"生成器和判别器均使用 [Keras Sequential API](https://tensorflow.google.cn/guide/keras#sequential_model) 定义。"

This comment has been minimized.

Copy link
@Berrywrq

Berrywrq Oct 4, 2019

Author Contributor

Thanks,I have made changes, please check again

Copy link
Contributor

left a comment

LGTM

Berrywrq and others added 2 commits Oct 4, 2019
Copy link
Member

left a comment

Thanks for the translation and review! 🚀

@lamberta lamberta added ready to pull and removed ready to pull labels Oct 4, 2019
},
"source": [
"# 用于生成 GIF 图片\n",
"!pip install -q imageio"

This comment has been minimized.

Copy link
@lamberta

lamberta Oct 4, 2019

Member
Suggested change
"!pip install -q imageio"
"!pip install imageio"

Remove -q from pip install

"\n",
"[生成对抗网络](https://arxiv.org/abs/1406.2661)(GANs)是当今计算机科学领域最有趣的想法之一。两个模型通过对抗过程同时训练。一个*生成器*(“艺术家”)学习创造看起来真实的图像,而*判别器*(“艺术评论家”)学习区分真假图像。\n",
"\n",
"![生成器和判别器图示](https://github.com/Berrywrq/docs/blob/master/site/zh-cn/tutorials/generative/images/gan1.png?raw=1)\n",

This comment has been minimized.

Copy link
@lamberta

lamberta Oct 4, 2019

Member

Please don't link to your personal github repo.

Perhaps link to the en/ version: https://github.com/tensorflow/docs/blob/master/site/en/tutorials/generative/images/gan1.png

site/zh-cn/tutorials/generative/dcgan.ipynb Outdated Show resolved Hide resolved
@Berrywrq

This comment has been minimized.

Copy link
Contributor Author

commented Oct 5, 2019

I have made changes,please check @lamberta

Copy link
Member

left a comment

Thanks!
Looks like the GItHub URL still required the raw=1 URL param so I went ahead and added it.

TensorFlow-Docs-Copybara pushed a commit that referenced this pull request Oct 7, 2019
PiperOrigin-RevId: 273396984
@TensorFlow-Docs-Copybara TensorFlow-Docs-Copybara merged commit 1219ba8 into tensorflow:master Oct 7, 2019
2 checks passed
2 checks passed
cla/google All necessary CLAs are signed
import/copybara Change imported to the internal review system
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.