MulaiMulai sekarang secara gratis

Visualize a model

Now that you've compiled the model, take a look a the result of your hard work! You can do this by looking at the model summary, as well as its plot.

The summary will tell you the names of the layers, as well as how many units they have and how many parameters are in the model.

The plot will show how the layers connect to each other.

Latihan ini adalah bagian dari kursus

Advanced Deep Learning with Keras

Lihat Kursus

Petunjuk latihan

  • Summarize the model.
  • Plot the model.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Import the plotting function
from tensorflow.keras.utils import plot_model
import matplotlib.pyplot as plt

# Summarize the model
____.____

# Plot the model
____(____, to_file='model.png')

# Display the image
data = plt.imread('model.png')
plt.imshow(data)
plt.show()
Edit dan Jalankan Kode