def _get_shape(tensor, num_dims):
    tf.Assert((tensor.get_shape().ndims == num_dims), [tensor])
    return shape_utils.combined_static_and_dynamic_shape(tensor)
def _get_shape(tensor, num_dims):
    tf.Assert((tensor.get_shape().ndims == num_dims), [tensor])
    return shape_utils.combined_static_and_dynamic_shape(tensor)