【发布时间】:2017-06-11 13:18:02
【问题描述】:
我试图使用inspect_checkpoint.py 的代码检查检查点。但是,我无法让它工作,因为他们并没有真正提供一个例子。我尝试了我认为可行的最简单的方法:
tf.python.tools.inspect_checkpoint.print_tensors_in_checkpoint_file(file_name='./tmp/mdl_ckpt',tensor_name='',all_tensors='')
但是我知道python 没有属性tools:
AttributeError: module 'tensorflow.python' has no attribute 'tools'
这似乎是一个(令人尴尬的)微不足道的错误/问题。有人知道发生了什么吗?为什么找不到工具?另外,即使找到了,又如何运行该文件中提供的功能?
不幸的是,这个非常相关的问题并没有真正提供如何解决这个问题的答案。问题在这里How can find the variable names that saved in tensorflow checkpoint?
【问题讨论】:
-
为我工作。你用的是什么版本的张量流?你是通过 pip 安装还是从源安装?
-
@DomJack 我正在使用
tensorflow (0.12.1),我只是使用了 pip install。还有python 3.5.1版。你呢?还有你跑的是什么,正是我写的? -
python: 2.7.6, tensorflow: 0.12.1 代码: from tensorflow.python.tools.inspect_checkpoint import print_tensors_in_checkpoint_file; print_tensors_in_checkpoint_file(file_name='./tmp/mdl_ckpt',tensor_name='',all_tensors='')
标签: python machine-learning tensorflow deep-learning