3df10a9529e2d91dc9d4c1068d401b4935938b58,tests/test_export.py,TestExportModels,test_export_multihead_attention,#TestExportModels#,61
Before Change
class TestExportModels(unittest.TestCase):
def test_export_multihead_attention(self):
module = multihead_attention.MultiheadAttention(embed_dim=8, num_heads=2)
torch.jit.script(module)
def test_incremental_state_multihead_attention(self):
module1 = multihead_attention.MultiheadAttention(embed_dim=8, num_heads=2)
module1 = torch.jit.script(module1)
After Change
def test_export_multihead_attention(self):
module = multihead_attention.MultiheadAttention(embed_dim=8, num_heads=2)
scripted = torch.jit.script(module)
self._test_save_and_load(scripted)
def test_incremental_state_multihead_attention(self):
module1 = multihead_attention.MultiheadAttention(embed_dim=8, num_heads=2)
module1 = torch.jit.script(module1)
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 4
Instances
Project Name: pytorch/fairseq
Commit Name: 3df10a9529e2d91dc9d4c1068d401b4935938b58
Time: 2020-01-30
Author: dnn@fb.com
File Name: tests/test_export.py
Class Name: TestExportModels
Method Name: test_export_multihead_attention
Project Name: elbayadm/attn2d
Commit Name: 3df10a9529e2d91dc9d4c1068d401b4935938b58
Time: 2020-01-30
Author: dnn@fb.com
File Name: tests/test_export.py
Class Name: TestExportModels
Method Name: test_export_transformer
Project Name: elbayadm/attn2d
Commit Name: 3df10a9529e2d91dc9d4c1068d401b4935938b58
Time: 2020-01-30
Author: dnn@fb.com
File Name: tests/test_export.py
Class Name: TestExportModels
Method Name: test_positional_embedding