title: Cannot import name 'network' from 'tensorflow.python.keras.engine'
body: <p>When trying to load BERT QA I get the following ImportError:
  &quot;Cannot import name 'network' from 'tensorflow.python.keras.engine'&quot;
  The full error log follows below</p>
  <p>Following this post,
  <a href="https://stackoverflow.com/questions/63152966/importerror-cannot-import-name-network-from-tensorflow-python-keras-engine">ImportError: cannot import name &#39;network&#39; from &#39;tensorflow.python.keras.engine&#39;</a></p>
  <p>I have tried the following steps,</p>
  <pre><code>pip uninstall tf-agents
  pip install tf-agents-nightly
  </code></pre>
  <p>and then in Python,</p>
  <pre><code>from tf_agents.environments import suite_gym
  </code></pre>
  <p>However, this did not resolve the problem. Any suggestions would be very welcome!</p>
  <p>In case it is helpful, I'm running TensorFlow version 2.3.0. Also, the script <strong>init</strong>.py referred to below does exist, however the file is empty, i.e. 0 bytes.</p>
  <pre><code>ImportError                               Traceback (most recent call last)
  &lt;ipython-input-2-323bac0cb5ba&gt; in &lt;module&gt;
  ----&gt; 1 from bert_qa import squad
  
  ~/anaconda3/lib/python3.8/site-packages/bert_qa/squad.py in &lt;module&gt;
       34 from . import model_training_utils
       35 from . import bert_modeling as modeling
  ---&gt; 36 from . import bert_models
       37 from . import optimization
       38 from . import input_pipeline
  
  ~/anaconda3/lib/python3.8/site-packages/bert_qa/bert_models.py in &lt;module&gt;
       25 from . import bert_modeling
       26 from . import weighted_sparse_categorical_crossentropy
  ---&gt; 27 from . transformer_encoder import TransformerEncoder
       28 from . albert_transformer_encoder import AlbertTransformerEncoder
       29 from . import bert_classifier
  
  ~/anaconda3/lib/python3.8/site-packages/bert_qa/transformer_encoder.py in &lt;module&gt;
       22 import tensorflow as tf
       23 
  ---&gt; 24 from tensorflow.python.keras.engine import network  # pylint: disable=g-direct-tensorflow-import
       25 
       26 from . import activations
  
  ImportError: cannot import name 'network' from 'tensorflow.python.keras.engine' (/home/user810643/anaconda3/lib/python3.8/site-packages/tensorflow/python/keras/engine/__init__.py)
  </code></pre>