message: Fix the memory leak described in Issue
diff: @@ -53,7 +53,6 @@ class Wrapper(Layer):
  # Tracks mapping of Wrapper inputs to inner layer inputs. Useful when
  # the inner layer has update ops that depend on its inputs (as opposed
  # to the inputs to the Wrapper layer).
  - self._input_map = {}
  super(Wrapper, self).__init__(**kwargs)
  def build(self, input_shape=None):
  @@ -243,11 +242,8 @@ class TimeDistributed(Wrapper):
  if not input_length:
  input_length = array_ops.shape(inputs)[1]
  inner_input_shape = self._get_shape_tuple((-1,), inputs, 2)
  - # Shape: (num_samples * timesteps, ...). And track the
  - # transformation in self._input_map.
  - input_uid = generic_utils.object_list_uid(inputs)
  + # Shape: (num_samples * timesteps, ...).
  inputs = array_ops.reshape(inputs, inner_input_shape)
  - self._input_map[input_uid] = inputs
  # (num_samples * timesteps, ...)
  if generic_utils.has_arg(self.layer.call, 'mask') and mask is not None:
  inner_mask_shape = self._get_shape_tuple((-1,), mask, 2)
  @@ -306,9 +302,7 @@ class TimeDistributed(Wrapper):
  if inner_mask is not None:
  inner_mask_shape = self._get_shape_tuple((-1,), mask, 2)
  inner_mask = K.reshape(inner_mask, inner_mask_shape)
  - input_uid = generic_utils.object_list_uid(inputs)
  - inner_inputs = self._input_map.get(input_uid, inputs)
  - output_mask = self.layer.compute_mask(inner_inputs, inner_mask)
  + output_mask = self.layer.compute_mask(inputs, inner_mask)
  if output_mask is None:
  if mask is None:
  return None
  