22cb76a3479ceba89addb1f467c2dd573cb29026,pytext/torchscript/module.py,ScriptPyTextModuleWithDense,forward,#ScriptPyTextModuleWithDense#,100

Before Change


        dense_tensor = torch.tensor(dense_feat, dtype=torch.float)
        if self.tensorizer.device != "":
            dense_tensor = dense_tensor.to(self.tensorizer.device)
        logits = self.model(input_tensors, dense_tensor)
        return self.output_layer(logits)


class ScriptTwoTowerModule(torch.jit.ScriptModule):
    @torch.jit.script_method

After Change


        languages: Optional[List[str]] = None,
        dense_feat: Optional[List[List[float]]] = None,
    ):
        return self.forward_impl(
            texts,
            multi_texts,
            tokens,
            languages,
            dense_feat,
        )


class ScriptPyTextEmbeddingModuleWithDenseIndex(ScriptPyTextEmbeddingModuleWithDense):
    def __init__(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: facebookresearch/pytext
Commit Name: 22cb76a3479ceba89addb1f467c2dd573cb29026
Time: 2021-02-16
Author: mikekg@fb.com
File Name: pytext/torchscript/module.py
Class Name: ScriptPyTextModuleWithDense
Method Name: forward


Project Name: facebookresearch/pytext
Commit Name: 22cb76a3479ceba89addb1f467c2dd573cb29026
Time: 2021-02-16
Author: mikekg@fb.com
File Name: pytext/torchscript/module.py
Class Name: ScriptPyTextModule
Method Name: forward


Project Name: facebookresearch/pytext
Commit Name: 22cb76a3479ceba89addb1f467c2dd573cb29026
Time: 2021-02-16
Author: mikekg@fb.com
File Name: pytext/torchscript/module.py
Class Name: ScriptPyTextEmbeddingModuleWithDense
Method Name: forward