def np2th(weights, conv=False):
    'Possibly convert HWIO to OIHW.'
    if conv:
        weights = weights.transpose([3, 2, 0, 1])
    return torch.from_numpy(weights)
Possibly convert HWIO to OIHW.
def np2th(weights, conv=False):
    
    if conv:
        weights = weights.transpose([3, 2, 0, 1])
    return torch.from_numpy(weights)