본문 바로가기
개발노트/error solutions

[Python tensorflow 설치오류] I tensorflow/core/platform/cpu_feature_guard.cc:151

by lovvepearl 2022. 1. 10.

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: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
 

해결방법

import os 하단에 아래 코드 추가
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'​
 
코드설명
로그레벨이 3이 되면 더이상 경고메세지가 뜨지 않는다.
TF_CPP_MIN_LOG_LEVEL 의 디폴트 설정값이 2 라서 경고메시지가 출력되는 것이다.
 
이 에러는 tensorflow 프로그램을 실행시키는데는 문제가 없으나, 경고메세지를 없애준다.