class_docstr: Attributes:
  layer_list - a list of layer names in the Keras model
  connection_map - a map where the key is a layer, the value is a list of its successors
  reverse_connection_map - a map where the key is a layer, the value is a list of its predecessors
  keras_layer_map - a map where the key is a layer name, the value is Keras layer
  model - a reference of the keras model.
  blob_names - blob names for each one of the edge.
class_docstr_tok: ["Attributes",":","layer_list","-","a","list","of","layer","names","in","the","Keras","model","connection_map","-","a","map","where","the","key","is","a","layer",",","the","value","is","a","list","of","its","successors","reverse_connection_map","-","a","map","where","the","key","is","a","layer",",","the","value","is","a","list","of","its","predecessors","keras_layer_map","-","a","map","where","the","key","is","a","layer","name",",","the","value","is","Keras","layer","model","-","a","reference","of","the","keras","model",".","blob_names","-","blob","names","for","each","one","of","the","edge","."]
docstr: Get edges that represents transition from not-1D to 1D, and 1D to
  not-1D. A 'in_edge e(u,v)' means u operates on non-1D blobs, but v
  operates on 1D blobs. An 'out_edge e(u,v)' means u operates on 1D
  blobs, but v operates on non-1D blobs.
docstr_tok: ["Get","edges","that","represents","transition","from","not-1D","to","1D",",","and","1D","to","not-1D",".","A","'in_edge","e","(","u",",","v",")","'","means","u","operates","on","non-1D","blobs",",","but","v","operates","on","1D","blobs",".","An","'out_edge","e","(","u",",","v",")","'","means","u","operates","on","1D","blobs",",","but","v","operates","on","non-1D","blobs","."]
code: def _get_1d_interface_edges(self):
      """Get edges that represents transition from not-1D to 1D, and 1D to
      not-1D. A 'in_edge e(u,v)' means u operates on non-1D blobs, but v
      operates on 1D blobs. An 'out_edge e(u,v)' means u operates on 1D
      blobs, but v operates on non-1D blobs.
      """
      in_edges = set()
      for layer in self.layer_list:
          if not self.is_1d_layer(layer):
              continue
          preds = self.get_predecessors(layer)
          if len(preds) == 0:
              in_edges.add((None, layer))
          else:
              # because 1D layers are all 1-input,
              # there should only be 1 predecessor
              u, v = preds[0], layer
              while u and (
                  self.is_activation(u)
                  or type(u) in _KERAS_NORMALIZATION_LAYERS
              ):
                  preds = self.get_predecessors(u)
                  v = u
                  u = preds[0] if len(preds) > 0 else None
              if u is None or (not self.is_1d_layer(u)):
                  in_edges.add((u, v))
  
      out_edges = set()
      for layer in self.layer_list:
          if not self.is_1d_layer(layer):
              continue
          # cases for 1d->output
          if layer in self.output_layers:
              out_edges.add((layer, None))
  
          succs = self.get_successors(layer)
          if len(succs) > 0:
              # this should be handled in 1d->output already
              if not self.is_activation(succs[0]):
                  for succ in succs:
                      if not self.is_1d_layer(succ):
                          out_edges.add((layer, succ))
              else:
                  act_layer = succs[0]
                  succs = self.get_successors(act_layer)
                  if len(succs) == 0:
                      out_edges.add((act_layer, None))
                  else:
                      for succ in succs:
                          if not self.is_1d_layer(succ):
                              out_edges.add((act_layer, succ))
  
      return list(in_edges), list(out_edges)
  
imports: import keras
  import numpy
  import six
  from distutils.version import StrictVersion
label_desc: Use image node_id 33 for calling the NetGraph obj's underlying member method code with example usage: obj._get_1d_interface_edges() and returns: list,  list