티스토리 뷰
Error Diary
#6 [Python] Import "tensorflow.keras.preprocessing.text" could not be resolved
이도형 2023. 8. 19. 17:25문제상황&에러메시지


keras와 tensorflow가 설치되어있는데, 임포트가 제대로 인식되지 않았을때ㅠㅠ

해결책
앞의 tensorflow 키워드를 빼주거나, tensorflow뒤에 바로 keras를 붙이는게 아닌 아래처럼 python 삽입

from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_sequences
from tensorflow.python.keras.models import Sequential
from tensorflow.python.keras.layers import Embedding, LSTM, Dense
반응형
'Error Diary' 카테고리의 다른 글
#8 [Flutter&Xcode]tflite_flutter-0.9.1/ios/TensorFlowLiteC.framework/TensorFlowLiteC' for architecture arm64 (0) | 2023.09.03 |
---|---|
#7 [Flutter] Framework not found TensorFlowLiteC (0) | 2023.09.02 |
#5 [Flutter] "dependOnInheritedWidgetOfExactType<UncontrolledProviderScope>()..." (0) | 2023.08.14 |
#4. no material widget found (0) | 2023.08.06 |
#3 [Mac] "손상되었기 때문에 열 수 없습니다." (0) | 2023.08.03 |