PyTorch-Encoding icon indicating copy to clipboard operation
PyTorch-Encoding copied to clipboard

args.batch_size or batch-size

Open 2014ZDH opened this issue 5 years ago • 2 comments

In PyTorch-Encoding/experiments/segmentation/option.py 113line: image I want to ask if args.batch_size is wrong.Because the front defines batch-size image Thank you very much.

2014ZDH avatar Sep 24 '19 12:09 2014ZDH

import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--hello-world')
print(parser.parse_args(["--hello-world", "hoge"]))
# -> Namespace(hello_world='hoge')

A hyphen - used in name of arguments is automatically converted into underscore _ by argparse.

selpoG avatar May 25 '20 10:05 selpoG

Yes, that's normal.

zhanghang1989 avatar May 25 '20 16:05 zhanghang1989