0

所以我按照这个博客使用 ML 构建图像分类,我已经训练了 2 个数据集,狗和管道,无论我给它哪个图像,它总是说它的 100% 管道,并出现以下错误,

To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
c:/Users/user1/Projects/firstCustomImageRecognit.py:12: MatplotlibDeprecationWarning: '.predictImage()' has been deprecated! Please use 'classifyImage()' instead.
  predictions, probabilities = prediction.predictImage("12.jpeg", result_count=3)
Pipes  :  100.0
dogs  :  0.0

谁能告诉需要做什么

4

1 回答 1

0

正如警告所建议的那样,使用classifyImage()inplace of predictImage(),它在最新版本中已被删除。

您可以使用禁止警告消息

import logging, os
logging.disable(logging.WARNING)
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
于 2021-09-27T04:25:43.227 回答