import tensorflow as tf
tf.__version__
!sudo pip3 install keras
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Conv2D, Flatten, Dropout, MaxPooling2D
from tensorflow.keras.preprocessing.image import ImageDataGenerator
错误消息:
Import "tensorflow.keras.models" could not be resolved(reportMissingImports)
>Import "tensorflow.keras.layers" could not be resolved(reportMissingImports)
>>Import "tensorflow.keras.preprocessing.image" could not be resolved(reportMissingImports)
发布于 2022-09-17 14:00:49
这对我有用。
from tensorflow import keras
from keras.layers import Dense
from keras.models import Sequential, load_model
https://stackoverflow.com/questions/71316443
复制相似问题