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

Method create_param

caffe2/python/modeling/initializers.py:45–57  ·  view source on GitHub ↗
(self, param_name, init_net, shape)

Source from the content-addressed store, hash-verified

43 '''
44
45 def create_param(self, param_name, init_net, shape):
46 if isinstance(param_name, BlobReference):
47 param = BlobReference(str(param_name), init_net)
48 elif isinstance(param_name, str):
49 param = ScopedBlobReference(param_name, init_net)
50 else:
51 raise TypeError("Unsupported type for param_name")
52 # TODO(amalevich): Add operator that will check param in the workspace
53 return ParameterInfo(
54 param_id=None,
55 param=param,
56 shape=shape,
57 )
58
59
60class PseudoFP16Initializer(Initializer):

Callers

nothing calls this directly

Calls 4

BlobReferenceClass · 0.90
ScopedBlobReferenceFunction · 0.90
ParameterInfoClass · 0.90
isinstanceFunction · 0.85

Tested by

no test coverage detected