def normalize_data(batch_data):
    """Normalize the batch data, use coordinates of the block centered at origin,
    Input:
        BxNxC array
    Output:
        BxNxC array
    """
    B, N, C = batch_data.shape
    normal_data = np.zeros((B, N, C))
    for b in range(B):
        pc = batch_data[b]
        centroid = np.mean(pc, axis=0)
        pc = pc - centroid
        m = np.max(np.sqrt(np.sum(pc**2, axis=1)))
        pc = pc / m
        normal_data[b] = pc
    return normal_data
Normalize the batch data, use coordinates of the block centered at origin,
    Input:
        BxNxC array
    Output:
        BxNxC array
    
examples/pytorch/pointcloud/point_transformer/provider.py