'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
A JSON string.'

def to_json(self, **kwargs):

    def get_json_type(obj):
        if (type(obj).__module__ == np.__name__):
            return obj.item()
        if (type(obj).__name__ == type.__name__):
            return obj.__name__
        raise TypeError('Not    JSON    Serializable:', obj)
    model_config = self._updated_config()
    return json.dumps(model_config, default=get_json_type, **kwargs)
