Removing unused field of the Transformer class.

This commit is contained in:
Grégory Châtel
2018-07-12 14:14:17 +02:00
parent ea08605319
commit 93522a3b59
-1
View File
@@ -158,7 +158,6 @@ class TransformerModel(nn.Module):
self.h = nn.ModuleList([copy.deepcopy(block) for _ in range(cfg.n_layer)])
self.decoder = nn.Linear(cfg.n_embd, vocab, bias=False)
self.decoder.weight = self.embed.weight # Tied weights
self.clf_dropout = nn.Dropout2d(cfg.clf_pdrop) # To reproduce the noise_shape parameter of TF implementation
nn.init.normal_(self.embed.weight, std=0.02)