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

Method parse_args

caffe2/python/layer_test_util.py:116–123  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

114 keys = [a.name for a in op_args]
115
116 def parse_args(args):
117 operator = caffe2_pb2.OperatorDef()
118 # Generate the expected value in the same order
119 for k in keys:
120 v = args[k]
121 arg = utils.MakeArgument(k, v)
122 operator.arg.add().CopyFrom(arg)
123 return operator.arg
124
125 self.assertEqual(parse_args(spec_args), op_args)
126

Callers 15

mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
parse_argsFunction · 0.80
parse_argsFunction · 0.80
parse_argsFunction · 0.80
compiled_module_mainFunction · 0.80

Calls 1

addMethod · 0.45

Tested by

no test coverage detected