调试在Tensorflow中导出的Custom Vision项目

时间:2019-09-09 06:36:34

标签: microsoft-custom-vision

这是关于将Custom Vision模型导出到tensorflow并使用tensorboard对其进行调试(或通过任何其他调试方式)

我们正在关注本教程 https://docs.microsoft.com/bs-latn-ba/azure/cognitive-services/custom-vision-service/export-model-python

升级到Tensorflow 2.0后,一切正常 除了最后一个片段

# These names are part of the model and cannot be changed.
output_layer = 'loss:0'
input_node = 'Placeholder:0'

with tf.Session() as sess:
    try:
        prob_tensor = sess.graph.get_tensor_by_name(output_layer)
        predictions, = sess.run(prob_tensor, {input_node: [augmented_image] })
    except KeyError:
        print ("Couldn't find classification output layer: " + output_layer + ".")
        print ("Verify this a model exported from an Object Detection project.")
        exit(-1)

是否有任何方法可以调试和解决此问题?可能是通过张量板等? 又如何?

0 个答案:

没有答案