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

Method GetParams

caffe2/python/model_helper.py:282–292  ·  view source on GitHub ↗

Returns the params in current namescope

(self, namescope=None, top_scope=False)

Source from the content-addressed store, hash-verified

280 return namescope + scope._NAMESCOPE_SEPARATOR
281
282 def GetParams(self, namescope=None, top_scope=False):
283 '''
284 Returns the params in current namescope
285 '''
286 namescope = ModelHelper._NormalizeNamescope(namescope)
287
288 if namescope == '':
289 return self.params[:]
290 else:
291 return [p for p in self.params if
292 p.GetNameScope().startswith(namescope)]
293
294 def Proto(self):
295 return self.net.Proto()

Callers 15

GetAllParamsMethod · 0.95
test_get_paramsMethod · 0.95
testEqualToCudnnMethod · 0.95
test_lstm_paramsMethod · 0.95
test_milstm_paramsMethod · 0.95
test_multi_lstmMethod · 0.95
broadcast_parametersFunction · 0.80
save_model_params_blobFunction · 0.80
add_parameter_update_opsFunction · 0.80

Calls 2

_NormalizeNamescopeMethod · 0.80
GetNameScopeMethod · 0.80

Tested by 15

test_get_paramsMethod · 0.76
testEqualToCudnnMethod · 0.76
test_lstm_paramsMethod · 0.76
test_milstm_paramsMethod · 0.76
test_multi_lstmMethod · 0.76
param_update_funMethod · 0.64
param_update_funMethod · 0.64
run_modelMethod · 0.64