import torch


def preprocess_lab(lab):
    """Converts LAB color channels to [-1, 1] data range"""
    L_chan, a_chan, b_chan = torch.unbind(lab, dim=2)
    return [L_chan / 50.0 - 1.0, a_chan / 110.0, b_chan / 110.0]