pytorch/examples

A question about weight initialization of embedding layer.

Open

#595 建立於 2019年7月18日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Python (9,429 fork)batch import
good first issue

倉庫指標

Star
 (21,634 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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?

貢獻者指南