basic_utils/utils.py
def pre_process_path(paths, keys):
    """
    Pre process the paths into torch Variables.

    Args:
        paths: paths to be processed
        keys: select the keys in the path to be processed

    Return:
        new_path: the processed
    """
    new_path = defaultdict(list)
    for k in keys:
        new_path[k] = np.concatenate([path[k] for path in paths])
        new_path[k] = np_to_var(np.array(new_path[k]))
        if len(new_path[k].size()) == 1:
            new_path[k] = new_path[k].view(-1, 1)
    return new_path

    Pre process the paths into torch Variables.

    Args:
        paths: paths to be processed
        keys: select the keys in the path to be processed

    Return:
        new_path: the processed
    
Pre process the paths into torch Variables.
Pre process the paths into torch Variables .
def pre_process_path(paths, keys):
    new_path = defaultdict(list)
    for k in keys:
        new_path[k] = np.concatenate([path[k] for path in paths])
        new_path[k] = np_to_var(np.array(new_path[k]))
        if len(new_path[k].size()) == 1:
            new_path[k] = new_path[k].view(-1, 1)
    return new_path
def pre_process_path ( paths , keys ) : new_path = defaultdict ( list ) for k in keys : new_path [ k ] = np . concatenate ( [ path [ k ] for path in paths ] ) new_path [ k ] = np_to_var ( np . array ( new_path [ k ] ) ) if len ( new_path [ k ] . size ( ) ) == 1 : new_path [ k ] = new_path [ k ] . view ( - 1 , 1 ) return new_path
Pre process the paths into torch Variables.
Pre process the paths into torch Variables .
"""
    Pre process the paths into torch Variables.

    Args:
        paths: paths to be processed
        keys: select the keys in the path to be processed

    Return:
        new_path: the processed
    """
paths
paths to be processed
paths to be processed
keys
select the keys in the path to be processed
select the keys in the path to be processed