code: def generate_np(self, x_val, **kwargs):
      
      tfe = tf.contrib.eager
      x = tfe.Variable(x_val)
      adv_x = self.generate(x, **kwargs)
      return adv_x.numpy()
docs: Generate adversarial examples and return them as a NumPy array.
  
      :param x_val: A NumPy array with the original inputs.
      :param **kwargs: optional parameters used by child classes.
      :return: A NumPy array holding the adversarial examples.