title: Error when using regularizers.l1_l2 in 'TimeDistributed(Dense())' layer in Keras
body: <p>This code runs well,</p>
  <pre><code>model = Sequential()
  model.add(Bidirectional(
      LSTM(self.n_neurons, return_sequences=True, use_bias=False, unit_forget_bias=False,
           kernel_initializer=tf.keras.initializers.RandomNormal(mean=0., stddev=0.01),
           recurrent_initializer=tf.keras.initializers.RandomNormal(mean=0., stddev=0.01), ),
      input_shape=(self.time_steps, self.input_features),
  ))
  model.add(Dropout(rate=self.dropout_rate))
  model.add(TimeDistributed(
      Dense(self.output_features, activation='linear', use_bias=False,
            kernel_initializer=tf.keras.initializers.RandomNormal(mean=0., stddev=0.01), )
  ))
  </code></pre>
  <p>where <code>self.n_neurons=64</code>,<code>self.input_features=1</code>,<code>self.output_features=1</code>,<code>self.time_steps=1000</code>.
  The shape of input data is (1, 1000, 1), and the shape of output data is also (1, 1000, 1).</p>
  <p>While adding 'regularizers.l1_l2',</p>
  <pre><code>model = Sequential()
  model.add(Bidirectional(
      LSTM(self.n_neurons, return_sequences=True, use_bias=False, unit_forget_bias=False,
           kernel_initializer=tf.keras.initializers.RandomNormal(mean=0., stddev=0.01),
           recurrent_initializer=tf.keras.initializers.RandomNormal(mean=0., stddev=0.01), ),
      input_shape=(self.time_steps, self.input_features),
  ))
  model.add(Dropout(rate=self.dropout_rate))
  model.add(TimeDistributed(
      Dense(self.output_features, activation='linear', use_bias=False,
            kernel_initializer=tf.keras.initializers.RandomNormal(mean=0., stddev=0.01),
            kernel_regularizer=tf.keras.regularizers.l1_l2(l1=1e-5, l2=1e-4), )
  ))
  </code></pre>
  <p>an error will occur,</p>
  <pre><code>ValueError: Shapes must be equal rank, but are 3 and 0
      From merging shape 0 with other shapes. for '{{node AddN_1}} = AddN[N=2, T=DT_FLOAT](mul_1, AddN)' with input shapes: [1,1000,1], [].
  </code></pre>
  <p>I have no idea what happened, can anyone help me? please!</p>