def weight_param(name, learn_all=True):
    """
    Creates a named param for weights of a conv/fc layer

    Example of named param for weights:
    param {
      name: "conv1_w"
      lr_mult: 1
      decay_mult: 1
    }

    :param name: str
    :param learn_all: bool. If True, sets the weights of that layer to be modified during the training process
    :returns: dict with params
    """
    lr_mult = decay_mult = 1 if learn_all else 0
    return dict(name=name, lr_mult=lr_mult, decay_mult=decay_mult)