Caffe2 - Python API
A deep learning, cross platform ML framework
Packages
Classes
Files
C++ API
Python API
GitHub
File List
test
bottleneck
test_args.py
1
import
argparse
2
import
torch
3
4
if
__name__ ==
'__main__'
:
5
parser = argparse.ArgumentParser()
6
7
# Required args. Raises error if they aren't passed.
8
parser.add_argument(
'--foo'
, help=
'foo'
, required=
True
)
9
parser.add_argument(
'--bar'
, help=
'bar'
, required=
True
)
10
_ = parser.parse_args()
11
12
x = torch.ones((3, 3), requires_grad=
True
)
13
(3 * x).sum().backward()
Generated on Thu Mar 21 2019 13:06:36 for Caffe2 - Python API by
1.8.11