python - 理解 _tf_sess()
问题描述
我正在阅读 Google Brain 研究论文中的可重现代码,但我很难理解它。
在 MonitoredSession 内部,使用了模棱两可sess._tf_sess()
。不幸的是,文档中没有提到有关此功能的任何内容。
这是链接: https ://github.com/anonymous-iclr-2019/acai-iclr-2019/blob/master/lib/train.py
解决方案
MonitoredSession
是基本的包装器tf.Session()
。_tf_sess
是返回被包装的基本会话的“私有”方法:https ://github.com/tensorflow/tensorflow/blob/124e8eebc72994a3f1153a3f6465f3914523fc1a/tensorflow/python/training/monitored_session.py#L842 。
推荐阅读
- c# - 我可以从 .net MVC 5 中的控制器修改动态属性值吗?
- reactjs - browserHistory.replace 将我带到路径“/”
- javascript - c# ReferenceError: 函数未定义
- node.js - 我的 npm 坏了 - 无法读取未定义的属性“get”
- android - UAMP MediaBrowser 方向
- node.js - Sequelize - 在验证模型的关联时获取正确的路径
- java - 无法播放整个音频片段
- python - 有人可以解释为什么用 python list 发生这种情况吗
- laravel - Homestead.yaml 文件中的授权和密钥选项有什么用?
- php - 通过数组键中的字符拆分数组