JA: Add ja/lite/microcontrollers/get_started.md#123
Conversation
|
Reviewers added, please take a look. When your review is finished, approve the pull request or include "LGTM" in your comment. |
|
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 with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
| マイクロコントローラ向けTensorFlow Liteの使い方の基本を実演します。 | ||
|
|
||
| * [Micro speech](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples/micro_speech) - | ||
| マイクロフォンで音声を取り込み、"yes"と"no"という単語を検出します。 |
There was a problem hiding this comment.
I used your suggestion.
| [Hello World](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples/hello_world) | ||
| アプリケーション例を始めから終わりまで見ていきます。 | ||
|
|
||
| ## Hello World サンプル |
There was a problem hiding this comment.
I used your suggestion.
| ## Hello World サンプル | ||
|
|
||
| この例はマイクロコントローラ向けTensorFlow Liteの使い方の基本を実演します。 | ||
| モデルの訓練、TensorFlow Liteと共に使うためのモデル変換、 |
There was a problem hiding this comment.
[weak suggestion] モデルの訓練 -> モデルの訓練から
The invention is to want to represent that 始めから終わりまでのワークフロー includes 訓練, 変換, and 実行.
There was a problem hiding this comment.
I used your suggestion.
| * [`schema_generated.h`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/schema/schema_generated.h) | ||
| TensorFlow Lite [`FlatBuffer`](https://google.github.io/flatbuffers/) モデルファイルフォーマットのスキームを含みます。 | ||
| * [`version.h`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/version.h) | ||
| TensorFlow Lite スキームへのバージョン情報を提供します。 |
There was a problem hiding this comment.
I used your suggestion.
|
|
||
| ### モデルをインクルードする | ||
|
|
||
| マイクロコントローラ向けTensorFlow Lite インタープリタは、モデルがC++配列で提供されることを期待しています。*Hellow World* サンプルでは、モデルは `sine_model_data.h` と `sine_model_data.cc` で定義されています。ヘッダーは以下の行に含まれます。 |
There was a problem hiding this comment.
I used your suggestion.
|
|
||
| ### ログ取得を用意する | ||
|
|
||
| ログ取得の準備するために、`tflite::ErrorReporter` ポインタが作成され、ポインタは `tflite::MicroErrorReporter` インスタンスに対して使用されます。 |
There was a problem hiding this comment.
[weak suggestion]
`tflite::ErrorReporter` ポインタが作成され、ポインタは `tflite::MicroErrorReporter` インスタンスに対して使用されます。
->
`tflite::MicroErrorReporter` インスタンスへのポインタを使って、`tflite::ErrorReporter` ポインタが作成されます。
or
`tflite::MicroErrorReporter` インスタンスへのポインタを持つ、`tflite::ErrorReporter` ポインタが作成されます。
There was a problem hiding this comment.
I used your 2nd suggestion.
AseiSugiyama
left a comment
There was a problem hiding this comment.
Thank you for your great work! Could you check the followings?
- This PR contains untranslated files
build_convert.md,index.md, andlibrary.md. Could you remove these files from this PR? - I reviewed your PR. Could you check it, please?
|
|
||
| * [Arduino Nano 33 BLE Sense](https://store.arduino.cc/usa/nano-33-ble-sense-with-headers) | ||
| (Arduino IDEを使います) | ||
| * [SparkFun Edge](https://www.sparkfun.com/products/15170) (ソースから直接ビルドします) |
|
|
||
| ## サポートされているデバイスを入手する | ||
|
|
||
| この案内書にしたがっていくには、サポートされたハードウェアデバイスが必要です。 |
There was a problem hiding this comment.
[weak suggestion]
| この案内書にしたがっていくには、サポートされたハードウェアデバイスが必要です。 | |
| このガイドにしたがっていくには、サポートされたハードウェアデバイスが必要です。 |
I think ガイド is better than 案内書 or 手順書 to be consistent.
There was a problem hiding this comment.
I used your suggestion.
| ## サポートされているデバイスを入手する | ||
|
|
||
| この案内書にしたがっていくには、サポートされたハードウェアデバイスが必要です。 | ||
| 使用するアプリケーション例は下記デバイスで検証されています。 |
There was a problem hiding this comment.
[suggestion]
| 使用するアプリケーション例は下記デバイスで検証されています。 | |
| 使用するサンプルのアプリケーションは下記デバイスで検証されています。 |
At the following, examples is translated サンプル. So it seems to be better to use the word サンプル here.
There was a problem hiding this comment.
I used your suggestion.
|
|
||
| ## サンプルを探索する | ||
|
|
||
| マイクロコントローラ向けTensorFlow Liteはいくつかのアプリケーション例が付属しており、 |
There was a problem hiding this comment.
[suggestion]
| マイクロコントローラ向けTensorFlow Liteはいくつかのアプリケーション例が付属しており、 | |
| マイクロコントローラ向けTensorFlow Liteにはいくつかのサンプルのアプリケーションが付属しており、 |
Same as above, I guess it is better to translate example into サンプル.
There was a problem hiding this comment.
I used your suggestion.
| ## サンプルを探索する | ||
|
|
||
| マイクロコントローラ向けTensorFlow Liteはいくつかのアプリケーション例が付属しており、 | ||
| それらはさまざまなタスクの使い方を実演します。 |
There was a problem hiding this comment.
[suggestion]
| それらはさまざまなタスクの使い方を実演します。 | |
| それらはさまざまなタスクへの適用の仕方を実際の例によって示します。 |
I think the words "its use" means "how to use TensorFlow Lite" not "how to use tasks". How about this?
There was a problem hiding this comment.
I think your suggestion is right.
| ``` | ||
|
|
||
| `AllOpsResolver` は、マイクロコントローラ向けTensorFlow Liteで利用可能なすべての演算を読み込み、それは多くのメモリを使用します。 | ||
| 与えられたモデルはこれら演算の一部のみを使用するであろうから、現実のアプリケーションは必要な演算のみを読み込むことが推奨されます。 |
There was a problem hiding this comment.
[suggestion]
| 与えられたモデルはこれら演算の一部のみを使用するであろうから、現実のアプリケーションは必要な演算のみを読み込むことが推奨されます。 | |
| 通常、モデルが必要とするのはこれらの演算のうちの一部のため、現実世界に適用する際には必要な演算のみを読み込むことが推奨されます。 |
I think the words real world application means implementation into the real world or deploying it into a production environment (not software). How do you think?
There was a problem hiding this comment.
I think your suggestion is right.
| // それは次元ごとに1つの要素を持つ。我々の入力は2次元のテンソルで1つの要素を含むので、 | ||
| // "dims" は2であるべきである。 |
There was a problem hiding this comment.
I'm confused by these two lines 🤔 In this Jupyter notebook , the input of the original model (x_test) has the shape (200, ) and this means x_test is a 1-D array. However, based on this document, the input of this model should have two dimensions.
I cannot find any description supports this claim. Let me check.
There was a problem hiding this comment.
I think your translation has no problem and we have nothing to fix on this line. Since English documents are the "single source of truth", it is better to discuss at the tensorflow/tensorflow repo. I'll do that.
There was a problem hiding this comment.
There was a problem hiding this comment.
Sorry, this comment came from my misunderstanding. What I have to check truly is the input shape of sine_model, not the input of model_2 . Thank you for your suggestion!
| モデルの出力テンソルは、`tflite::MicroIntepreter` 上で `output(0)` を呼ぶことで取得できます。 | ||
| `0` は最初の(そして唯一の)出力テンソルであることを表します。 | ||
|
|
||
| サンプルでは、モデルの出力は1つの2次元テンソルに含まれる1つの浮動小数点数です。 |
There was a problem hiding this comment.
Same as above, I'm confused by this line too. IMO, the model's output seems to be 1D Tensor contains two elements 🤔
There was a problem hiding this comment.
Sorry, same as above, this comment came from my misunderstanding.
|
|
||
| コードの残り部分は、モデルの読み込みと推論を実演します。 | ||
|
|
||
| ### ログ取得を用意する |
There was a problem hiding this comment.
[suggestion]
| ### ログ取得を用意する | |
| ### ログ取得を準備する |
I guess this seems to be better to be consistent with the next line.
There was a problem hiding this comment.
I used your suggestion.
|
|
||
| ### ログ取得を用意する | ||
|
|
||
| ログ取得の準備するために、`tflite::ErrorReporter` ポインタが作成され、ポインタは `tflite::MicroErrorReporter` インスタンスに対して使用されます。 |
There was a problem hiding this comment.
[suggeston]
| ログ取得の準備するために、`tflite::ErrorReporter` ポインタが作成され、ポインタは `tflite::MicroErrorReporter` インスタンスに対して使用されます。 | |
| ログ取得の準備をするために、`tflite::MicroErrorReporter` インスタンスのポインタを用いて `tflite::ErrorReporter` ポインタが作成されます。 |
I think tflite::ErrorReporter is an abstract class and tflite::MicroErrorReporter is one of implementations of it.
There was a problem hiding this comment.
I used your suggestion.
| uint8_t tensor_arena[tensor_arena_size]; | ||
| ``` | ||
|
|
||
| 要求される大きさは使用するモデルに依存し、実験によって決められる必要があるかもしれません。 |
There was a problem hiding this comment.
[weak suggestion]
| 要求される大きさは使用するモデルに依存し、実験によって決められる必要があるかもしれません。 | |
| 要求される大きさは使用するモデルに依存し、実験によって決める必要があるかもしれません。 |
There was a problem hiding this comment.
I used your suggestion.
| このテンソルを検証し、形と型が期待したものであることを確認します。 | ||
|
|
||
| ```C++ | ||
| // 入力は期待するプロパティを持つこと確認する |
There was a problem hiding this comment.
[suggestion]
| // 入力は期待するプロパティを持つこと確認する | |
| // 入力は期待するプロパティを持つことを確認する |
There was a problem hiding this comment.
I used your suggestion.
| TF_LITE_MICRO_EXPECT_NE(nullptr, input); | ||
| // プロパティ "dims" はテンソルの形を教えてくれる。 | ||
| // それは次元ごとに1つの要素を持つ。我々の入力は2次元のテンソルで1つの要素を含むので、 | ||
| // "dims" は2であるべきである。 |
There was a problem hiding this comment.
[weak suggestion]
| // "dims" は2であるべきである。 | |
| // "dims" の数は2であるべきである。 |
or "dims" の次元数は2であるべきである。
There was a problem hiding this comment.
I used your 2nd suggestion.
| TF_LITE_MICRO_EXPECT_EQ(kTfLiteFloat32, input->type); | ||
| ``` | ||
|
|
||
| enum値 `kTfLiteFloat32` は、TensorFlow Lite のデータ型の一つへの参照であり、 |
There was a problem hiding this comment.
[weak suggestion]
| enum値 `kTfLiteFloat32` は、TensorFlow Lite のデータ型の一つへの参照であり、 | |
| enum値 `kTfLiteFloat32` は、TensorFlow Lite のデータ型のうちの一つへの参照であり、 |
There was a problem hiding this comment.
I used your suggestion.
| この単体テストを一度ひととおり読み終えたら、 | ||
| [`main_functions.cc`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/examples/hello_world/main_functions.cc) | ||
| にあるサンプルアプリケーションのコードを理解できるはずです。 | ||
|
|
There was a problem hiding this comment.
I used your suggestion.
|
|
||
| ライブラリがさまざまなモデルやアプリケーションと共にどのように利用できるかを知るためには、ほかのサンプルをデプロイし、そのコードを初めから終わりまで見てみることをお薦めします。 | ||
|
|
||
| <a class="button button-primary" href="https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples">Githubのサンプルアプリケーション</a> |
There was a problem hiding this comment.
[Suggestion]
| <a class="button button-primary" href="https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples">Githubのサンプルアプリケーション</a> | |
| <a class="button button-primary" href="https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples">GitHubのサンプルアプリケーション</a> |
There was a problem hiding this comment.
I used your suggestion.
* deleted untranslaed files
|
@zinziroge Great work! LGTM! |
|
thank for reviewing, @AseiSugiyama @kiszk !! |
lamberta
left a comment
There was a problem hiding this comment.
Thanks for the translation and review! 🚀
Original Document:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/microcontrollers/get_started.md