MCPcopy Create free account
hub / github.com/pytorch/pytorch / _GetLegacyPadArgs

Function _GetLegacyPadArgs

caffe2/python/caffe_translator.py:69–78  ·  view source on GitHub ↗
(op_def, arg_map)

Source from the content-addressed store, hash-verified

67
68
69def _GetLegacyPadArgs(op_def, arg_map):
70 pads = {}
71 keys = ['pad_l', 'pad_t', 'pad_r', 'pad_b']
72 is_pad = 'pad' in arg_map
73 if is_pad:
74 for k in keys:
75 pads[k] = arg_map['pad'].i
76 else:
77 pads = {x: arg_map[x].i for x in keys}
78 return pads
79
80
81def _AdjustDims(op_def, arg_map, pads, dim1, dim2):

Callers 1

_RemoveLegacyPadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…