2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Kerasでのモデル可視化

Posted at

Kerasでのモデル可視化方法は、.summary()とplot_modelを使用する方法の2種類がある。それぞれ使用した結果を比較する。

.summary

まずは、.summary()を試してみる。

print(model.summary())

image.png

plot_model

次に、plot_modelを試してみる。

from tensorflow.keras.utils import plot_model
plot_model(model, show_shapes = True, expand_nested = True, to_file='model.png')

image.png

結果

plot_modelは図示されるので見やすい。一方で、plot_modelのほうではパラメータの数が見えない。Tensorflowの公式ドキュメントを見ても、表示させるための引数は無さそう。
https://www.tensorflow.org/api_docs/python/tf/keras/utils/plot_model

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?