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

JA: /ja/tutorials/keras #390

Merged

Conversation

Projects
None yet
6 participants
@masa-ita
Copy link
Contributor

commented Mar 15, 2019

I've just finished translation of notebooks and a markdown document in site/en/tutorials/keras and places them in site/ja/tutorials/keras.
Could you review and pull them.
Thank you.

Masatoshi Itagaki
Niigata, Japan

masa-ita added some commits Mar 15, 2019

@masa-ita masa-ita requested review from lamberta and MarkDaoust as code owners Mar 15, 2019

@review-notebook-app

This comment has been minimized.

Copy link

commented Mar 15, 2019

Check out this pull request on ReviewNB: https://app.reviewnb.com/tensorflow/docs/pull/390

Visit www.reviewnb.com to know how we simplify your Jupyter Notebook workflows.

@googlebot

This comment has been minimized.

Copy link

commented Mar 15, 2019

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@lamberta

This comment has been minimized.

Copy link
Member

commented Mar 15, 2019

Wow, this is great, thanks! Can you please sign the CLA?

I need to find a reviewer so may take a little bit to get in. Thanks, though

@masa-ita

This comment has been minimized.

Copy link
Contributor Author

commented Mar 16, 2019

@googlebot

This comment has been minimized.

Copy link

commented Mar 16, 2019

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Mar 16, 2019

@lamberta

This comment has been minimized.

Copy link
Member

commented Mar 18, 2019

Hi @taquo, I believe you were interested in reviewing (or finding someone to help)
Thank you

@sfujiwara

This comment has been minimized.

Copy link
Contributor

commented Mar 21, 2019

Hi, I'm interested in reviewing docs translation!
I'm a Google Developers Expert (Machine Learning) in Japan.
Could I review it?

@lamberta

This comment has been minimized.

Copy link
Member

commented Mar 21, 2019

Hi @sfujiwara, thank you for volunteering!

Yes, please start reviewing, that would be great. Maybe one at a time and note your progress in a comment—just in case others would like to join in and we don't duplicate effort. I know there was a TensorFlow event in Tokyo that people are just getting back from.

@lamberta

This comment has been minimized.

Copy link
Member

commented Mar 21, 2019

Additionally, I need to set up a Japanese README and include the community translation disclaimer. I can add it to these notebooks, but I need the following translated, please:

# Community translations

