Saves the configuration as a JSON file.
(self, path)
| 309 | self.__dict__[key] = value |
| 310 | |
| 311 | def save_as_json(self, path): |
| 312 | """Saves the configuration as a JSON file.""" |
| 313 | with open(path, "w", encoding="utf-8") as config_file: |
| 314 | json.dump( |
| 315 | self.to_dict(), |
| 316 | config_file, |
| 317 | indent=2, |
| 318 | sort_keys=True, |
| 319 | ) |
| 320 | config_file.write("\n") |
| 321 | |
| 322 | |
| 323 | class ModelSpec(LayerSpec): |