def _reverse(tensor, axis, name=None):
    if (np.array(axis).ndim == 0):
        return np.flip(tensor, axis)
    for ax in axis:
        tensor = np.flip(tensor, ax)
    return tensor
def _reverse(tensor, axis, name=None):
    if (np.array(axis).ndim == 0):
        return np.flip(tensor, axis)
    for ax in axis:
        tensor = np.flip(tensor, ax)
    return tensor