Last answered:

15 Feb 2024

Posted on:

14 Dec 2023

0

Resolved: AttributeError in tensor flow

I am getting error like module 'tensorflow' has no attribute 'keras'

please help to resolve this issues

4 answers ( 1 marked as helpful)
Instructor
Posted on:

15 Dec 2023

1

Hi,

The error message you're encountering, "module 'tensorflow' has no attribute 'keras'", typically arises when TensorFlow is not properly installed or if there's an issue with the specific version of TensorFlow you're using.


Here are several steps you can take to resolve this issue:

1) Check your TensorFlow installation

2) Correct Import Statement:

import tensorflow as tf
from tensorflow import keras

3) Update TensorFlow

pip install --upgrade tensorflow


Let me know if this helps. Thanks!
 

Posted on:

21 Dec 2023

0

Thank you sir


Posted on:

12 Jan 2024

0

I installed everything.  I even went ahead and activated the environment and did the update tensorflow step but I am still getting this error and cannot move on.  It's really diminishing my momentum.

Posted on:

15 Feb 2024

0

a

Submit an answer