问题描述
限时送ChatGPT账号..我想读取权重并将它们可视化为图像.但我没有看到任何关于模型格式以及如何读取训练权重的文档.
解决方案There's this utility which has on print_tensors_in_checkpoint_file
method http://github/tensorflow/tensorflow/blob/master/tensorflow/python/tools/inspect_checkpoint.py>
或者,您可以使用 Saver
来恢复模型并在变量张量上使用 session.run
以获取 numpy 数组形式的值
I'd like to read the weights and visualize them as images. But I don't see any documentation about model format and how to read the trained weights.
解决方案There's this utility which has on print_tensors_in_checkpoint_file
method http://github/tensorflow/tensorflow/blob/master/tensorflow/python/tools/inspect_checkpoint.py
Alternatively, you can use Saver
to restore the model and use session.run
on variable tensors to get values as numpy arrays
这篇关于如何读取保存在 tensorflow 检查点文件中的权重?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论