title: AttributeError: module 'tensorflow.keras' has no attribute 'model' when executing Tensorflow
body: <p>Im currently using Tensorflow 2.3.1 on Ubuntu 16.04 with Python 3.5.</p>
  <p>Im trying right now to code a neural network for the first time and i ran into one issue.</p>
  <p>Here is my code rn:</p>
  <pre><code>import tensorflow as tf
  import tensorflow.keras as keras
  from tensorflow.keras.optimizers import Adam
  import numpy as np
  
  
  class D3QN(tf.keras.model):
       def __init__(self,n_actions, input_shape):
            super(DuelingDeepQNetwork, self).__init__()
            self.conv1 = tf.keras.layers.Conv2D(32, 5, strides=(5, 5),padding=&quot;valid&quot;, input_shape=input_shape, activation=&quot;relu&quot;, data_format=&quot;channels_first&quot;)
            self.conv2 = tf.keras.layers.Conv2D(64, 3, strides=(2, 2),padding=&quot;valid&quot;, activation=&quot;relu&quot;, data_format=&quot;channels_first&quot;)
            self.conv3 = tf.keras.layers.Conv2D(64, 2, strides=(2, 2),padding=&quot;valid&quot;, activation=&quot;relu&quot;, data_format=&quot;channels_first&quot;)
            self.dense1 = tf.keras.layers.Dense(512, activation='relu')
            self.V = tf.keras.layers.Dense(1, activation='None')
            self.A = tf.keras.layers.Dense(n_actions, activation='None')
       def call(self,state):
            x = self.conv1(state)
            x = self.conv2(x)
            x = self.conv3(x)
            x = Flatten()(x)
            x = self.dense1(x)
            V = self.V(x)
            A = self.A(x)
  
            Q = (V + (A - tf.math.reduce_mean(A, axis=1, keepdims=True)))
  </code></pre>
  <p>So and when executing this i got following error message:
  AttributeError: module 'tensorflow.keras' has no attribute 'model'</p>
  <p>So i tried to google first and to fix it and people on github and here on stackoverflow said that it can be resolved by simply importing this:
  import tensorflow.keras.Model
  I tried that and it resulted in this error message:
  ImportError: No module named 'tensorflow.keras.Model'</p>
  <p>What do i have to do to get my code running? It isnt even finished yet and i run into a weird problem like this.
  I would really appreciate any help to resolve this issue</p>
  <p>Regards</p>