required=True) parser.add_argument( '-g', '--generation_mode', help= 'Mode of image generation. Required for any training environment with "CNN" inside their name!', required=False, default=None) parser.add_argument('-n', '--model_name', help='Name of the RL model', required=True) args = parser.parse_args() computer = ut.getComputer(args.computer) env_name = ut.getImEnv(args.environment) gen_mode = ut.getGenMode(args.generation_mode) model_name = ut.getModelName(args.model_name) config = ut.loadYAMLFromFile('config_' + env_name + '.yaml') ### RL paths (model) use_rl_env_path = os.path.join(config['paths'][computer]['rl'], model_name) print('use_rl_env_path: {}'.format(use_rl_env_path)) # Building config_path config_path = {} config_path['critic_model_path'] = os.path.join(use_rl_env_path, 'critic_model.pth')
required=True) parser.add_argument('-e', '--environment', help='Environment from which the images are created', required=True) parser.add_argument('-g', '--generation_mode', help='Mode of generation', required=True) parser.add_argument('-t', '--test_only', help='If only test', action='store_true') args = parser.parse_args() computer = utils.getComputer(args.computer) environment = utils.getImEnv(args.environment) gen_mode = utils.getGenMode(args.generation_mode) # Loading config config = utils.loadYAMLFromFile('config_' + environment + '.yaml') img_gen = image_generator(config, environment, gen_mode) nb_train_images = config['exp']['nb_train_im'] nb_test_images = config['exp']['nb_test_im'] # Generating images if not args.test_only: img_gen.create_images(nb_train_images, 'train', computer, config, gen_mode) img_gen.create_images(nb_test_images, 'test', computer, config, gen_mode)