def get_kwargs_dic(kwargs_str):
    """
    Convert a kwarg string to a dictionary of key-values pairs.
    :param kwargs_str: key vale arguments in str format. e.g. 'learning_rate=1e-2; feat_name=vgg16:add; ...'
    :return: Dictionary of key-value pairs. The keys and values are str and should be processed by its owner.
    """
    kwargs_dic = dict()
    if kwargs_str:
        kwargs_dic = [kv.strip() for kv in kwargs_str.split(';')]
        kwargs_dic = {kv.split('=')[0].strip(): kv.split('=')[1].strip() for kv in kwargs_dic}
    return kwargs_dic