66584dea87782aed5509e4269a9f015002e1f5c1,pytext/torchscript/module.py,PyTextEmbeddingModuleWithDense,forward,#PyTextEmbeddingModuleWithDense#,1232
Before Change
)
// call model
dense_feat = self.normalizer.normalize(dense_feat)
dense_tensor = torch.tensor(dense_feat, dtype=torch.float)
if self.tensorizer.device != "":
dense_tensor = dense_tensor.to(self.tensorizer.device)
sentence_embedding = self._forward(inputs, dense_tensor)
if self.concat_dense:
return torch.cat([sentence_embedding, dense_tensor], 1)
else:
return sentence_embedding
@torch.jit.script_method
After Change
if isinstance(result, torch.Tensor):
result = torch.cat([result, result_extension], dim=0)
else:
result.extend(result_extension)
texts = texts[max_batch:]
dense_feat = dense_feat[max_batch:]
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: facebookresearch/pytext
Commit Name: 66584dea87782aed5509e4269a9f015002e1f5c1
Time: 2021-02-23
Author: mikekg@fb.com
File Name: pytext/torchscript/module.py
Class Name: PyTextEmbeddingModuleWithDense
Method Name: forward
Project Name: luispedro/mahotas
Commit Name: 3035cc365d6a2d4a379212b158eb577cdd2bd39c
Time: 2012-11-28
Author: luis@luispedro.org
File Name: mahotas/tests/test_median_filter.py
Class Name:
Method Name: _slow_rank_filter
Project Name: GoogleCloudPlatform/ml-on-gcp
Commit Name: 06b9fdb0079116af3e79021a4fb27a2caac1ad97
Time: 2018-01-24
Author: yuhanliu@google.com
File Name: sklearn/hpsearch/gke_parallel.py
Class Name: GKEParallel
Method Name: _partition_search_spaces
Project Name: riga/tfdeploy
Commit Name: 20ea228773616f824fa5099d0a6e51b7f829d094
Time: 2016-03-10
Author: marcelrieger@me.com
File Name: tfdeploy.py
Class Name: Operation
Method Name: eval