You need to add a Linear + Softmax layer on the output of the embedding layer.Here is a working example.
import os
import numpy as np
import torch
from torch import nn
from torch.autograd import Variable

class embedder(nn.Module):
  def __init__(self):
    super(embedder,self).__init__()
    self.embeddings=nn.Embedding(10000,150)
    self.l1=nn.Linear(150,1)
    self.sigm=nn.Sigmoid()

  def forward(self,x):
    x=self.embeddings(x)
    x=self.l1(x)
    x=self.sigm(x)
    return(x)

model=embedder()
criterion=nn.BCELoss()
optimizer=torch.optim.Adam(model.parameters(),lr=0.001)

inputIndices=np.random.randint(10000,size=(10000))
inputData=np.zeros((10000,10000))
for i,x in enumerate(inputIndices):
  inputData[i,x]=1
inputTarget=np.random.randint(2,size=(10000))

batchSize=10
epochs=10
numBatches=int(inputData.shape[0]/batchSize)

for curEpoch in range(epochs):
  totalLoss=0
  for curBatch in range(numBatches):
    model.zero_grad()
    X=Variable(torch.from_numpy(inputIndices[curBatch*batchSize:(curBatch+1)*batchSize].reshape(1,batchSize))).type(torch.long)
    Y=Variable(torch.from_numpy(inputTarget[curBatch*batchSize:(curBatch+1)*batchSize].astype(np.float32)))
    modelOutput=model(X)
    loss=criterion(modelOutput,Y)
    loss.backward()
    optimizer.step()
    totalLoss=totalLoss + loss.item()
  print("Epoch {0} Loss {1}".format(curEpoch,totalLoss))

Hope this helps