small tweaks, make default WD be 0.1 as is often cited, and remove spurious init of LayerNorm, which is already initialized at 1,0
This commit is contained in:
1 parent
ab21d6c15d
commit
8b1e43209e
2 files changed
+1
-5
No files matched your search
@@ -173,10 +173,6 @@ class GPT(nn.Module):
|
||||
torch.nn.init.zeros_(module.bias)
|
||||
elif isinstance(module, nn.Embedding):
|
||||
torch.nn.init.normal_(module.weight, mean=0.0, std=0.02)
|
||||
elif isinstance(module, (LayerNorm, nn.LayerNorm)):
|
||||
torch.nn.init.ones_(module.weight)
|
||||
if module.bias is not None:
|
||||
torch.nn.init.zeros_(module.bias)
|
||||
|
||||
def forward(self, idx, targets=None):
|
||||
device = idx.device
|
||||
|
||||
Reference in new issue
Block a user