Skip to content

Instantly share code, notes, and snippets.

Avatar

Somshubra Majumdar titu1994

View GitHub Profile
View compute_asr_normalization_statistics.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@titu1994
titu1994 / eager_janet.ipynb
Created Apr 24, 2018
TF Eager JANet model
View eager_janet.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@titu1994
titu1994 / imdb_sru.py
Last active Sep 12, 2017
Incorrect, partial implementation of SimpleRecurrentUnit from the paper
View imdb_sru.py
'''Trains an SRU model on the IMDB sentiment classification task.
The dataset is actually too small for LSTM to be of any advantage
compared to simpler, much faster methods such as TF-IDF + LogReg.
Notes:
- RNNs are tricky. Choice of batch size is important,
choice of loss and optimizer is critical, etc.
Some configurations won't converge.
- LSTM loss decrease patterns during training can be quite different
from what you see with CNNs/MLPs/etc.
'''
@titu1994
titu1994 / mobilenet_v1.py
Last active Jun 30, 2017
Tensorflow MobileNet 224 1.0 checkpoint execution
View mobilenet_v1.py
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@titu1994
titu1994 / cifar10.py
Last active Feb 2, 2017
weights conversion
View cifar10.py
from __future__ import print_function
import densenet
import numpy as np
import sklearn.metrics as metrics
from keras.datasets import cifar10
from keras.utils import np_utils
from keras.preprocessing.image import ImageDataGenerator
from keras.optimizers import Adam
View SRGAN Regularizers.py
from keras import backend as K
from keras.regularizers import ActivityRegularizer
dummy_loss_val = K.variable(0.0)
# Dummy loss function which simply returns 0
# This is because we will be training the network using regularizers.
def dummy_loss(y_true, y_pred):
return dummy_loss_val
@titu1994
titu1994 / PortraitStyleTransfer.py
Last active Feb 24, 2021
Partial implementation of "Painting Style Transfer for Head Portraits using Convolutional Neural Networks".
View PortraitStyleTransfer.py
from scipy.misc import imread, imresize, imsave
from scipy.optimize import fmin_l_bfgs_b
import numpy as np
import time
import os
import argparse
import h5py
from keras.models import Sequential
from keras.layers.convolutional import Convolution2D, ZeroPadding2D, AveragePooling2D, MaxPooling2D
@titu1994
titu1994 / conv_auto_encoder.py
Last active Jan 23, 2018
Attempt at implementing a smaller version of "Image Restoration Using Convolutional Auto-encoders with Symmetric Skip Connections"(http://arxiv.org/abs/1606.08921)
View conv_auto_encoder.py
from keras.models import Model
from keras.layers import Input
from keras.layers.convolutional import Convolution2D
from keras.layers.convolutional import Deconvolution2D
from keras.layers import merge
import numpy as np
'''
Attempt at implementing a smaller version of "Image Restoration Using Convolutional Auto-encoders with Symmetric Skip Connections"
(http://arxiv.org/abs/1606.08921)