Skip to content

Commit

Permalink
修改了--data-path为必须使用的参数,取消其默认设置,提示用户设置为自己 的dataset路径,修改了--model默认参数为cp…
Browse files Browse the repository at this point in the history
…u,以免无gpu报错
  • Loading branch information
whitewatercn committed Jun 10, 2024
1 parent 91c72ff commit 94360a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/chapter-8/01_classification/train_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def get_args_parser(add_help=True):

parser = argparse.ArgumentParser(description="PyTorch Classification Training", add_help=add_help)

parser.add_argument("--data-path", default=r"G:\deep_learning_data\chest_xray", type=str, help="dataset path")
parser.add_argument("--data-path", required = True, type=str, help="dataset path, like G:\deep_learning_data\chest_xray/train")
parser.add_argument("--model", default="convnext-tiny", type=str,
help="model name; resnet50/convnext/convnext-tiny")
parser.add_argument("--device", default="cuda", type=str, help="device (Use cuda or cpu Default: cuda)")
parser.add_argument("--device", default="cpu", type=str, help="device (Use cuda or cpu Default: cuda)")
parser.add_argument(
"-b", "--batch-size", default=8, type=int, help="images per gpu, the total batch size is $NGPU x batch_size"
)
Expand Down

0 comments on commit 94360a5

Please sign in to comment.