安装好tensorflow,在pycharm中验证安装时运行报错

2022-03-28 09:10:53.917887: 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.
2022-03-28 09:10:54.320143: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1510] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 3495 MB memory: -> device: 0, name: NVIDIA GeForce RTX 3060 Laptop GPU, pci bus id: 0000:01:00.0, compute capability: 8.6

警告而已,只要时间戳冒号后面的不是E就不影响使用.如果觉得碍眼,试试看下调整警告等级

import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'