Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> Python

วิธีใช้ Keras พล็อตโมเดลด้วย Python (อีกตัวอย่าง)

TensorFlow: ML Framework Google Open-source ใช้ Python ทำ Algorithms, Deep Learning Optimization คณิตศาสตร์ซับซ้อน Tensor = Multi-dimensional array เชื่อม Edge ใน Data Flow Graph

Keras: Deep Learning API Python จากโครงการ ONEIROS รันบน TensorFlow Scalable, Cross-platform เข้าถึงด้วย from tensorflow import keras

Functional API

ยืดหยุ่นกว่า Sequential API รองรับ Non-linear topology, Shared layers, Multiple I/O สร้าง DAG ของเลเยอร์

ตัวอย่าง: พล็อตโมเดล

print("The model is being plotted")
keras.utils.plot_model(model, "multi_model.png", show_shapes=True)

Code credit: TensorFlow Keras Functional Guide

ผลลัพธ์

วิธีใช้ Keras พล็อตโมเดลด้วย Python (อีกตัวอย่าง)

คำอธิบาย

  • โมเดลสามารถพล็อตเป็น Graph-of-layers ได้
  • ใช้เมธอด plot_model()
  • show_shapes=True แสดง Input/Output Shapes ของแต่ละเลเยอร์