Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit c09986e

Browse files
jhcrossfacebook-github-bot
authored andcommitted
test scriptify MultiheadAttention (#670)
Summary: Pull Request resolved: #670 We introduce a new test suite where we will iteratively ensure that various model components are TorchScript compliant (JIT-able). Differential Revision: D18799715 fbshipit-source-id: b4a1486080f6791d1fcfeaa51edc4a38c4fadc20
1 parent 0f03af5 commit c09986e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env python3
2+
3+
import unittest
4+
5+
import torch
6+
from fairseq.modules import multihead_attention
7+
8+
9+
class TestExportModels(unittest.TestCase):
10+
@unittest.skip("TDD: placeholder for development")
11+
def test_export_multihead_attention(self):
12+
module = multihead_attention.MultiheadAttention(embed_dim=8, num_heads=2)
13+
torch.jit.script(module)

0 commit comments

Comments
 (0)