MCPcopy Create free account
hub / github.com/SooLab/CGFormer / __init__

Method __init__

bert/modeling_utils.py:293–304  ·  view source on GitHub ↗
(self, config, *inputs, **kwargs)

Source from the content-addressed store, hash-verified

291 return {"input_ids": torch.tensor(DUMMY_INPUTS)}
292
293 def __init__(self, config, *inputs, **kwargs):
294 super().__init__()
295 if not isinstance(config, PretrainedConfig):
296 raise ValueError(
297 "Parameter config in `{}(config)` should be an instance of class `PretrainedConfig`. "
298 "To create a model from a pretrained model use "
299 "`model = {}.from_pretrained(PRETRAINED_MODEL_NAME)`".format(
300 self.__class__.__name__, self.__class__.__name__
301 )
302 )
303 # Save config in model
304 self.config = config
305
306 @property
307 def base_model(self):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected