I reinstalled tensorflow on a different machine. Previously, I used to import classes as:
from tensorflow.keras.losses import Loss
Now I do not see the module keras under tensorflow but I can use:
from tensorflow import keras
Is the latter the same as importing keras (many posts address that difference) or is from tensorflow import keras the same as tf.keras? Or maybe my installation failed somehow. I installed it via:
pip install tensorflow
According to https://www.tensorflow.org/install it should work.