This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| from torchvision.datasets import MNIST | |
| from torch import nn | |
| from torchvision import transforms | |
| import torch.optim as optim | |
| from matplotlib import pyplot as plt | |
| import matplotlib.cm as cm | |
| import warnings | |
| warnings.filterwarnings("ignore") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| import numpy as np | |
| from collections import Counter | |
| from nltk.corpus import brown | |
| from mittens import GloVe, Mittens | |
| from sklearn.feature_extraction import stop_words | |
| from sklearn.feature_extraction.text import CountVectorizer | |
| def glove2dict(glove_filename): |
OlderNewer