首页 > 解决方案 > 理解 _tf_sess()

问题描述

我正在阅读 Google Brain 研究论文中的可重现代码,但我很难理解它。

在 MonitoredSession 内部,使用了模棱两可sess._tf_sess()。不幸的是,文档中没有提到有关此功能的任何内容。

这是链接: https ://github.com/anonymous-iclr-2019/acai-iclr-2019/blob/master/lib/train.py

标签: pythontensorflow

解决方案


MonitoredSession是基本的包装器tf.Session()_tf_sess是返回被包装的基本会话的“私有”方法:https ://github.com/tensorflow/tensorflow/blob/124e8eebc72994a3f1153a3f6465f3914523fc1a/tensorflow/python/training/monitored_session.py#L842 。


推荐阅读