parameters: (x, axis)
return_statement: return array_ops.shape(x)[axis]
docstring: Returns the size of a specific dimension.
docstring_summary: Returns the size of a specific dimension.
docstring_tokens: Returns the size of a specific dimension .
function: def dimension_size(x, axis):
    """Returns the size of a specific dimension."""
    # Since tf.gather isn't "constant-in, constant-out", we must first check the
    # static shape or fallback to dynamic shape.
    num_rows = (None if x.get_shape().ndims is None
                else x.get_shape()[axis].value)
    if num_rows is not None:
      return num_rows
    return array_ops.shape(x)[axis]
function_tokens: def dimension_size ( x , axis ) : # Since tf.gather isn't "constant-in, constant-out", we must first check the # static shape or fallback to dynamic shape. num_rows = ( None if x . get_shape ( ) . ndims is None else x . get_shape ( ) [ axis ] . value ) if num_rows is not None : return num_rows return array_ops . shape ( x ) [ axis ]