Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 액션
- 넷플릭스
- 서귀포
- 커피
- 네이버
- 제주도
- 산책
- 이범선
- 빅데이터 분석기사 필기
- 만화 영화
- 아주 작은 습관의 힘
- pandas
- QGIS
- 빅데이터 분석기사
- 습관
- 완결
- python
- 사랑
- 가족
- 영화
- 이기적 출판사
- geopandas
- 애니메이션
- 웹툰
- 네이버 완결 웹툰
- 진심
- 완결 웹툰
- 제임스 클리어
- 로맨스
- 네이버 웹툰
Archives
- Today
- Total
JuJuKwakKwak
keras 버전 / 설치 관련 에러 본문
[1] 첫 번째 문제
import keras
위의 코드를 쳤더니 다음의 메시지가 뜬다.
module 'keras.engine.base_layer' has no attribute 'BaseRandomLayer'
그래서 아나콘다 프롬프트를 켜서
1) pip uninstall keras 쳤다.
2) 마우스로 직접 keras 폴더 삭제 (폴더 경로 : C 드라이브 -> 사용자 -> anaconda3 -> site-packages
3) pip install keras 쳤다.
다시 동일한 코드를 쳤더니 다음의 메시지가 뜬다.
module 'tensorflow.compat.v2.__internal__' has no attribute 'register_clear_session_function'
import tensorflow.keras
그냥 keras가 아니라 tensorflow.keras로 변경해보았다.
무사히 작동되었다.
[2] 두 번째 문제
from keras.utils import np_utils
위의 코드를 쳤더니 다음의 메시지가 뜬다.
cannot import name 'np_utils' from 'tensorflow.keras.utils'
그래서 아나콘다 프롬프트를 열어서
pip install np_utils 쳤다.
import np_utils
위의 코드를 쳤더니 무사히 작동되었다.
[3] 세 번째 문제
Y_train = np_utils.to_categorical(Y_train)
위의 코드를 쳤더니 다음의 메시지가 뜬다.
module 'np_utils' has no attribute 'to_categorical'
from tensorflow.keras.utils import to_categorical
Y_train = to_categorical(Y_train)
위의 코드로 쳤더니 무사히 작동되었다.
'Data Science > error 모음' 카테고리의 다른 글
주피터노트북에 y입력 (error는 아니지만) (0) | 2022.03.07 |
---|---|
ParserError: Error tokenizing data. C error: Buffer overflow caught - possible malformed input file. (0) | 2022.03.02 |
구글 f12 우클릭 작동 안 될 때 (0) | 2022.02.20 |
주피터노트북에서 티스토리로 (0) | 2022.02.15 |
error : Consider using the `--user` option or check the permissions. (0) | 2022.02.07 |