编辑 TensorFlow 检查点

编程入门 行业动态 更新时间:2024-10-27 02:27:00
本文介绍了编辑 TensorFlow 检查点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我知道有一种方法可以检查 TF 检查点(如 inspect_checkpoint.py).

I know that there's a way to examine TF checkpoints (such as described in inspect_checkpoint.py).

但是,有没有一种方法可以更新此检查点中的某些权重并将其写回,而无需构建整个模型?比如我想快速编辑其中一层的权重写回,不想写这个模型对应的深度网络的代码.

However, is there a way to update certain weights in this checkpoint and write it back, without having to construct the whole model? For example, I want to quickly edit the weights of one of the layers and write it back, and don't want to write the code for the deep network this model corresponds to.

推荐答案

看一看 MetaGraph 保存和加载.那里有几个例子;您应该能够定义模型、保存 MetaGraph,然后加载和修改它,而无需手动重新定义变量.

Take a look at MetaGraph saving and loading. There are a few examples there; you should be able to define the model, save the MetaGraph, then load and modify it without re-defining the variables manually.

更多推荐

编辑 TensorFlow 检查点

本文发布于:2023-07-27 23:18:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1225243.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:检查点   编辑   TensorFlow

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!