Upload modeling_fastesm.py with huggingface_hub
Browse files- modeling_fastesm.py +2 -1
modeling_fastesm.py
CHANGED
@@ -745,7 +745,8 @@ class FastEsmPreTrainedModel(PreTrainedModel):
|
|
745 |
if module.padding_idx is not None:
|
746 |
module.weight.data[module.padding_idx].zero_()
|
747 |
elif isinstance(module, nn.LayerNorm):
|
748 |
-
module.bias
|
|
|
749 |
module.weight.data.fill_(1.0)
|
750 |
|
751 |
def get_input_embeddings(self) -> nn.Module:
|
|
|
745 |
if module.padding_idx is not None:
|
746 |
module.weight.data[module.padding_idx].zero_()
|
747 |
elif isinstance(module, nn.LayerNorm):
|
748 |
+
if module.bias is not None:
|
749 |
+
module.bias.data.zero_()
|
750 |
module.weight.data.fill_(1.0)
|
751 |
|
752 |
def get_input_embeddings(self) -> nn.Module:
|