keras.models.load_model(path)
用到这个函数的时候会显示如下红色字体
2021-07-08 10:30:40.633573: I tensorflow/core/platform/cpu_feature_guard.cc:142] 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.
在stackoverflow上找到了问题的解答
An important part of Tensorflow is that it is supposed to be fast. With a suitable installation, it works with CPUs, GPUs, or TPUs. Part of going fast means that it uses different code depending on your hardware. Some CPUs support operations that other CPUs do not, such as vectorized addition (adding multiple variables at once). Tensorflow is simply telling you that the version you have installed can use the AVX and AVX2 operations and is set to do so by default in certain situations (say inside a forward or back-prop matrix multiply), which can speed things up. This is not an error, it is just telling you that it can and will take advantage of your CPU to get that extra speed out.
Note: AVX stands for Advanced Vector Extensions.
翻译如下
Tensorflow的一个重要部分是,它应该是快速的。通过合适的安装,它可以在CPU、GPU或TPU上工作。快速的一部分意味着,它根据你的硬件使用不同的代码。一些CPU支持其他CPU不支持的操作,如矢量加法(一次添加多个变量)。Tensorflow只是告诉你,你所安装的版本可以使用AVX和AVX2操作,并且在某些情况下默认设置为这样做(比如在正向或反向矩阵乘法里面),这可以加快事情的进展。这不是一个错误,它只是告诉你,它可以而且会利用你的CPU来获得额外的速度。
注意:AVX代表高级向量扩展。