示例#1
0
 def test_positional_embedding(self):
     module = sinusoidal_positional_embedding.SinusoidalPositionalEmbedding(
         embedding_dim=8, padding_idx=1)
     torch.jit.script(module)
示例#2
0
 def test_positional_embedding(self):
     module = sinusoidal_positional_embedding.SinusoidalPositionalEmbedding(
         embedding_dim=8, padding_idx=1)
     scripted = torch.jit.script(module)
     _test_save_and_load(scripted)