pytorch-nlp-tutorial-ny2018 icon indicating copy to clipboard operation
pytorch-nlp-tutorial-ny2018 copied to clipboard

Day 1: Issues in notebook 3_classify_names_with_MLP.ipynb

Open ArtOfStew opened this issue 6 years ago • 0 comments

1. About the third cell from the bottom, you have "labels" in there - to show the list of nationalities.

However, labels variable is only defined in the cell below it. Running code in order of cells will cause exception. You could remove it or move it below the confusion matrix.

2. Exersize -> Exercise spelling issue above the last cell.

3. Running the Exercise defaults to a deprecation warning "Calling softmax with implicit dimension is deprecated..."

You can fix this by editing the definition for forward function in your MLP() class to have the following lines when applying softmax:

if apply_softmax:
    x = F.softmax(x, dim=1)

ArtOfStew avatar Apr 27 '18 19:04 ArtOfStew