Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

3.7K
Visualizações
Google Colab error: Import "tensorflow.keras.models" could not be resolved(reportMissingImports)
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

Error message:

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)
over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Issue solved.

Though the error: Import "tensorflow.keras.models" could not be resolved(reportMissingImports) prompts, it doesn't affect the entire code. My Tensorflow version is 2.8.0. I just found out that the problem is on the config of my cnn model.

over 4 years ago · Santiago Trujillo Relatório

0

import tensorflow as tf
tf.__version__

!sudo pip3 install keras

from tensorflow.python.keras.engine.sequential import Sequential

from tensorflow.python.keras.layers import Dense, Conv2D, Flatten, Dropout, MaxPooling2D

image_data_generator = tf.keras.preprocessing.image.ImageDataGenerator()
over 4 years ago · Santiago Trujillo Relatório

0

i had the same error , l did those steps step 01 : uninstall the existing tensorflow with this instruction

!pip uninstall tensorflow

step 02 : install this version i hope you find what you need in this version with this instruction

!pip install tensorflow==2.7.0

you can change the version of tensorflow if 2.7.0 not good for your code

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda