2

如果使用高级估计器 API 训练模型,则可以通过调用将其导出

estimator.export_savedmodel(export_dir_base, serving_input_receiver_fn,
                            strip_default_attrs=True)

但是,使用这种方法,模型以以下目录结构保存:

variables/
    variables.data-?????-of-?????
    variables.index
saved_model.pb|saved_model.pbtxt 

我找不到将这种样式(称为 savemodel 格式)转换为单个冻结图的任何方法。我想要实现的是使用tensorflow Graph Transform Tool应用转换进行优化。这无法应用saved_model.pb并失败并出现以下错误:

failed with Can't parse...both text and binary parsing failed
4

0 回答 0