code: def model_argmax(model, samples):
      """
      Helper function that computes the current class prediction
      :param samples: numpy array with input samples (dims must match x)
      :return: the argmax output of predictions, i.e. the current predicted class
      """
      tfe = tf.contrib.eager
      tf_samples = tfe.Variable(samples)
      probabilities = model.get_probs(tf_samples)
  
      if samples.shape[0] == 1:
          return tf.argmax(probabilities)
      else:
          return tf.argmax(probabilities, axis=1)
  
file_path: cleverhans/cleverhans_v3.1.0/cleverhans/utils_tfe.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import math
  import os
  import time
  import numpy
  import tensorflow
  from six.moves import xrange
  from cleverhans.loss import LossCrossEntropy
  from cleverhans.model import Model
  from .utils import batch_indices, _ArgsWrapper, create_logger
label_desc: Use image node_id 3 for calling a global function with example usage: model_argmax(model, samples) and returns: tf, tf