答案 0 :(得分:0)
尝试使用keras
coreml_model = coremltools.converters.keras.convert('./Any.h5',
input_names='image',
image_input_names='image',
output_names='output',
class_labels=['1', '2'],
image_scale=1/255)
coreml_model.save('abc.mlmodel')
.h5可以通过' Sequential'
轻松创建答案 1 :(得分:0)
尝试一下:
tf_converter.convert(tf_model_path = 'inception_v1_2016_08_28_frozen.pb',
mlmodel_path = 'InceptionV1.mlmodel',
output_feature_names = ['InceptionV1/Logits/Predictions/Softmax:0'])
您需要运行tf-coreml/utils/inspect_pb.py
来获取所有节点的摘要,以获取输出节点的正确名称。在这种情况下,它是InceptionV1/Logits/Predictions/Softmax:0