windowsでkeras可視化
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| windowsでkeras可視化 [2017/07/29] – [6.モデル可視化ソースコードのコピペと実行] adash333 | windowsでkeras可視化 [2018/10/07] (現在) – 外部編集 127.0.0.1 | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ===== (5)WindowsでKerasモデル可視化 ===== | ===== (5)WindowsでKerasモデル可視化 ===== | ||
| + | < | ||
| + | <iframe width=" | ||
| + | </ | ||
| 初めてのTensorflow ~Kerasで機械学習プログラミング~\\ | 初めてのTensorflow ~Kerasで機械学習プログラミング~\\ | ||
| (5)WindowsでKerasモデル可視化\\ | (5)WindowsでKerasモデル可視化\\ | ||
| 行 54: | 行 57: | ||
| ==== 6.モデル可視化ソースコードのコピペと実行 ==== | ==== 6.モデル可視化ソースコードのコピペと実行 ==== | ||
| + | < | ||
| + | <iframe width=" | ||
| + | </ | ||
| + | |||
| + | |||
| 以下のコードをコピペしてから、Shift + Enterで実行。 | 以下のコードをコピペしてから、Shift + Enterで実行。 | ||
| https:// | https:// | ||
| - | 大事な部分は、以下の3行。 | + | 今回大事な部分は、最後の数行。 |
| < | < | ||
| + | # モデルの可視化 | ||
| + | |||
| from IPython.display import SVG | from IPython.display import SVG | ||
| - | from keras.utils.vis_util | + | from keras.utils.vis_utils |
| SVG(model_to_dot(model).create(prog=' | SVG(model_to_dot(model).create(prog=' | ||
| + | |||
| + | # モデルの画像をpng形式で保存したいとき | ||
| + | # from keras.utils import plot_model | ||
| + | # plot_model(model, | ||
| </ | </ | ||
| - | |||
| - | ==== 参考 ==== | ||
| - | https:// | ||
| + | # モデルの画像をpng形式で保存したいとき | ||
| - | http:// | + | のコードを実行すると、.ipynbと同じフォルダに、Kerasのモデル図がmodel.pngという名前で保存される。 |
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | ==== 参考 ==== | ||
| + | Keras Documentation\\ | ||
| + | Visualization\\ | ||
| + | https:// | ||
| + | →KerasのDocumentationは日本語もありますが、なんか古いことがあるので、日本語のDocumentationを読んでうまくいかないときは、アドレスから、「\ja」を消して、英語のDocumentationを読むことをお勧めします。Versionによってコマンドがころころ変わるので、最初から英語のDocumentationを読む方が結局早いかもしれません。 | ||
| + | |||
| + | [Keras/ | ||
| + | agumon | ||
| + | 2017年05月03日に更新\\ | ||
| + | http:// | ||
| + | Windows8.1でAnaconda3+Keras2.0でモデル可視化の際の注意点(2017年7月版) | ||
| + | 2017/7/23 2017/7/29\\ | ||
| http:// | http:// | ||
windowsでkeras可視化.1501338683.txt.gz · 最終更新: 2018/10/07 (外部編集)
