import tensorflow as tf

            model_target_y = models(hps, images, FLAGS.RCE_train, logits=False)
            target_y64 = tf.argmin(model_target_y,axis=1)
        else:
            target_y64=target_labels
        target_y = tf.cast(target_y64, tf.int32)
        adversarial_sample = attacks.jsma.jsma(models, images, hps, RCE_train, target_y,epochs=epoch_jsma, eps=eps,
                                               clip_min=-0.5, clip_max=0.5, pair=False, min_proba=0.0)

    elif method=='smda':
        print('Attacking method is smda')
        if target_labels==None:
            print('Target label is the argmin label')
            model_target_y = models(hps, images, FLAGS.RCE_train, logits=False)
            target_y64 = tf.argmin(model_target_y,axis=1)
        else:
            target_y64=target_labels
        target_y = tf.cast(target_y64, tf.int32)
        adversarial_sample = attacks.smda.smda(models, images, hps, RCE_train, target_y, epochs=epoch_jsma, eps=eps,
                                               clip_min=-0.5, clip_max=0.5, min_proba=0.0)

    else:
        print('Not recognized method')
        adversarial_sample = None
    return adversarial_sample

def tSNE_visual(hps,num_batch):
