Constructs a `BertConfig` from a json file of parameters.
(cls, json_file)
| 244 | |
| 245 | @classmethod |
| 246 | def from_json_file(cls, json_file): |
| 247 | """Constructs a `BertConfig` from a json file of parameters.""" |
| 248 | with open(json_file, "r", encoding='utf-8') as reader: |
| 249 | text = reader.read() |
| 250 | return cls.from_dict(json.loads(text)) |
| 251 | |
| 252 | def __repr__(self): |
| 253 | return str(self.to_json_string()) |
no test coverage detected