Different ways of importing Sequential model

Hi,
I have seen these two different ways of importing Sequential model , what is the difference between these two approaches, are they same.

  1. from tensorflow.keras import Sequential
  2. from tensorflow.keras.models import Sequential

thanks,

I don’t think there is any difference between the two import statements as far as I can tell from the documentation. Both help you to import the Sequential model only

1 Like

Ok , but
it is confusing whether the Sequential has direct parent module keras or the models.
1 ) keras → Sequential
2 ) keras → models → Sequential

I guess there is a class of Sequential in the keras module, which the models module has inherited from it’s parent module.

1 Like