我在做一个检测眼睛区域的项目,我有一个冻结的推理模型。 我正在尝试将此模型转换为.mlmodel(使用tfcoreml),但出现以下错误:
ValueError: output name: logits/BiasAdd was provided, but the Tensorflow graph does not contain a tensor with this name.
+这是输入张量(input to float):
+这是输出张量(logits/BiasAdd):
这是我用来转换的代码:
import tfcoreml as tf_converter
tf_converter.convert(tf_model_path='C:\\Users\\User\\cnn-facial-landmark\\irismodel\\freeze2\\frozen_inf_model_iris.pb',
mlmodel_path='irismodelios.mlmodel',
output_feature_names=['logits/BiasAdd'],
input_name_shape_dict={'input_to_float': [1, 112, 112, 3]})
如何解决此错误?你知道吗
我可以这样说,我解决了我的问题:How to use a retrained "tensorflow for poets" graph on iOS?
优化冻结图之后,我得到占位符而不是OneShotterator、IteratorGetNext和cast。 转换前:(优化图)
,但我不确定,因为我怀疑输入\u到\u float应该有[1112112,3]而不是[311212]:
命令日志:
转换(.mlmodel文件)后
相关问题 更多 >
编程相关推荐