Constructs a `BertConfig` from a Python dictionary of parameters.
(cls, json_object)
| 236 | |
| 237 | @classmethod |
| 238 | def from_dict(cls, json_object): |
| 239 | """Constructs a `BertConfig` from a Python dictionary of parameters.""" |
| 240 | config = BertConfig(vocab_size_or_config_json_file=-1) |
| 241 | for key, value in json_object.items(): |
| 242 | config.__dict__[key] = value |
| 243 | return config |
| 244 | |
| 245 | @classmethod |
| 246 | def from_json_file(cls, json_file): |
no test coverage detected