def set_all_param_values(layer, values, **tags):
    params = get_all_params(layer, **tags)
    if len(params) != len(values):
        raise ValueError("mismatch: got %d values to set %d parameters" %
                         (len(values), len(params)))

    for p, v in zip(params, values):
        if p.get_value().shape != v.shape:
            raise ValueError("mismatch: parameter has shape %r but value to "
                             "set has shape %r" %
                             (p.get_value().shape, v.shape))
        else:
            p.set_value(v)
Given a list of numpy arrays, this function sets the parameters of all
dataset/ETHPy150Open Lasagne/Lasagne/lasagne/layers/helper.py/set_all_param_values