I am trying to generate the elmo embeddings on a PyTorch model, on every batch iteration, like:
for batch in iterator: optimizer.zero_grad() e