Assignment Housing prices 'Keras' not defined

Hi, I have implemented the house_model function as shown : NameError: ‘keras’ not defined, I am pretty sure it’s imported , I run all the cells, I don’t have any problem for any cell of code and I got a correct prediction (4,), how can I fix the problem. I tried many times, I cleared the data I resubmitted many time, I rerun the cells too

I just ran the lab with the following code and got full score:

def house_model():
    ### START CODE HERE
    import keras
    # rest of code

Please check your code and if you don’t find anything wrong with it, click my name and message your notebook as an attachment.

2 Likes

hey,

[snippet removed by mentor]

[summary by mentor]
use tf.keras instead of keras when not importing keras directly

Thank you, I have already try an other solution and it worked, I added Import keras into the function