TF format of model and layer: with or without "tf.keras."

A very basic question about the TF format of Sequential model.
In the " Ungraded Lab: The Hello World of Deep Learning with Neural Networks", to specify Sequential model and Dense layer, it starts with the prefix of “tf.keras.”:

model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])])

Nevertheless, on the web, I encountered some cases that skip the prefix.
I just wonder when we have to accompany prefix and we can skip it.

Hope that this is not a stupid question.
Thanks
Michio

Please read this link on python modules.

Thanks @balaji.ambresh
I read the link. It’s about how to use module.
Nevertheless, I did not understand the relevance of this link with my question.
Sorry that I must be missing something.
But if you could explain more about your intention?
Thanks
Regards,
Michio

No worries. What I meant was there is more than one way to access members of a module.
For instance, here are 2 ways to access the Sequential class:

>>> from tensorflow.keras import Sequential
>>> Sequential
<class 'keras.engine.sequential.Sequential'>

and

>>> import tensorflow as tf
>>> tf.keras.Sequential
<class 'keras.engine.sequential.Sequential'>
1 Like

Thanks @balaji.ambresh
Now, I think that I got your intention.
Thanks a lot.
Regards,
Michio