def get_shape(tensor, dynamic=False):
    ' Return shape of the input tensor without batch size.\n\n    Parameters\n    ----------\n    tensor : tf.Tensor\n\n    dynamic : bool\n        If True, returns tensor which represents shape. If False, returns list of ints and/or Nones.\n\n    Returns\n    -------\n    shape : tf.Tensor or list\n    '
    if dynamic:
        shape = tf.shape(tensor)
    else:
        shape = tensor.get_shape().as_list()
    return shape[1:]
Return shape of the input tensor without batch size.

Parameters
----------
tensor : tf.Tensor

dynamic : bool
    If True, returns tensor which represents shape. If False, returns list of ints and/or Nones.

Returns
-------
shape : tf.Tensor or list
def get_shape(tensor, dynamic=False):
    ' Return shape of the input tensor without batch size.\n\n    Parameters\n    ----------\n    tensor : tf.Tensor\n\n    dynamic : bool\n        If True, returns tensor which represents shape. If False, returns list of ints and/or Nones.\n\n    Returns\n    -------\n    shape : tf.Tensor or list\n    '
    if dynamic:
        shape = tf.shape(tensor)
    else:
        shape = tensor.get_shape().as_list()
    return shape[1:]