Skip to content

Instantly share code, notes, and snippets.

View chmodsss's full-sized avatar
🎵

Sivasurya Santhanam chmodsss

🎵
View GitHub Profile
@chmodsss
chmodsss / gan_mnist.py
Created January 3, 2020 22:37
Generative Adversarial network using pytorch
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")
@chmodsss
chmodsss / fine_tune_glove.py
Created April 19, 2020 06:26
Fine tuning glove embeddings using Mittens
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):