python argparse example
import argparse
paser = argparse.ArgumentParser()
args = paser.parse_args("")
args.cuda = False
args.show_summary = False
args.device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
print(args.cuda)
The study blog from marearts.com
Computer Vision & Machine Learning Research Laboratory