>import tensorflow
>import tensorflow.contrib
>tensorflow.contrib
module \'tensorflow.contrib\' from \'D:\\\\ProgramData\\\\Anaconda3\\\\lib\\\\site-pack
tensorflow.__init__()
explicitly deletes its reference to the tensorflow.python
module after importing everything from it.
The reason for that is to provide access to the submodules contained in the python
package in the top-level tensorflow
namespace. A few things from the tensorflow.core
package are also imported and made available in the tensorflow
namespace.
I think that the idea is not to import tensorflow.python
directly. Those classes, objects, and submodules of python
that are intended to be used by applications are made available simply by import tensorflow
.
Worked for me by using the following import line:
from tensorflow.python import keras
Cheers!