| 746 | |
| 747 | |
| 748 | def _add_initialization_args(parser): |
| 749 | group = parser.add_argument_group(title="initialization") |
| 750 | |
| 751 | group.add_argument( |
| 752 | "--seed", |
| 753 | type=int, |
| 754 | default=1234, |
| 755 | help="Random seed used for python, numpy, " "pytorch, and cuda.", |
| 756 | ) |
| 757 | group.add_argument( |
| 758 | "--init-method-std", |
| 759 | type=float, |
| 760 | default=0.02, |
| 761 | help="Standard deviation of the zero mean normal " |
| 762 | "distribution used for weight initialization.", |
| 763 | ) |
| 764 | group.add_argument( |
| 765 | "--init-method-xavier-uniform", |
| 766 | action="store_true", |
| 767 | help="Enable Xavier uniform parameter initialization", |
| 768 | ) |
| 769 | |
| 770 | return parser |
| 771 | |
| 772 | |
| 773 | def _add_inference_args(parser): |