ใน ep นี้เราจะมา Refactor Model สร้าง Module, Parameter และ Optimizer เป็น Abstraction ในจัดการการอัพเดท Parameter ของโมเดล ด้วยอัลกอริทึมต่าง ๆ เพื่อลดความซับซ้อน ของ Training Loop ทำให้การเทรน Neural Network ยืดหยุ่นขึ้น

เราจะใช้โค้ดจาก Neural Network ep 5 เป็นโค้ดเริ่มต้น นำมา Refactor ต่อ

Parameter คือ คำเรียกรวม ๆ ของ Weight และ Bias ทุก Layer ที่อยู่ในโมเดล ที่จะมีการอัพเดทในทุกรอบการเทรน Hyperparameter คืออะไร คลิก

การสร้าง Optimizer ทำให้เราสามารถ Plug อัลกอริทึมในการอัพเดท Parameter แบบต่าง ๆ ได้ด้วยโค้ดเพียงบรรทัดเดียว

Comparing SGD, ADAM, ADABOUND and AMSBOUND On Training and test accuracy for DenseNet-121 and ResNet-34 on CIFAR-10. Credit https://openreview.net/forum?id=Bkg3g2R9FX
Comparing SGD, ADAM, ADABOUND and AMSBOUND On Training and test accuracy for DenseNet-121 and ResNet-34 on CIFAR-10. Credit https://openreview.net/forum?id=Bkg3g2R9FX

เรามาเริ่มกันเลยดีกว่า

Open In Colab

แชร์ให้เพื่อน:

Surapong Kanoktipsatharporn on FacebookSurapong Kanoktipsatharporn on LinkedinSurapong Kanoktipsatharporn on Rss
Surapong Kanoktipsatharporn
Solutions Architect at Bua Labs
The ultimate test of your knowledge is your capacity to convey it to another.

Published by Surapong Kanoktipsatharporn

The ultimate test of your knowledge is your capacity to convey it to another.