mirror of
https://github.com/wassname/openai-transformer-lm-gutenberg-erotic.git
synced 2026-06-27 16:10:19 +08:00
Removing unused field of the Transformer class.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user