Hi,
I have seen these two different ways of importing Sequential model , what is the difference between these two approaches, are they same.
from tensorflow.keras import Sequential
from tensorflow.keras.models import Sequential
thanks,
Hi,
I have seen these two different ways of importing Sequential model , what is the difference between these two approaches, are they same.
from tensorflow.keras import Sequential
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
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.