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

Method create_param

caffe2/python/layers/layers.py:401–418  ·  view source on GitHub ↗
(
        self, param_name, shape, initializer, optimizer, ps_param=None, regularizer=None
    )

Source from the content-addressed store, hash-verified

399 init_net._net.op.extend([init_op])
400
401 def create_param(
402 self, param_name, shape, initializer, optimizer, ps_param=None, regularizer=None
403 ):
404 with scope.NameScope(self.name, reset=True):
405 param = self.model.create_param(
406 param_name=param_name,
407 shape=shape,
408 initializer=initializer,
409 optimizer=optimizer,
410 ps_param=ps_param,
411 regularizer=regularizer,
412 )
413
414 # make sure we don't share parameters in the same layer
415 assert all(param.parameter != p.parameter for p in self.params)
416
417 self.params.append(param)
418 return param.parameter
419
420 def get_next_blob_reference(self, name):
421 with scope.NameScope(self.name, reset=True):

Callers 15

spatial_bnFunction · 0.45
spatial_gnFunction · 0.45
layer_normFunction · 0.45
_FC_or_packed_FCFunction · 0.45
fc_decompFunction · 0.45
_ConvBaseFunction · 0.45
_initialize_paramsMethod · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

allFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected