Exemplo n.º 1
0
def make_sequences(in_path,out_path,dim=0):
    action_t_series=utils.read_dir_objects(in_path)
    sequences=[]
    for action in action_t_series:
        arr=action.to_array()[dim]
        cat_series=category_series(arr)
        seq=cats_to_seq(cat_series)
        seq+="#"+str(action.cat)
        seq+="#"+action.name +"\n"
        sequences.append(seq)
    str_seq=utils.array_to_txt(sequences)
    utils.save_string(out_path,str_seq)
Exemplo n.º 2
0
def create_seq_dataset(action_dir,conf):
    actions=get_actions(action_dir,conf.nn,conf.cls)
    seq_data=utils.array_to_txt(actions)
    utils.save_string(conf.seq,seq_data)