pytorch/examples

A question about weight initialization of embedding layer.

开放

#595 创建于 2019年7月18日

 (1 条评论) (0 个反应) (0 位负责人)Python (9,429 个派生)batch import
good first issue

仓库指标

星标
 (21,634 个星标)
PR 合并指标
 (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?

贡献者指南