import tensorflow as tf

      perturb_norm_length: a `float`, Norm length of adversarial perturbation
          to be optimized with validatio

  Returns:
      adversial loss
  """
  grad, = tf.gradients(
      loss, embedded, aggregation_method=tf.AggregationMethod.EXPERIMENTAL_ACCUMULATE_N)
  grad = tf.stop_gradient(grad)
  perturb = _scale_l2(grad, perturb_norm_length)
  return loss_fn(embedded + perturb)

