class_docstr: Resnet implementation from `Realistic Evaluation of Deep SSL Algorithms`.
  
  Attributes:
    num_classes: Integer representing the number of classes.
    lrelu_leakiness: A float representing the weight of the Leaky Relu
      parameter.
    horizontal_flip: A boolean specifying whether we do random horizontal flips
      of the training data, for data augmentation.
    random_translation: A boolean specifying whether we do random translations
      of the training data, for data augmentation.
    gaussian_noise: Boolean specifying whether to add Gaussian noise to the
      inputs.
    width: Integer representing the size of the convolutional filter.
    num_residual_units: Integer representing the number of residual units.
    name: String representing the model name.
    aggregation: String representing an aggregation operation that could be
      applied to the inputs. See superclass attributes for details.
    hidden_aggregation: A tuple or list of integers representing the number of
      units in each layer of aggregation multilayer percepron. After the inputs
      are passed through the encoding layers, before aggregation they are passed
      through a fully connected network with these numbers of hidden units in
      each layer.
    activation: An activation function to be applied to the outputs of each
      fully connected layer in the aggregation network.
    is_binary_classification: Boolean specifying if this is model for binary
      classification. If so, it uses a different loss function and returns
      predictions with a single dimension, batch size.
docstr: Creates the model prediction op.
  
  For this model, the hidden representation is the last layer of the MLP,
  before the logit computation. The predictions are unnormalized logits.
  
  Args:
    encoding: A tensor containing the model inputs. The first dimension is the
      batch size.
    is_train: A placeholder representing a boolean value that specifies if
      this model will be used for training or for test.
    **kwargs: Other keyword arguments.
  
  Returns:
    logits: A tensor of logits. For multiclass classification its
      shape is (num_samples, num_classes), where the second dimension contains
      a logit per class. For binary classification, its shape is
      (num_samples,), where each element is the probability of class 1 for
      that sample.
    all_vars: A dictionary mapping from variable name to TensorFlow op
      containing all variables used in this model.
    reg_params: A dictionary mapping from a variable name to a Tensor of
      parameters which will be used for regularization.
code: def get_predictions_and_params(self, encoding, is_train, **kwargs):
      """Creates the model prediction op.
  
      For this model, the hidden representation is the last layer of the MLP,
      before the logit computation. The predictions are unnormalized logits.
  
      Args:
        encoding: A tensor containing the model inputs. The first dimension is the
          batch size.
        is_train: A placeholder representing a boolean value that specifies if
          this model will be used for training or for test.
        **kwargs: Other keyword arguments.
  
      Returns:
        logits: A tensor of logits. For multiclass classification its
          shape is (num_samples, num_classes), where the second dimension contains
          a logit per class. For binary classification, its shape is
          (num_samples,), where each element is the probability of class 1 for
          that sample.
        all_vars: A dictionary mapping from variable name to TensorFlow op
          containing all variables used in this model.
        reg_params: A dictionary mapping from a variable name to a Tensor of
          parameters which will be used for regularization.
      """
      # Logits layer.
      with tf.variable_scope(self.name + "/prediction"):
          w_init = tf.glorot_normal_initializer()
          logits = tf.layers.dense(
              encoding, self.num_classes, kernel_initializer=w_init
          )
          if self.is_binary_classification:
              logits = logits[:, 0]
  
          # Store model variables for easy access.
          variables = tf.get_collection(
              tf.GraphKeys.GLOBAL_VARIABLES,
              scope=tf.get_default_graph().get_name_scope(),
          )
          all_vars = {var.name: var for var in variables}
  
      # No regularization parameters.
      reg_params = {}
  
      return logits, all_vars, reg_params
  
file_path: neural-structured-learning/research/gam/gam/models/wide_resnet.py
imports: from .models_base import Model
  import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling the WideResnet obj's underlying member method code with example usage: obj.get_predictions_and_params(encoding, is_train) and returns: logits,  all_vars,  reg_params