MCPcopy Create free account
hub / github.com/THUDM/GLM / __init__

Method __init__

model/modeling_bert.py:693–702  ·  view source on GitHub ↗
(self, config, *inputs, **kwargs)

Source from the content-addressed store, hash-verified

691 """
692
693 def __init__(self, config, *inputs, **kwargs):
694 super(PreTrainedBertModel, self).__init__()
695 if not isinstance(config, BertConfig):
696 raise ValueError(
697 "Parameter config in `{}(config)` should be an instance of class `BertConfig`. "
698 "To create a model from a Google pretrained model use "
699 "`model = {}.from_pretrained(PRETRAINED_MODEL_NAME)`".format(
700 self.__class__.__name__, self.__class__.__name__
701 ))
702 self.config = config
703
704 def init_bert_weights(self, module):
705 """ Initialize the weights.

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected