def run_single(self): try: from run.runner import Runner except ModuleNotFoundError: from runner import Runner run = Runner(self.agent, self.environment, epochs=self.args.epochs, episodes=self.args.episodes, horizon=self.args.horizon, mode='train', verbose=self.args.verbose, model_path=self.args.model_path, seed=92) run.run() run.close(save_full=self.args.eval_path + '/full_' + str(self.agent) + '_evaluation.csv', save_short=self.args.eval_path + '/short_' + str(self.agent) + '_evaluation.csv')
from run.runner import Runner if __name__ == "__main__": run = Runner() run.run("graph-5-hand-made", init_state_from_file=False)
bayer_pattern_size=2, cfa_sim_out_channels=3, correct_pixel_shift=True, balance_labels=False, label_percentage=1.0, verbose=False) run_amount = 10 eval_best_amount = 3 networks = [ NetworkIdentifier.REDUCED_UNET, NetworkIdentifier.BAYER_UNET, NetworkIdentifier.BAYER_DENSENET, NetworkIdentifier.CONV_40_1, NetworkIdentifier.CONV_40_3, NetworkIdentifier.CONV_40_5, NetworkIdentifier.CONV_40_7, NetworkIdentifier.CONV_40_9 ] input_types = [ InputType.URBAN_HYPERSPECTRAL_4, InputType.URBAN_HYPERSPECTRAL_4_ONLY_RGB ] for network in networks: for input_type in input_types: run_config.input_type = input_type run_config.network_identifier = network # use adagrad from conv_40_7 if run_config.input_type == NetworkIdentifier.CONV_40_7: run_config.optimizer = torch.optim.adagrad run_config.update_fingerprint() Runner(run_config, run_amount, eval_best_amount).execute_runs()