1d18d40da194082c2eda8a343ffae85b6c5c634e,pytext/contrib/pytext_lib/models/intent_slot_model.py,IntentSlotJointModel,forward,#IntentSlotJointModel#Any#Any#,100
Before Change
all_intents: Optional[torch.Tensor] = None,
) -> Tuple[torch.Tensor, torch.Tensor]:
tokens = inputs["token_ids"]
slots_batch = torch.tensor([])
intent_batch = torch.tensor([])
word_embedding_output = self.word_embedding(tokens)
sentence_encodings = self.doc_output.encode(word_embedding_output)
word_encodings = self.slot_output.encode(word_embedding_output)
After Change
) -> Tuple[torch.Tensor, torch.Tensor]:
tokens = inputs["token_ids"]
if len(list(tokens.size())) == 1:
tokens = tokens.unsqueeze(0)
empty_list: List[float] = []
slots_batch: torch.Tensor = torch.tensor(empty_list)
intent_batch: torch.Tensor = torch.tensor(empty_list)
word_embedding_output = self.word_embedding(tokens)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: facebookresearch/pytext
Commit Name: 1d18d40da194082c2eda8a343ffae85b6c5c634e
Time: 2020-08-20
Author: resteves@fb.com
File Name: pytext/contrib/pytext_lib/models/intent_slot_model.py
Class Name: IntentSlotJointModel
Method Name: forward
Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: test/functions/test_inv_quad_log_det.py
Class Name: TestInvQuadLogDetBatch
Method Name: test_log_det_only
Project Name: cornellius-gp/gpytorch
Commit Name: a7a12d157766b69cf4b1ddbb5fcdacfe485dc6fa
Time: 2019-04-03
Author: gpleiss@gmail.com
File Name: test/kernels/test_spectral_mixture_kernel.py
Class Name: TestSpectralMixtureKernel
Method Name: test_standard