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

Method AddParameter

caffe2/python/model_helper.py:260–271  ·  view source on GitHub ↗
(self, param, tags=None)

Source from the content-addressed store, hash-verified

258 return self._param_info_deprecated[-1]
259
260 def AddParameter(self, param, tags=None):
261 assert isinstance(param, core.BlobReference)
262 tags = self._normalize_tags(tags)
263 if parameter_info.ParameterTags.COMPUTED_PARAM in tags:
264 self._computed_params.append(param)
265 else:
266 self.params.append(param)
267
268 if parameter_info.ParameterTags.WEIGHT in tags:
269 self.weights.append(param)
270 if parameter_info.ParameterTags.BIAS in tags:
271 self.biases.append(param)
272
273 @staticmethod
274 def _NormalizeNamescope(namescope):

Callers 10

create_paramMethod · 0.95
add_param_DEPRECATEDMethod · 0.95
test_get_paramsMethod · 0.95
_elementwise_linearFunction · 0.80
preluFunction · 0.80
instance_normFunction · 0.80
fc_pruneFunction · 0.80
fc_sparseFunction · 0.80
conv_transposeFunction · 0.80
group_conv_deprecatedFunction · 0.80

Calls 3

_normalize_tagsMethod · 0.95
isinstanceFunction · 0.85
appendMethod · 0.45

Tested by 1

test_get_paramsMethod · 0.76