Our TensorFlow community has translated these documents. Because community
translations are *best-effort*, there is no guarantee that this is an accurate
and up-to-date reflection of the
[official English documentation](https://www.tensorflow.org/?hl=en). 
If you have suggestions to improve this translation, please send a pull request 
to the [tensorflow/docs](https://github.com/tensorflow/docs) GitHub repository. 
To volunteer to write or review community translations, contact the
[docs@tensorflow.org list](https://groups.google.com/a/tensorflow.org/forum/#!forum/docs).

See the Russian and Korean READMEs for an example. Thank you!

@masa-ita

This comment has been minimized.

Copy link
Contributor Author

commented Mar 22, 2019

Thank you all.

I've just translated the README markdown file. What should I do to add it?
Make another branch or add it to this pull request?

@lamberta

This comment has been minimized.

Copy link
Member

commented Mar 22, 2019

Great, thank you.
Let's make that a separate pull request so we can get this directory created on master.

@masa-ita

This comment has been minimized.

Copy link
Contributor Author

commented Mar 22, 2019

Just created another pull request to add README.md.
added site/ja/README.md #411

@ohtaman

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

Hi, I'm interested in reviewing docs translation too.
Can I review these documents in collaboration with @sfujiwara?

@lamberta

This comment has been minimized.

Copy link
Member

commented Mar 25, 2019

Hi @ohtaman, please do!
It's not a problem if multiple people look at the same notebooks—having a few eyes can be very helpful. I'm just looking for some sign-offs before I do my own sanity checks.

Also, the ja/README.md is in, if contributors would like to propose style suggestions, update the word list, etc. Thanks

@lamberta lamberta changed the title I've created materials translated in Japanese in site/ja/tutorials/keras. JA: /ja/tutorials/keras Mar 25, 2019

@@ -0,0 +1,1002 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 27, 2019

Contributor

The library is already imported.


```suggestion

## ファッションMNISTデータセットのロード

```

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 27, 2019

Author Contributor

Yes. Your suggestion is right.

@@ -0,0 +1,1002 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 27, 2019

Contributor
  • "画素の値を整数から浮動小数点に変換し、" does not appear in original text
  • "プログラムは下記の通りです。" does not appear in original text.

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 27, 2019

Author Contributor

Yes. These are in older English version. Removed.

@@ -0,0 +1,1002 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 27, 2019

Contributor
  1. Maybe "考えてください" is better than "考えてみましょう".
  2. ex: "この層は、画像の中のピクセルの行を取り崩して横に並べるものと考えてください。"
  3. You should chose only one word for the translation of accuracy. "正確度" or "正解率". "正解率" is used in other place.

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 27, 2019

Author Contributor

Thank you for your suggestions. "正解率" is appropriate, I think.

@@ -0,0 +1,1002 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 27, 2019

Contributor

"正しい予測はグリーン" should to be "正しい予測は青"

  • I checked it in colaboratory

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 27, 2019

Author Contributor

Yes. It's blue.

@@ -0,0 +1,892 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 27, 2019

Contributor

In other documents, the translation of "training set" is not "訓練用セット" but "訓練用データ".

"テスト用セット" and "テスト用データセット" are also similar.

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 28, 2019

Author Contributor

Thanks. I’ll unify them into "訓練用データ" and "テスト用データ".

@@ -0,0 +1,892 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 27, 2019

Contributor

"検証用データセット" and "テスト用データセット" is used here.

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 28, 2019

Author Contributor

Thanks. I’ll unify them into "訓練用データ" and "テスト用データ".

@@ -0,0 +1,892 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 27, 2019

Contributor

"テストデータ" is used here.

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 28, 2019

Author Contributor

Thanks. I’ll unify them into "訓練用データ" and "テスト用データ".

@@ -0,0 +1,714 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 27, 2019

Contributor

The translation of "Explore the data" is "データを調べる" in other document (basic-classification.ipynb).

  • "検証" is a famous word as a translation of "validation".


Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 28, 2019

Author Contributor

"データを調べる" seems more appropriate.

@@ -0,0 +1,714 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 27, 2019

Contributor

Translation of following sentence seems to be missing.

  • This approach is memory intensive, though, requiring a num_words * num_reviews size matrix.


How about:

  • "これはメモリ集約的 (memory intensive) な方法ですが、`num_words * num_reviews` というサイズの行列が必要になってしまいます。"

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 28, 2019

Author Contributor

I'd like to add "ただし、これは単語数×レビュー数の行列が必要なメモリ集約的な方法です。"

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 31, 2019

Contributor

Looks good to me.

@@ -0,0 +1,691 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 28, 2019

Contributor

Typo: 重みが大きさに関連するコスト is 重み"の"大きさに関連するコスト


----

"ある訓練用データとネットワーク構造があるとき、そのデータを説明する複数の重みの値集合(つまり複数のモデル)の中で、単純なモデルのほうが複雑なものよりも過学習しにくいのです。"


seems to be a little bit difficult to understand.

(There are two different interpretations: "複数の重み" or "複数の...集合")


How about:


"ある訓練用データとネットワーク構造があって、そのデータを説明できる重みの集合が複数ある時(つまり、複数のモデルがある時)、単純なモデルのほうが複雑なものよりも過学習しにくいのです。"

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 29, 2019

Author Contributor

Thanks. It's easier to understand.

@@ -0,0 +1,691 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 28, 2019

Contributor

Typo:

訓練時に層の出力特徴量対して to 訓練時に層の出力特徴量""対して

or, 訓練時に層から出力された特徴量に対して

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 29, 2019

Author Contributor

I think the later is better.

@@ -0,0 +1,850 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 30, 2019

Contributor

(str.format`を使って)

  • backquoate does not closed.
  • (`str.format` を使って)

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 30, 2019

Author Contributor

Thanks. I fixed it.

@@ -0,0 +1,850 @@
{

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 30, 2019

Contributor
重みの値、モデルの設定、(構成によっては)オプティマイザの設定までも含んだモデル全体をファイルに保存することができます。これにより、モデルのチェックポイントを保存し、オリジナルのコードにアクセスする必要なく、中断したところから訓練を再開することができます。


"チェックポイント" can be misunderstood as .ckpt file. How about:


モデルとオプティマイザは、それらの状態(重みと変数)とモデル構成の両方を含む1つのファイルに保存することができます。これにより、モデルをエクスポートして、オリジナルのPythonコードにアクセスしなくても使用できるようになります。オプティマイザの状態についても復元されるので、中断したところから訓練を再開することもできます。

Reply via ReviewNB

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 30, 2019

Author Contributor

I'd like to change this paragraph as

重みの値、モデルの設定、そして(構成によりますが)オプティマイザの設定までも含んだモデル全体をファイルに保存することができます。これにより、モデルのある時点の状態を保存し、オリジナルのPythonコードにアクセスしなくとも、中断したところから訓練を再開することができます。

As the optimizer's configuration can not to be saved in a hdf5 file, if tf.train optimizer used.

This comment has been minimized.

Copy link
@ohtaman

ohtaman Mar 31, 2019

Contributor

OK. I understand. Looks good to me. But..
"構成によりますが" means "if tf.keras.optimizers optimizers are used", right?
If so, it may be better to write explicitly or add "訳注 (translator's note)".

This comment has been minimized.

Copy link
@masa-ita

masa-ita Apr 1, 2019

Author Contributor

Thanks for your suggestion.
I'd like to add a translator's note.

@ohtaman

This comment has been minimized.

Copy link
Contributor

commented Mar 30, 2019

@lamberta @masa-ita

I reviewed all documents.

  • Totally, it is very easy to read Japanese (good translation).
  • There is no fatal mistake.
  • I gave some comments to improve translation.
@masa-ita

This comment has been minimized.

Copy link
Contributor Author

commented Mar 30, 2019

@ohtaman

Thank you for your accurate reviews.

"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "overfit-and-underfit.ipynb のコピー",

This comment has been minimized.

Copy link
@lamberta

lamberta Mar 30, 2019

Member

Can you please change/move this file name to overfit_and_underfit.ipynb? It must match the en/ version or it won't get served in its place. Thanks

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 30, 2019

Author Contributor

Renamed. Thanks.

@sfujiwara
Copy link
Contributor

left a comment

@masa-ita I checked all of the notebooks. Your translations are great work! I left some comments of suggestions and mistakes. Please fix it if you prefer them. There are some weak suggestions and of course, you necessarily need not to follow all of my comments :)

},
"cell_type": "markdown",
"source": [
"ロードしたデータセットは、NumPY配列になります。\n",

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

typo: NumPY --> NumPy

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 31, 2019

Author Contributor

Thank you. Fixed.

"\n",
"Fashion MNISTは、画像処理のための機械学習での\"Hello, World\"としてしばしば登場する[MNIST](http://yann.lecun.com/exdb/mnist/) データセットの代替として開発されたものです。MNISTデータセットは手書きの数字(0, 1, 2 など)から構成されており、そのフォーマットはこれから使うFashion MNISTと全く同じです。\n",
"\n",
"Fashion NISTを使うのは、目先を変える意味もありますが、普通のMNISTよりも少しだけ手応えがあるからでもあります。どちらのデータセットも比較的小さく、アルゴリズムが期待したとおりに機能するかどうかを確かめるために使われます。プログラムのテストやデバッグのためには、よい出発点になります。\n",

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

typo: Fashion Nist --> Fashion MNIST

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 31, 2019

Author Contributor

Thanks.

"source": [
"ロードしたデータセットは、NumPY配列になります。\n",
"\n",
"* `train_images` と `train_labels` の2つの配列は、モデルの訓練に使用される**訓練用データセット**です。\n",

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

I think 訓練用 (italic) is better than 訓練用 (bold) because the original notebook uses italic.
In my understanding, italic and bold have different meaning:

  • italic: new technical term
  • bold: important fact

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

The above is the same for other sections in this notebook and other notebooks.

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 31, 2019

Author Contributor

Well. Your suggestion is correct for English. But Japanese does not originally have italics, and italic for Kanji seems to be difficult to read. So I prefer bold to italic.

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Apr 1, 2019

Contributor

OK, I respect your opinion :)

This comment has been minimized.

Copy link
@masa-ita

masa-ita Apr 2, 2019

Author Contributor

Thank you!

},
"cell_type": "markdown",
"source": [
"## データを調べる\n",

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

weak suggestion:
I think データを調べる --> データの観察 is better.
But, it might be a matter of preference.
Adopt it if you prefer it :).

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 31, 2019

Author Contributor

I agree. Thanks.

"source": [
"このネットワークの最初の層は、`tf.keras.layers.Flatten` です。この層は、画像を(28×28ピクセルの)2次元配列から、28×28=784ピクセルの、1次元配列に変換します。この層が、画像の中に積まれているピクセルの行を取り崩し、横に並べると考えてください。この層には学習すべきパラメータはなく、ただデータのフォーマット変換を行うだけです。\n",
"\n",
"ピクセルが1次元化されたあと、ネットワークは2つの `tf.keras.layers.Dense` 層となります。これらの層は、密結合あるいは全結合されたニューロンの層となります。最初の `Dense` 層には、128個のノード(あるはニューロン)があります。最後の層でもある2番めの層は、10ノードの**softmax**層です。この層は、合計が1になる10個の確率の配列を返します。それぞれのノードは、今見ている画像が10個のクラスのひとつひとつに属する確率を出力します。\n",

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

typo: 2番め --> 2番め

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 31, 2019

Author Contributor

Fixed. Thanks.

"\n",
"言い換えると、モデルが訓練用データを**過学習**したと考えられます。過学習への対処の仕方を学ぶことは重要です。**訓練用データセット**で高い正解率を達成することは難しくありませんが、我々は、(これまで見たこともない)**テスト用データ**に汎化したモデルを開発したいのです。\n",
"\n",
"過学習の反対語は**学習不足**です。学習不足は、モデルがテストデータに対してまだ改善の余地がある場合に発生します。学習不足の原因は様々です。モデルが十分強力でないとか、正則化のしすぎだとか、単に訓練時間が短すぎるといった理由があります。訓練不足は、訓練用データの中の関連したパターンを学習しきっていないということを意味します。\n",

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

Since we use 学習不足 above, I suggest to fix 訓練不足 --> 学習不足.

Weak Suggestion:
In addition, as fas as I know, there is no formal Japanese translation of underfitting.
Thus, I guess fixing 学習不足 --> 学習不足 (underfitting) is more user friendly.

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 31, 2019

Author Contributor

Thank you. I made changes.

" <a target=\"_blank\" href=\"https://colab.research.google.com/github/masa-ita/docs/blob/master/site/ja/tutorials/keras/overfit_and_underfit.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n",
" </td>\n",
" <td>\n",
" <a target=\"_blank\" href=\"https://github.com/masa-ita/docs/blob/master/site/ja/tutorials/keras/overfit_and_underfit.ipynb\"><img src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />View source on GitHub</a>\n",

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

ditto

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 31, 2019

Author Contributor

Fixed.

" <a target=\"_blank\" href=\"https://www.tensorflow.org/tutorials/keras/overfit_and_underfit\"><img src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" />View on TensorFlow.org</a>\n",
" </td>\n",
" <td>\n",
" <a target=\"_blank\" href=\"https://colab.research.google.com/github/masa-ita/docs/blob/master/site/ja/tutorials/keras/overfit_and_underfit.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n",

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

The link go to masa-ita's fork

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

The above is the same for other notebooks.

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 31, 2019

Author Contributor

Thanks. Fixed.

"id": "HSlo1F4xHuuM"
},
"source": [
"実線は訓練用データセットの損失、破線は検証用データセットでの損失です。(検証用データでの損失が小さい方が良いモデルです)これをみると、小さいネットワークのほうが比較基準のモデルよりも過学習が始まるのが遅いことがわかります。(4エポックではなく6エポック後)また、過学習が始まっても性能の低下がよりゆっくりしています。"

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

Weak Suggestion:
As far as I know, usually, is after .

実線は訓練用データセットの損失、破線は検証用データセットでの損失です。(検証用データでの損失が小さい方が良いモデルです)
==>
実線は訓練用データセットの損失、破線は検証用データセットでの損失です(検証用データでの損失が小さい方が良いモデルです)。

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 31, 2019

Author Contributor

Thanks. Good suggestion.

},
"cell_type": "markdown",
"source": [
"セーブドモデル(saved models) はタイムスタンプ付きのディレクトリに保存されます。"

This comment has been minimized.

Copy link
@sfujiwara

sfujiwara Mar 31, 2019

Contributor

Weak Suggestion:
I think we need not to translate SavedModel because It is a name of a format.

This comment has been minimized.

Copy link
@masa-ita

masa-ita Mar 31, 2019

Author Contributor

Thanks. It's difficult to choose Katakana and English word.

masa-ita and others added some commits Apr 1, 2019

@lamberta
Copy link
Member

left a comment

Thank you so much, Masatoshi. And thank you to the reviewers, @sfujiwara and @ohtaman, also important work.

I'm impressed by how quickly the Japanese TensorFlow community has organized :)
To facilitate this communication, we've set up a docs-ja@tensorflow.org list, so please consider joining: https://groups.google.com/a/tensorflow.org/forum/#!forum/docs-ja
Can use this to discuss translation and I hope to start sending pull request notifications to the /ja directory there.
Thanks, again!

@lamberta lamberta added ready to pull and removed ready to pull labels Apr 4, 2019

@tensorflow-copybara tensorflow-copybara merged commit b8cd622 into tensorflow:master Apr 4, 2019

2 checks passed

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

tensorflow-copybara pushed a commit that referenced this pull request Apr 4, 2019

@lamberta

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

This has been published! https://www.tensorflow.org/tutorials/keras?hl=ja

@masa-ita masa-ita deleted the masa-ita:site_ja_tutorials_keras branch Apr 4, 2019

@masa-ita

This comment has been minimized.

Copy link
Contributor Author

commented Apr 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.