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

Method _infer_param_shape

caffe2/python/model_helper.py:136–142  ·  view source on GitHub ↗
(self, param)

Source from the content-addressed store, hash-verified

134 return self.name
135
136 def _infer_param_shape(self, param):
137 for op in self.param_init_net.Proto().op:
138 if str(param) in op.output:
139 for arg in op.arg:
140 if arg.name == "shape":
141 return list(arg.ints)
142 return None
143
144 def _update_param_info_deprecated(self):
145 assert len(self._param_info_deprecated) <= len(self.params)

Callers 2

add_param_DEPRECATEDMethod · 0.95

Calls 2

listFunction · 0.85
ProtoMethod · 0.45

Tested by

no test coverage detected