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

Function _ValidateParams

caffe2/python/data_parallel_model.py:1678–1688  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

1676
1677
1678def _ValidateParams(params):
1679 set_params = set(params)
1680 if len(params) > len(set_params):
1681 dupes = []
1682 sp = sorted(params)
1683 for j, p in enumerate(sp):
1684 if j > 0 and sp[j - 1] == p:
1685 dupes.append(p)
1686
1687 assert len(params) == len(set_params), \
1688 "Duplicate entries in params: {}".format(dupes)
1689
1690
1691def _ComputeBlobsToSync(model):

Callers 2

ParallelizeFunction · 0.85
Parallelize_BMUFFunction · 0.85

Calls 2

appendMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…