Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Tensorflow grab张量流预测精度_Tensorflow_Machine Learning_Prediction - Fatal编程技术网

Tensorflow grab张量流预测精度

Tensorflow grab张量流预测精度,tensorflow,machine-learning,prediction,Tensorflow,Machine Learning,Prediction,这是我当前获取图像类型的代码。一旦它检测到了狗,我会尽力让它看看检测有多确定/准确。希望这是有道理的 如果通过 我正试图让它看看检测有多确定/准确 你的意思是,模型给出的狗类型图像的概率,那么你应该只使用logits,看看狗的索引,它可以从你的CATEGORIES变量推断出来 logits是您模型最后一个softmax层的输出。我们需要更多详细信息,尤其是您的模型架构。也许一个代码示例可以帮助他和其他人,比如我 model = tf.keras.models.load_model(".\\mod

这是我当前获取图像类型的代码。一旦它检测到了狗,我会尽力让它看看检测有多确定/准确。希望这是有道理的

如果通过

我正试图让它看看检测有多确定/准确

你的意思是,模型给出的狗类型图像的概率,那么你应该只使用logits,看看狗的索引,它可以从你的CATEGORIES变量推断出来


logits是您模型最后一个softmax层的输出。

我们需要更多详细信息,尤其是您的模型架构。也许一个代码示例可以帮助他和其他人,比如我
model = tf.keras.models.load_model(".\\models\\dogandcat")
prediction = model.predict([prepare(pic)])  
if CATEGORIES[int(prediction[0][0])] == 'Dog':
        print('Dog')