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

Function _arg_val

caffe2/python/net_printer.py:210–223  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

208
209
210def _arg_val(arg):
211 if arg.HasField('f'):
212 return str(arg.f)
213 if arg.HasField('i'):
214 return str(arg.i)
215 if arg.HasField('s'):
216 return _sanitize_str(arg.s)
217 if arg.floats:
218 return str(list(arg.floats))
219 if arg.ints:
220 return str(list(arg.ints))
221 if arg.strings:
222 return str([_sanitize_str(s) for s in arg.strings])
223 return '[]'
224
225
226def commonprefix(m):

Callers 1

print_opFunction · 0.85

Calls 2

_sanitize_strFunction · 0.85
listFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…