【问题标题】:What does this tensorflow message mean?这个张量流消息是什么意思?
【发布时间】:2021-12-26 22:46:12
【问题描述】:

所以这是用 ML 制作的数字识别器.. 所以我收到了这个错误,我的程序在发出这个命令后就退出了。 尝试安装 tensorflow-cpu 和通常的 tensorflow..

我有一个 AMD GPU 和一个 Core i5-10th Gen CPU

2021-11-16 18:53:54.873365: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

另外我已经保存了模型,代码如下:

model = tf.keras.models.load_model('handwritten.model')

image_number = 1

while os.path.isfile(f'Image\\Digits{image_number}.png'):
    try:
        img = cv2.imread(f'Image\\Digits{image_number}.png')[:,:,0]
        img = np.invert(np.array([img]))
        prediction = model.predict(img)
        speak(f"This Digit is Probably a {np.argmax(prediction)}")
        plt.imshow(img[0], cmap=plt.cm.binary)

    except:
        speak("Error!")

    finally:
        image_number += 1 

【问题讨论】:

    标签: python tensorflow machine-learning computer-vision cv2


    【解决方案1】:

    Tensorflow 仅与 Nvidia GPU 兼容(使用 Cuda 语言)。关于该消息,它只是一个警告,告诉您可以通过使用适当的标志从源代码编译它来更好地优化 CPU 上的 Tensorflow,以便考虑 CPU 的 AVX AVX2 指令集。话虽如此,由于计算时间的原因,您只能训练简单的模型。

    【讨论】:

    • 这是一个警告,我知道,但出现的问题是,它只是在显示错误后关闭我的应用程序,这不应该发生
    • 你正在开发什么操作系统?
    • Windows.. Windows 11
    猜你喜欢
    • 2010-10-01
    • 2015-06-22
    • 1970-01-01
    • 2021-03-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-06
    相关资源
    最近更新 更多