The Embedding layer works a bit different than e.g. Linear.
You specify the num_embeddings, i.e. the size of the dictionary, and the embedding_dim, i.e. the size of each embedding vector.
In your case num_embeddings=27297 means, that your input tensor should store indices in the rage [0, 27296].
Have a look at this small example:
num_embeddings = 27297
embedding_dim = 300
emb = nn.Embedding(
    num_embeddings=num_embeddings,
    embedding_dim=embedding_dim
)

batch_size = 100
x = torch.empty(batch_size, dtype=torch.long).random_(num_embeddings)

output = emb(x)
output.shape