def is_show_uncategorized(self, request):
        """Return the result of the "?show_uncategorized" query string param"""

        show_uncategorized = request.GET.get('show_uncategorized', False)
        if show_uncategorized is True or show_uncategorized == 'true':
            return True
        return False
def _compute_reg_grads(gen_grads, disc_vars):
  """Compute gradients norm (this is an upper-bpund of the full-batch norm)."""
  gen_norm = tf.accumulate_n([tf.reduce_sum(u * u) for u in gen_grads])
  disc_reg_grads = tf.gradients(gen_norm, disc_vars)
  return disc_reg_grads