Skip to content

Instantly share code, notes, and snippets.

View shang-vikas's full-sized avatar
🎯
Focusing

Vikas Sangwan shang-vikas

🎯
Focusing
  • Tabsquare.ai(Singapore)
  • New Delhi ,India
View GitHub Profile
import torch
from torch import nn
from torch import optim
from collections import OrderedDict
import numpy as np
import warnings
from torchvision.datasets import mnist
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shang-vikas
shang-vikas / convert_to_jpg.py
Created June 23, 2018 19:31
convert csv data to jpg images
from scipy.misc import imsave
import os
import numpy as np
import pandas as pd
from keras.datasets import mnist
def convert_to_jpg(x,y,df_type='train'):
if df_type=='train':
path = os.path.abspath('./digit-recognizer/train')
if not os.path.isdir(path):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.