pytorch/examples

A question about weight initialization of embedding layer.

Open

#595 geöffnet am 18. Juli 2019

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Python (9.429 Forks)batch import
good first issue

Repository-Metriken

Stars
 (21.634 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

I have a question about the weight intialization of embedding layer.

In source code of PyTorch, the weight of embedding layer is initialized by N(0, 1). In this code, the weight of embedding layer is intialized by uniform.

I trained the model two times with different initialization method, and I found that the default initialization makes the model converges too slow.

So, why the embedding is initialized by N(0, 1), which seems not a good start point?

Contributor Guide