class_docstr: Mixup ( https://arxiv.org/abs/1710.09412 )
  :param model: Model instance, the model on which to apply the loss.
  :param beta: float, beta distribution parameter for MixUp.
class_docstr_tok: ["Mixup","(","https",":","\/\/arxiv.org\/abs\/1710.09412",")",":","param","model",":","Model","instance",",","the","model","on","which","to","apply","the","loss",".",":","param","beta",":","float",",","beta","distribution","parameter","for","MixUp","."]
code: def fprop(self, x, y, **kwargs):
      with tf.device("/CPU:0"):
          # Prevent error complaining GPU kernels unavailable for this.
          mix = tf_distributions.Beta(self.beta, self.beta)
          mix = mix.sample([tf.shape(x)[0]] + [1] * (len(x.shape) - 1))
      mix = tf.maximum(mix, 1 - mix)
      mix_label = tf.reshape(mix, [-1, 1])
      xm = x + mix * (x[::-1] - x)
      ym = y + mix_label * (y[::-1] - y)
      logits = self.model.get_logits(xm, **kwargs)
      loss = tf.reduce_mean(
          softmax_cross_entropy_with_logits(labels=ym, logits=logits)
      )
      return loss
  
imports: import copy
  import json
  import os
  import warnings
  import numpy
  import tensorflow
  from cleverhans.attacks import Attack
  from cleverhans.compat import softmax_cross_entropy_with_logits
  from cleverhans.model import Model
  from cleverhans.utils import safe_zip
label_desc: Use image node_id 2 for calling the MixUp obj's underlying member method code with example usage: obj.fprop(x, y) and returns: loss