Model is not defined

please help me out

{moderator edit: removed code}

Whether you can use Model directly depends on namespaces and how you imported the Keras libraries into your program. You might find some hints here:

Hi @Mohmmad_Azmat , Sharing code on discussion form is not allowed, so you should delete the code.
Like ai_curious has mentioned either

  1. you should import Model using :
    from tensorflow.keras import Model
    Or use
  2. tf.keras.Model(…) in place of Model(…)

@ritik5 @ai_curious thanks
tf.keras.Model worked for me

1 Like