import copy


def add_channels(layer_spec_list):
    """
    Adds the channels to a list of layer specifications, always using the channels
    of the previous layers. 
    """
    ret = copy.deepcopy(layer_spec_list)
    for i in range(1, len(layer_spec_list)):
        ret[i]["channels"] = layer_spec_list[i-1]["filters"]
    return ret