class_docstr: Cifar10 dataset with CNN network model.
docstr: Build the core model within the graph.
docstr_tok: ["Build","the","core","model","within","the","graph","."]
code: def forward_pass(self, x, input_data_format="channels_last"):
      """Build the core model within the graph."""
  
      if self._data_format != input_data_format:
          if input_data_format == "channels_last":
              # Computation requires channels_first.
              x = tf.transpose(
                  x, [0, 3, 1, 2]
              )  # Change position of 3 only
          else:
              # Computation requires channels_last.
              x = tf.transpose(
                  x, [0, 2, 3, 1]
              )  # Change position of 1 only
  
      # Image standardization.
      x = x / 128 - 1
      nn = self.nnObj
  
      # Printing next architecture before translating into tensorflow
      print("=================================================")
      print("List of layers and num-units in next architecture:")
      for lidx in range(1, nn.num_internal_layers + 1):
          layerToPrint = nn.layer_labels[lidx]
          unitsToPrint = nn.num_units_in_each_layer[lidx]
          print(
              "layer-label = %s,  num-units = %s"
              % (layerToPrint, unitsToPrint)
          )
      print("=================================================")
  
      # Loop over layers and define conv net
      layers = [x]  # Add first layer to layers-list
      for lidx in range(1, nn.num_internal_layers + 1):
          # Find and concatenate parent layers
          plist = get_layer_parents(nn.conn_mat.viewkeys(), lidx)
          parent_layers = [layers[i] for i in plist]
          if self._data_format == "channels_last":
              input_layer = tf.concat(parent_layers, 3)
              num_incoming_filters = input_layer.get_shape().as_list()[
                  -1
              ]
          else:
              input_layer = tf.concat(parent_layers, 1)
              num_incoming_filters = input_layer.get_shape().as_list()[
                  1
              ]
          # Add layer to layers-list
          nextLayer = self._get_layers(nn, lidx, num_incoming_filters)
          layers.append(nextLayer(input_layer))
  
      # Define output layer
      plist = get_layer_parents(
          nn.conn_mat.viewkeys(), lidx + 1
      )  # indices for parents of output layer
      parent_layers = [
          layers[i] for i in plist
      ]  # parent layers of output layer
      return parent_layers
  
file_path: dragonfly/examples/nas/cg/cifar/cifar10_model.py
imports: from __future__ import division
  from __future__ import print_function
  import tensorflow
  from cifar10_model_base import ConvNet
label_desc: Use image node_id 3 for calling the ConvNetCifar10 obj's underlying member method code with example usage: obj.forward_pass(x, input_data_format) and returns: parent_layers