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

Function _get_weights

caffe2/python/helpers/train.py:12–19  ·  view source on GitHub ↗
(model, namescope=None)

Source from the content-addressed store, hash-verified

10
11
12def _get_weights(model, namescope=None):
13 if namescope is None:
14 namescope = scope.CurrentNameScope()
15
16 if namescope == '':
17 return model.weights[:]
18 else:
19 return [w for w in model.weights if w.GetNameScope() == namescope]
20
21
22def iter(model, blob_out, **kwargs):

Callers 1

add_weight_decayFunction · 0.85

Calls 1

GetNameScopeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…