class_docstr: A layer that flattens its input. The leading ``outdim-1`` dimensions of
  the output will have the same shape as the input. The remaining dimensions
  are collapsed into the last dimension.
  
  Parameters
  ----------
  incoming : a :class:`Layer` instance or a tuple
      The layer feeding into this layer, or the expected input shape.
  outdim : int
      The number of dimensions in the output.
  
  See Also
  --------
  flatten  : Shortcut
code: def get_output_shape_for(self, input_shape):
      to_flatten = input_shape[self.outdim - 1 :]
  
      if any(s is None for s in to_flatten):
          flattened = None
      else:
          flattened = int(np.prod(to_flatten))
  
      return input_shape[: self.outdim - 1] + (flattened,)
  
imports: import numpy
  import theano.tensor
  from ..theano_extensions import padding
  from ..utils import int_types
  from .base import Layer
label_desc: Use image node_id 2 for calling the FlattenLayer obj's underlying member method code with example usage: obj.get_output_shape_for(input_shape) and returns: unknown