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

Commit 03eb65a

Browse files
jhcrossfacebook-github-bot
authored andcommitted
test scriptify MultiheadAttention
Summary: 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: 9e1fa1cdb3d0bdc5aa6434eb4b57c9724b35e2a0
1 parent 0f03af5 commit 03eb65a

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)