未验证 提交 e8eb9889 编写于 作者: J Jason 提交者: GitHub

Update README.md

上级 3834985b
......@@ -14,6 +14,8 @@ wget http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz
```
import tensorflow.contrib.slim as slim
from tensorflow.contrib.slim.nets import vgg
from tensorflow.python.framework import graph_util
import tensorflow as tf
def freeze_model(sess, output_tensor_names, freeze_model_path):
out_graph = graph_util.convert_variables_to_constants(
......@@ -32,7 +34,7 @@ with tf.Session() as sess:
"vgg_16.ckpt", slim.get_model_variables("vgg_16"))
load_model(sess)
freeze_model(sess, ["vgg_16/fc8/squeezed"], "vgg16.pb")
freeze_model(sess, ["vgg_16/fc8/squeezed"], "vgg16.pb")
```
### 步骤三 模型转换
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册