From c0e4f7083aa63a4e7f0220485cdbcbfe49e06594 Mon Sep 17 00:00:00 2001 From: Victoria X Lin Date: Tue, 11 Sep 2018 23:06:58 -0700 Subject: [PATCH] Fix embedding layer implementation Embedding dropout parameter is not used --- models/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/common.py b/models/common.py index 27e434db..eb9d2e57 100644 --- a/models/common.py +++ b/models/common.py @@ -333,7 +333,7 @@ class Embedding(nn.Module): if self.project: self.projection = Feedforward(dimension, trained_dimension) dimension = trained_dimension - self.dropout = nn.Dropout(0.2) + self.dropout = nn.Dropout(dropout) self.dimension = dimension def forward(self, x, lengths=None, device=-1):