5e37bb3ea1bed3f329ff825eaa6c7b9ed92edb15,sentiment_discovery/reparameterization/reparameterization.py,Reparameterization,__call__,#Reparameterization#Any#Any#,134
Before Change
sys.stdout.flush()
_w = getattr(self.module, self.name)
if not self.evaluated or _w is None:
setattr(self.module, self.name, self.compute_weight(self.module))
self.evaluated = True
def backward_hook(self, module, grad_input, grad_output):
After Change
def __call__(self, module, inputs):
callable hook for forward pass
module2use, name2use = Reparameterization.get_module_and_name(module, self.name)
_w = getattr(module2use, name2use)
if not self.evaluated or _w is None:
setattr(module2use, name2use, self.compute_weight(module2use, name2use))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: NVIDIA/sentiment-discovery
Commit Name: 5e37bb3ea1bed3f329ff825eaa6c7b9ed92edb15
Time: 2017-12-20
Author: raulp@gcf-ctrl-01.nvidia.com
File Name: sentiment_discovery/reparameterization/reparameterization.py
Class Name: Reparameterization
Method Name: __call__
Project Name: hanxiao/bert-as-service
Commit Name: b44d6115097e2bebc4a1ecef869e04e2c60af7bb
Time: 2018-12-15
Author: hanhxiao@tencent.com
File Name: benchmark.py
Class Name:
Method Name:
Project Name: mozilla/bugbug
Commit Name: 0b77df59635715ac4538e35ed2257f1d3dba8d83
Time: 2020-03-11
Author: babadie@mozilla.com
File Name: http_service/tests/conftest.py
Class Name:
Method Name: mock_repo