7b467f99e870bec93e3659b55b0ea068867f1593,apex_utils/apex/reparameterization/__init__.py,,apply_reparameterization,#Any#Any#Any#Any#Any#,64
Before Change
if name != "":
Reparameterization.apply(module, name, dim, reparameterization, hook_child)
else:
names = list(module.state_dict().keys())
for name in names:
apply_reparameterization(module, reparameterization, name, dim, hook_child)
return module
def remove_reparameterization(module, reparameterization=Reparameterization,
name="", remove_all=False):
After Change
if name2use != "":
Reparameterization.apply(module, name, dim, reparameterization, hook_child)
else:
names = [n for n,_ in module2use.named_parameters()]
if name2use != "":
names = [name2use+"."+n for n in names]
if name != "":
names = [name+"."+n for n in names]
for name in names:
apply_reparameterization(module, reparameterization, name, dim, hook_child)
return module
def remove_reparameterization(module, reparameterization=Reparameterization,
name="", remove_all=False):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: NVIDIA/sentiment-discovery
Commit Name: 7b467f99e870bec93e3659b55b0ea068867f1593
Time: 2018-08-09
Author: raulp@dbcluster.nvidia.com
File Name: apex_utils/apex/reparameterization/__init__.py
Class Name:
Method Name: apply_reparameterization
Project Name: jsalt18-sentence-repl/jiant
Commit Name: 7380965df0f3f800c97bbd9f67bc689468914114
Time: 2018-07-12
Author: bowman@nyu.edu
File Name: src/trainer.py
Class Name: SamplingMultiTaskTrainer
Method Name: _save_checkpoint
Project Name: OpenNMT/OpenNMT-py
Commit Name: 32579822389423c7f4120e222aa26652f8507735
Time: 2018-12-18
Author: guillaumekln@users.noreply.github.com
File Name: onmt/utils/optimizers.py
Class Name: Optimizer
Method Name: set_parameters