MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / to_json

Method to_json

tensorflow/python/keras/engine/network.py:1392–1407  ·  view source on GitHub ↗

Returns a JSON string containing the network configuration. To load a network from a JSON save file, use `keras.models.model_from_json(json_string, custom_objects={})`. Arguments: **kwargs: Additional keyword arguments to be passed to `json.dumps()`. Returns:

(self, **kwargs)

Source from the content-addressed store, hash-verified

1390 return model_config
1391
1392 def to_json(self, **kwargs):
1393 """Returns a JSON string containing the network configuration.
1394
1395 To load a network from a JSON save file, use
1396 `keras.models.model_from_json(json_string, custom_objects={})`.
1397
1398 Arguments:
1399 **kwargs: Additional keyword arguments
1400 to be passed to `json.dumps()`.
1401
1402 Returns:
1403 A JSON string.
1404 """
1405 model_config = self._updated_config()
1406 return json.dumps(
1407 model_config, default=serialization.get_json_type, **kwargs)
1408
1409 def to_yaml(self, **kwargs):
1410 """Returns a yaml string containing the network configuration.

Calls 1

_updated_configMethod · 0.95