class_docstr: Reshapes the input as a 2D tensor where each row is an pooling
  example.
  
  Parameters
  ----------
  mode : {'valid', 'ignore_borders', 'wrap_centered'}
      - 'valid' :
          Requires an input that is a multiple of the pooling factor
          (in each direction).
      - 'half' :
          Equivalent to 'valid' if we pre-pad with zeros the input on
          each side by (neib_shape[0]//2, neib_shape[1]//2)
      - 'full' :
          Equivalent to 'valid' if we pre-pad with zeros the input on
          each side by (neib_shape[0] - 1, neib_shape[1] - 1)
      - 'ignore_borders' :
          Same as valid, but will ignore the borders if the shape(s)
          of the input is not a multiple of the pooling factor(s).
      - 'wrap_centered' :
          ?? TODO comment
class_docstr_tok: ["Reshapes","the","input","as","a","2D","tensor","where","each","row","is","an","pooling","example",".","Parameters","--","--","--","--","--","mode",":","{","'valid","'",",","'ignore_borders","'",",","'wrap_centered","'","}","-","'valid","'",":","Requires","an","input","that","is","a","multiple","of","the","pooling","factor","(","in","each","direction",")",".","-","'half","'",":","Equivalent","to","'valid","'","if","we","pre-pad","with","zeros","the","input","on","each","side","by","(","neib_shape","[","0","]","\/\/2",",","neib_shape","[","1","]","\/\/2",")","-","'full","'",":","Equivalent","to","'valid","'","if","we","pre-pad","with","zeros","the","input","on","each","side","by","(","neib_shape","[","0","]","-","1",",","neib_shape","[","1","]","-","1",")","-","'ignore_borders","'",":","Same","as","valid",",","but","will","ignore","the","borders","if","the","shape","(","s",")","of","the","input","is","not","a","multiple","of","the","pooling","factor","(","s",")",".","-","'wrap_centered","'",":","?","?","TODO","comment"]
docstr: Parameters
  ----------
  ten4 : a list of lists of images
      ten4 is of shape (list 1 dim, list 2 dim, row, col).
  neib_shape
      (r,c) where r is the height of the neighborhood in rows and c is
      the width of the neighborhood in columns.
  neib_step
      (dr,dc) where dr is the number of rows to skip between patch and dc
      is the number of columns. When None, this is the same as neib_shape
      (patch are disjoint).
  
  Returns
  -------
  matrix
      A 2D matrix, written using the following pattern::
  
          idx = 0
          for i in xrange(list 1 dim)
              for j in xrange(list 2 dim)
                  for k in <image column coordinates>
                      for l in <image row coordinates>
                          output[idx,:]
                               = flattened version of ten4[i,j,l:l+r,k:k+c]
                          idx += 1
  
      .. note:: The op isn't necessarily implemented internally with these
          for loops, they're just the easiest way to describe the output
          pattern.
docstr_tok: ["Parameters","--","--","--","--","--","ten4",":","a","list","of","lists","of","images","ten4","is","of","shape","(","list","1","dim",",","list","2","dim",",","row",",","col",")",".","neib_shape","(","r",",","c",")","where","r","is","the","height","of","the","neighborhood","in","rows","and","c","is","the","width","of","the","neighborhood","in","columns",".","neib_step","(","dr",",","dc",")","where","dr","is","the","number","of","rows","to","skip","between","patch","and","dc","is","the","number","of","columns",".","When","None",",","this","is","the","same","as","neib_shape","(","patch","are","disjoint",")",".","Returns","--","--","--","-","matrix","A","2D","matrix",",","written","using","the","following","pattern",":",":","idx","=","0","for","i","in","xrange","(","list","1","dim",")","for","j","in","xrange","(","list","2","dim",")","for","k","in","<","image","column","coordinates",">","for","l","in","<","image","row","coordinates",">","output","[","idx",",",":","]","=","flattened","version","of","ten4","[","i",",","j",",","l",":","l+r",",","k",":","k+c","]","idx","+=","1","..","note",":",":","The","op","is","n't","necessarily","implemented","internally","with","these","for","loops",",","they","'re","just","the","easiest","way","to","describe","the","output","pattern","."]
code: def make_node(self, ten4, neib_shape, neib_step=None):
      """
      Parameters
      ----------
      ten4 : a list of lists of images
          ten4 is of shape (list 1 dim, list 2 dim, row, col).
      neib_shape
          (r,c) where r is the height of the neighborhood in rows and c is
          the width of the neighborhood in columns.
      neib_step
          (dr,dc) where dr is the number of rows to skip between patch and dc
          is the number of columns. When None, this is the same as neib_shape
          (patch are disjoint).
  
      Returns
      -------
      matrix
          A 2D matrix, written using the following pattern::
  
              idx = 0
              for i in xrange(list 1 dim)
                  for j in xrange(list 2 dim)
                      for k in <image column coordinates>
                          for l in <image row coordinates>
                              output[idx,:]
                                   = flattened version of ten4[i,j,l:l+r,k:k+c]
                              idx += 1
  
          .. note:: The op isn't necessarily implemented internally with these
              for loops, they're just the easiest way to describe the output
              pattern.
  
      """
      ten4 = T.as_tensor_variable(ten4)
      neib_shape = T.as_tensor_variable(neib_shape)
      if neib_step is None:
          neib_step = neib_shape
      else:
          neib_step = T.as_tensor_variable(neib_step)
  
      assert ten4.ndim == 4
      assert neib_shape.ndim == 1
      assert neib_step.ndim == 1
  
      return Apply(
          self,
          [ten4, neib_shape, neib_step],
          [T.matrix(dtype=ten4.type.dtype)],
      )
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import theano
  from theano import Op, Apply
  from theano.gof import EnumList
  import theano.tensor
  from theano.gradient import grad_not_implemented
  from theano.gradient import grad_undefined
label_desc: Use image node_id 5 for calling the Images2Neibs obj's underlying member method code with example usage: obj.make_node(ten4, neib_shape, neib_step) and returns: Apply