class_docstr: A wrapper that turns a callable into a valid Model
class_docstr_tok: ["A","wrapper","that","turns","a","callable","into","a","valid","Model"]
code: def fprop(self, x, **kwargs):
      output = self.callable_fn(x, **kwargs)
  
      # Do some sanity checking to reduce the chance that probs are used
      # as logits accidentally or vice versa
      if self.output_layer == "probs":
          assert output.op.type == "Softmax"
          min_prob = tf.reduce_min(output)
          max_prob = tf.reduce_max(output)
          asserts = [
              utils_tf.assert_greater_equal(
                  min_prob, tf.cast(0.0, min_prob.dtype)
              ),
              utils_tf.assert_less_equal(
                  max_prob, tf.cast(1.0, max_prob.dtype)
              ),
          ]
          with tf.control_dependencies(asserts):
              output = tf.identity(output)
      elif self.output_layer == "logits":
          assert output.op.type != "Softmax"
  
      return {self.output_layer: output}
  
imports: from abc import ABCMeta
  import warnings
  import tensorflow
  from cleverhans import utils_tf
label_desc: Use image node_id 2 for calling the CallableModelWrapper obj's underlying member method code with example usage: obj.fprop(x) and returns: dict