title: AttributeError: module 'tensorflow.compat' has no attribute 'v1'
body: <p>i am building an Rasa chatbot but there is an error in tensorflow
  AttributeError: module 'tensorflow.compat' has no attribute 'v1'</p>
  
  <p>i am trying changing tensorflow versions but not found a correct version
  Note : my tensorflow version is 1.9
  please help me thanks in advance.</p>
  
  <pre><code>from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  
  from rasa_core import utils
  from rasa_core.agent import Agent
  from rasa_core.policies.keras_policy import KerasPolicy
  from rasa_core.policies.memoization import MemoizationPolicy
  from rasa_core.policies.sklearn_policy import SklearnPolicy
  
  if __name__ == '__main__':
      utils.configure_colored_logging(loglevel='DEBUG')
      training_data_file = '/home/zain/Ai chatbots/horoscope_bot/data/stories.md'
      model_path = './models/dialogue'
  
      agent = Agent('/home/zain/Ai chatbots/horoscope_bot/horoscope_domain.yml',
       policies=[MemoizationPolicy(max_history = 5), KerasPolicy()])
      training_data = agent.load_data(training_data_file)
  
      agent.train(
          training_data,
          augmentation_factor = 50,
          epochs = 500,
          batch_size = 10,
          # max_history = 5,
          validation_split = 0.2
      )
  
      agent.persist(model_path) ```
  
  here is the error
  
  
  ```zain@zain-HP-ProBook-6460b:~$ /usr/bin/python3 /home/zain/Ai-chatbots/horoscope_bot/train_initialize.py
  /home/zain/.local/lib/python3.6/site-packages/rasa_core/__init__.py:12: UserWarning: The 'rasa_core' package has been renamed. You should change your imports to use 'rasa.core' instead.
    UserWarning,
  /home/zain/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
    _np_qint8 = np.dtype([("qint8", np.int8, 1)])
  /home/zain/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
    _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
  /home/zain/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
    _np_qint16 = np.dtype([("qint16", np.int16, 1)])
  /home/zain/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
    _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
  /home/zain/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
    _np_qint32 = np.dtype([("qint32", np.int32, 1)])
  /home/zain/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
    np_resource = np.dtype([("resource", np.ubyte, 1)])
  Traceback (most recent call last):
    File "/home/zain/Ai-chatbots/horoscope_bot/train_initialize.py", line 8, in &lt;module&gt;
      from rasa_core.policies.keras_policy import KerasPolicy
    File "/home/zain/.local/lib/python3.6/site-packages/rasa/core/policies/keras_policy.py", line 35, in &lt;module&gt;
      class KerasPolicy(Policy):
    File "/home/zain/.local/lib/python3.6/site-packages/rasa/core/policies/keras_policy.py", line 62, in KerasPolicy
      max_history: Optional[int] = None,
  AttributeError: module 'tensorflow.compat' has no attribute 'v1'```
  </code></pre>