def test_embedding(self):
    layer = nn.Embedding(256, 100)
    x1 = torch.randint(0, 255, (128, 42)).long()
    x2 = torch.randint(0, 255, (64,)).long()
    self._check_one_layer(layer, x1)
    self._check_one_layer(layer, x2)
def test_embedding(self):
    layer = nn.Embedding(256, 100)
    x1 = torch.randint(0, 255, (128, 42)).long()
    x2 = torch.randint(0, 255, (64,)).long()
    self._check_one_layer(layer, x1)
    self._check_one_layer(layer, x2)