Model arguments
(parser)
| 13 | |
| 14 | |
| 15 | def add_model_config_args(parser): |
| 16 | """Model arguments""" |
| 17 | |
| 18 | group = parser.add_argument_group("model", "model configuration") |
| 19 | group.add_argument("--base", type=str, nargs="*", help="config for input and saving") # nargs will initialize a list |
| 20 | group.add_argument( |
| 21 | "--model-parallel-size", type=int, default=1, help="size of the model parallel. only use if you are an expert." |
| 22 | ) |
| 23 | group.add_argument("--force-pretrain", action="store_true") |
| 24 | group.add_argument("--device", type=int, default=-1) |
| 25 | group.add_argument("--debug", action="store_true") |
| 26 | group.add_argument("--log-image", type=bool, default=True) |
| 27 | |
| 28 | return parser |
| 29 | |
| 30 | |
| 31 | def add_sampling_config_args(parser): |