Add import keras.api as keras at the end of tensorflow/init.py. keras.api is the correct module used by tensorflow. By adding this line, keras is explicitly imported rather than lazy-loaded
import keras.api as keras