tf-keras-skeleton.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:LIE 作者: EmbraceLife 项目源码 文件源码
def to_yaml(self, **kwargs):
            """Returns a yaml string containing the network configuration.

            To load a network from a yaml save file, use
            `keras.models.model_from_yaml(yaml_string, custom_objects={})`.

            `custom_objects` should be a dictionary mapping
            the names of custom losses / layers / etc to the corresponding
            functions / classes.

            Arguments:
                **kwargs: Additional keyword arguments
                    to be passed to `yaml.dump()`.

            Returns:
                A YAML string.

            Raises:
                ImportError: if yaml module is not found.
            """
            if yaml is None:
              raise ImportError('Requires yaml module installed.')
            return yaml.dump(self._updated_config(), **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号