Hey, nice work and thanks for sharing!
I have some minor suggestions:


make_bow_vector (cell evaluated as 91) - create vec using torch.zeros(len(word_to_idx))

I’d mention that NLLLoss expects log-probabilities, but you could also use CrossEntropyLoss if you removed the log_softmax.
I’d split the log_probs line in cell 101 into a few more. It’s not very readable with that indentation.

Also, I’d also recommend using tensor indexing to create BoW vectors, as that will likely be faster than iterating over a list in tensor constructor.