def dict_from_string(s):
    """
    Inverse of dict_to_string. Takes the string representation of a dictionary and returns
    the original dictionary.
    :param s: The string representation of the dictionary
    :return: [dict] the dictionary
    """
    l = s.replace("[", "").replace("]", "").split("_")
    d = {x.split(":")[0]: float(x.split(":")[1]) for x in l}
    return d