Computer Science/보안 & 인공지능

텐서플로 오류 해결 - Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated.

컴슈터 2019. 12. 8. 15:10

문제 발생

아나콘다에서 텐서플로를 설치한 후, 제대로 설치되었는지 확인하기 위해 아래의 단계를 실행하였다.

pip install tensorflow # 텐서플로 설치

ipython

import tensorflow # 텐서플로 설치 확인

그랬더니 아래와 같은 FutureWarning이 발생했다.

FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters

해결 방법

FutureWarning이므로 현재로서는 문제가 되지 않지만, StackoverFlow에서 해당 이슈에 대한 해결책이 나와있어서 참조하였다. 이 문제는 numpy, h5py에 대한 문제가 발생하는 것 같다. 아래 명령어를 입력하여 h5py를 업그레이드한다.

pip install --upgrade h5py

이제 ipython 을 실행하면 FutureWarning이 사라진 것을 확인할 수 있다.