()
| 16 | |
| 17 | |
| 18 | def parse_args(): |
| 19 | parser = argparse.ArgumentParser(description='Train a GAN network') |
| 20 | parser.add_argument('--cfg', dest='cfg_file', |
| 21 | help='optional config file', |
| 22 | default=None, type=str) |
| 23 | parser.add_argument('--gpu', dest='gpu_id', |
| 24 | help='GPU device id to use [0]', |
| 25 | default=-1, type=int) |
| 26 | parser.add_argument('--caption_path', type=str, default=None, |
| 27 | help='Path to the file with text sentences') |
| 28 | # if len(sys.argv) == 1: |
| 29 | # parser.print_help() |
| 30 | # sys.exit(1) |
| 31 | args = parser.parse_args() |
| 32 | return args |
| 33 | |
| 34 | |
| 35 | def sample_encoded_context(embeddings, model, bAugmentation=True): |
no outgoing calls
no test coverage detected