parameters: (shape: tuple, order: str, padding: int = 0)
return_statement: return ell.math.TensorShape(int(rows), int(columns), int(channels))
docstring: Return the shape in ELL canonical order
docstring_summary: Return the shape in ELL canonical order
docstring_tokens: Return the shape in ELL canonical order
function: def get_ell_shape(shape: tuple, order: str, padding: int = 0):
      """
      Return the shape in ELL canonical order
      """
      if order == "channel_row_column":
          channels = shape[0]
          rows = shape[1] + 2 * padding
          columns = shape[2] + 2 * padding
      elif order == "channel":
          channels = shape[0]
          rows = 1 + 2 * padding
          columns = 1 + 2 * padding
      elif order == "row_column":
          channels = 1
          rows = shape[0] + 2 * padding
          columns = shape[1] + 2 * padding
      else:
          raise NotImplementedError(
              "Unsupported input shape order: {}".format(order))
      return ell.math.TensorShape(int(rows), int(columns), int(channels))
function_tokens: def get_ell_shape ( shape : tuple , order : str , padding : int = 0 ) : if order == "channel_row_column" : channels = shape [ 0 ] rows = shape [ 1 ] + 2 * padding columns = shape [ 2 ] + 2 * padding elif order == "channel" : channels = shape [ 0 ] rows = 1 + 2 * padding columns = 1 + 2 * padding elif order == "row_column" : channels = 1 rows = shape [ 0 ] + 2 * padding columns = shape [ 1 ] + 2 * padding else : raise NotImplementedError ( "Unsupported input shape order: {}" . format ( order ) ) return ell . math . TensorShape ( int ( rows ) , int ( columns ) , int ( channels ) )