PyTorchNLPBook icon indicating copy to clipboard operation
PyTorchNLPBook copied to clipboard

Code and data accompanying Natural Language Processing with PyTorch published by O'Reilly Media https://amzn.to/3JUgR2L

Results 30 PyTorchNLPBook issues
Sort by recently updated
recently updated
newest added
trafficstars

Make it easier for users to select which version of python to use.

I'm studying 5_3_Document_Classification_with_CNN. The make_embedding_matrix helper docs say that it should be fed in a list of words in the dataset. However, for the embedding matrix to return the correct...

There is a problem with the implementation of the ```update_train_state``` function in chapters 3-5. Specifically, when the loss is decreasing ```train_state['early_stopping_best_val']``` is not updated (except in the first epoch), so...

Chapter 3 In Text Notebook does not load. Also tried loading it separately using Jupyter.

def load_vectorizer_only(vectorizer_filepath): with open(vectorizer_filepath) as fp: return NameVectorizer.from_serializable(json.load(fp)) NameVectorizer should be alterd to NewsVectorizer

Hello, I tried your sample code in Chapter 3 (CNN Classifier) and I found a line of code saying that: ``` # Stop early ? train_state['stop_early'] = \ train_state['early_stopping_step'] >=...

``` def preprocess_text(text): text = ' '.join(word.lower() for word in text.split(" ")) text = re.sub(r"([.,!?])", r" \1 ", text) text = re.sub(r"[^a-zA-Z.,!?]+", r" ", text) return text ``` Calling `preprocess_text('Are...

It seems these code lines below are unnessessry, I uncommented these lines and the runned result is just the same. Would you agree that? class SurnameGenerationModel(nn.Module): def __init__(self, char_embedding_size, char_vocab_size,...

Hello, Thanks for a great book. I've been working through the examples and its really helpful. One issue I noticed in the agnews classifier, is when I was running through...