src/utils.py
def decode_ori_batch(ori, b):
    """Decode a batch of orientation (ori) using the pre-computed orientation decode variable (b) based on the histogram
    (see pre_compute_ori_decode)
    """

    ori = ori.cpu()
    batch_size = ori.size(0)

    ori_avg = torch.zeros((batch_size, 4), dtype=torch.float32)
    h_avg = torch.zeros((batch_size, 4, 4), dtype=torch.float32)

    for i in range(batch_size):
        ori_avg[i], h_avg[i] = decode_ori(ori[i], b)

    return ori_avg, h_avg
Decode a batch of orientation (ori) using the pre-computed orientation decode variable (b) based on the histogram
    (see pre_compute_ori_decode)
    
Decode a batch of orientation (ori) using the pre-computed orientation decode variable (b) based on the histogram
Decode a batch of orientation ( ori ) using the pre - computed orientation decode variable ( b ) based on the histogram
def decode_ori_batch(ori, b):
    ori = ori.cpu()
    batch_size = ori.size(0)
    ori_avg = torch.zeros((batch_size, 4), dtype=torch.float32)
    h_avg = torch.zeros((batch_size, 4, 4), dtype=torch.float32)
    for i in range(batch_size):
        ori_avg[i], h_avg[i] = decode_ori(ori[i], b)
    return ori_avg, h_avg
def decode_ori_batch ( ori , b ) : ori = ori . cpu ( ) batch_size = ori . size ( 0 ) ori_avg = torch . zeros ( ( batch_size , 4 ) , dtype = torch . float32 ) h_avg = torch . zeros ( ( batch_size , 4 , 4 ) , dtype = torch . float32 ) for i in range ( batch_size ) : ori_avg [ i ] , h_avg [ i ] = decode_ori ( ori [ i ] , b ) return ori_avg , h_avg
Decode a batch of orientation (ori) using the pre-computed orientation decode variable (b) based on the histogram
(see pre_compute_ori_decode)
Decode a batch of orientation ( ori ) using the pre - computed orientation decode variable ( b ) based on the histogram ( see pre_compute_ori_decode )
"""Decode a batch of orientation (ori) using the pre-computed orientation decode variable (b) based on the histogram
    (see pre_compute_ori_decode)
    """
ori
b