<s> import os <EOL> import veles <EOL> from veles . config import root <EOL> from veles . downloader import Downloader <EOL> from veles . loader . file_image import FileListImageLoader <EOL> def create_forward ( workflow , normalizer , labels_mapping , loader_config ) : <EOL> workflow . plotters_are_enabled = False <EOL> workflow . start_point . unlink_after ( ) <EOL> workflow . downloader = Downloader ( <EOL> workflow , <EOL> url = "<STR_LIT>" <EOL> "<STR_LIT>" , <EOL> directory = root . common . dirs . datasets , <EOL> files = [ "<STR_LIT>" ] ) <EOL> workflow . downloader . link_from ( workflow . start_point ) <EOL> workflow . repeater . link_from ( workflow . downloader ) <EOL> new_loader = workflow . change_unit ( <EOL> workflow . loader . name , <EOL> FileListImageLoader ( workflow , ** loader_config ) ) <EOL> workflow . forwards [ <NUM_LIT:0> ] . link_attrs ( <EOL> new_loader , ( "<STR_LIT:input>" , "<STR_LIT>" ) ) <EOL> workflow . evaluator . link_attrs ( <EOL> new_loader , <EOL> "<STR_LIT>" , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> "<STR_LIT>" , ( "<STR_LIT>" , "<STR_LIT>" ) ) <EOL> workflow . decision . link_attrs ( <EOL> new_loader , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) <EOL> new_loader . _normalizer = normalizer <EOL> workflow . evaluator . labels_mapping = labels_mapping <EOL> workflow . evaluator . class_keys = new_loader . class_keys <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> kwargs = { <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" : True , <EOL> "<STR_LIT>" : <NUM_LIT:0> } <EOL> path_to_model = "<STR_LIT>" <EOL> data_path = os . path . join ( root . common . dirs . datasets , "<STR_LIT>" ) <EOL> launcher = veles ( path_to_model , ** kwargs ) <EOL> launcher . testing = True <EOL> loader_conf = { "<STR_LIT>" : <NUM_LIT:10> , <EOL> "<STR_LIT>" : ( <NUM_LIT> , <NUM_LIT> ) , <EOL> "<STR_LIT>" : ( <NUM_LIT:0> , ) , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : os . path . join ( data_path , "<STR_LIT>" ) , <EOL> "<STR_LIT>" : <EOL> [ os . path . join ( data_path , "<STR_LIT>" ) ] } <EOL> create_forward ( <EOL> launcher . workflow , normalizer = launcher . workflow . loader . normalizer , <EOL> labels_mapping = launcher . workflow . loader . labels_mapping , <EOL> loader_config = loader_conf ) <EOL> launcher . boot ( ) <EOL> launcher . workflow . write_results ( file = os . path . join ( data_path , "<STR_LIT>" ) ) </s>
