จากใน ep ก่อน เราได้เรียนรู้การสร้าง ConvNet ขึ้นมาจากหลายส่วนประกอบด้วยกัน และเมื่อสร้างโมเดลขึ้นมาแล้ว ก่อนเทรนเราจำเป็นต้อง Initialize Parameter (Weight, Bias) ต่าง ๆ ด้วยค่าที่เหมาะสม ใน ep ที่แล้ว เราใช้ Kaiming Initalization

แล้วถ้าโมเดลเราเกิดซับซ้อนขึ้นเรื่อย ๆ ล่ะ เช่น มีการเปลี่ยน Activaiton Function, มี Skip Connection, มีหลาย Input, เพิ่ม BatchNorm แบบต่าง ๆ, etc. จะทำอย่างไร

เมื่อโมเดลมีความซับซ้อนมากขึ้น Kaiming Initialization ก็มี Parameter ให้เรา Config ได้พอสมควร เช่น gain สำหรับ Activation Function แบบต่าง ๆ, Uniform หรือ Normal, a สำหรับ Leaky ReLU, etc. แต่ถ้าโมเดลเราซับซ้อนกว่านั้นอีกล่ะ เราจะยังสามารถใช้ Kaiming Initialization ได้อีกหรือไม่

Layer-Sequential Unit-Variance Initialization (LSUV) คืออะไร

GoogLeNet training on ILSVRC-2012 dataset with LSUV and reference Jia et al. (2014) BVLC initializations. Training loss (left) and validation accuracy (right). Top – first epoch, middle – first ten epochs, bottom. Credit https://arxiv.org/abs/1511.06422
GoogLeNet training on ILSVRC-2012 dataset with LSUV and reference Jia et al. (2014) BVLC initializations. Training loss (left) and validation accuracy (right). Top – first epoch, middle – first ten epochs, bottom. Credit https://arxiv.org/abs/1511.06422

Layer-Sequential Unit-Variance Initialization หรือ เรียกสั้น ๆ ว่า LSUV เป็นแนวคิดง่าย ๆ ในการ Intialization ที่ไม่ต้องใช้สูตรคณิตศาสต์ซับซ้อน

LSUV มีแนวคิดที่คล้าย ๆ กับ LR Finder คือ อัพเดท Parameter แล้ววนลูปเช็คไปเรื่อย ๆ จนกว่าจะได้ตามที่ต้องการ เรามาดูตัวอย่างจะเห็นภาพชัดขึ้น LSUV เริ่มที่หัวข้อ 4/2. Init Model wih LSUV

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

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.