model.py 文件源码

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

项目:cxflow-tensorflow 作者: Cognexa 项目源码 文件源码
def _create_session(self, session_config: Optional[dict]) -> tf.Session:
        """
        Create and return TF Session for this model.

        By default the session is configured with ``tf.ConfigProto`` created with
        the given ``session_config`` as ``**kwargs``. Nested dictionaries such as
        ``gpu_options`` or ``graph_options`` are handled automatically.

        :param session_config: session configuration dict as specified in the config yaml
        :return: TensorFlow session
        """
        if session_config:
            session_config = tf.ConfigProto(**session_config)
        return tf.Session(graph=self._graph, config=session_config)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号