MCPcopy Index your code
hub / github.com/pytorch/pytorch / GetArgumentParser

Function GetArgumentParser

caffe2/experiments/python/convnet_benchmarks.py:625–680  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

623
624
625def GetArgumentParser():
626 parser = argparse.ArgumentParser(description="Caffe2 benchmark.")
627 parser.add_argument(
628 "--batch_size",
629 type=int,
630 default=128,
631 help="The batch size."
632 )
633 parser.add_argument("--model", type=str, help="The model to benchmark.")
634 parser.add_argument(
635 "--order",
636 type=str,
637 default="NCHW",
638 help="The order to evaluate."
639 )
640 parser.add_argument(
641 "--cudnn_ws",
642 type=int,
643 default=-1,
644 help="The cudnn workspace size."
645 )
646 parser.add_argument(
647 "--iterations",
648 type=int,
649 default=10,
650 help="Number of iterations to run the network."
651 )
652 parser.add_argument(
653 "--warmup_iterations",
654 type=int,
655 default=10,
656 help="Number of warm-up iterations before benchmarking."
657 )
658 parser.add_argument(
659 "--forward_only",
660 action='store_true',
661 help="If set, only run the forward pass."
662 )
663 parser.add_argument(
664 "--layer_wise_benchmark",
665 action='store_true',
666 help="If True, run the layer-wise benchmark as well."
667 )
668 parser.add_argument(
669 "--cpu",
670 action='store_true',
671 help="If True, run testing on CPU instead of GPU."
672 )
673 parser.add_argument(
674 "--dump_model",
675 action='store_true',
676 help="If True, dump the model prototxts to disk."
677 )
678 parser.add_argument("--net_type", type=str, default="dag")
679 parser.add_argument("--num_workers", type=int, default=2)
680 return parser
681
682

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…