[에러해결] ImportError: cannot import name 'get_file' from 'keras.utils'

Colacan·2022년 5월 15일
1

[에러해결]

목록 보기
1/3
ImportError: cannot import name 'get_file' from 'keras.utils' (/usr/local/lib/python3.7/dist-packages/keras/utils/__init__.py)

TensorFlow1 과 TensorFlow2에서 migration이 일어남으로써 생기는 문제다.
본인의 경우 TensorFlow 1인데 2의 코드를 사용했기에 발생했다.

  • TensorFlow 1의 경우
from tensorflow.keras.utils import get_file
  • TensorFlow 2의 경우
from keras.utils import get_file
profile
For DE, DA / There is no royal road to learning

0개의 댓글