[Python] Google Colab error: Import "tensorflow.keras.models" could not be...

Discussão em 'Python' iniciado por Stack, Novembro 20, 2024.

  1. Stack

    Stack Membro Participativo

    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)

    Continue reading...

Compartilhe esta Página