b147927f545bac81ec08b1e65fac247ba3a24976,pyro/nn/module.py,PyroModule,__setattr__,#PyroModule#Any#Any#,187
Before Change
pass
fullname = _make_name(self._pyro_name, name)
if fullname in _PYRO_PARAM_STORE:
del _PYRO_PARAM_STORE[fullname]
_pyro_params = self.__dict__["_pyro_params"]
constrained_value, constraint, event_dim = value
_pyro_params[name] = constraint, event_dim
pyro.param(fullname, constrained_value, constraint=constraint, event_dim=event_dim)
After Change
if self._pyro_context.active:
fullname = _make_name(self._pyro_name, name)
value = pyro.param(fullname, value)
if not isinstance(value, torch.nn.Parameter):
// Update PyroModule ---> ParamStore (type only; data is preserved).
value = torch.nn.Parameter(value)
_PYRO_PARAM_STORE._params[fullname] = value
_PYRO_PARAM_STORE._param_to_name[value] = fullname
super().__setattr__(name, value)
return
if isinstance(value, torch.Tensor):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: uber/pyro
Commit Name: b147927f545bac81ec08b1e65fac247ba3a24976
Time: 2019-11-12
Author: fritzo@uber.com
File Name: pyro/nn/module.py
Class Name: PyroModule
Method Name: __setattr__
Project Name: analysiscenter/batchflow
Commit Name: 665fb79d80eb60c87f618d90e72b06db600bae92
Time: 2018-08-05
Author: rhudor@gmail.com
File Name: dataset/models/torch/layers/conv_block.py
Class Name: ConvBlock
Method Name: __init__
Project Name: tensorflow/transform
Commit Name: a8a57c10dc86a9c5d2e97afec921969878f49ddb
Time: 2021-02-01
Author: zoy@google.com
File Name: tensorflow_transform/beam/analyzer_impls.py
Class Name: _PTransformImpl
Method Name: __init__