Skip to content

Instantly share code, notes, and snippets.

View jskDr's full-sized avatar

Sungjin Kim jskDr

View GitHub Profile
@jskDr
jskDr / GPR_ex_in_sklearn.ipynb
Created June 8, 2018 17:57
GP Regression Example in Sklearn Document
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.layers.normalization import BatchNormalization
#AlexNet with batch normalization in Keras
#input image is 224x224
model = Sequential()
model.add(Convolution2D(64, 3, 11, 11, border_mode='full'))
@jskDr
jskDr / classifier_from_little_data_script_3.py
Created June 13, 2017 01:07 — forked from fchollet/classifier_from_little_data_script_3.py
Fine-tuning a Keras model. Updated to the Keras 2.0 API.
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@jskDr
jskDr / easy_keras.py
Created May 22, 2017 04:03
Siimplied Keras for Users
from keras import layers, models
Nin = 784
Nh = 100
number_of_class = 10
Nout = number_of_class
class ANN(models.Model):
def __init__(self, Nin, Nh, Nout):
# Prepare network layers and activate functions
@jskDr
jskDr / gans_wireless.py
Last active July 17, 2024 06:58
Wireless Communication Signal Processing using Deep Learning Including GANs
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import Reshape
from keras.layers.core import Activation
from keras.layers.normalization import BatchNormalization
from keras.layers.convolutional import Convolution2D, MaxPooling2D, UpSampling2D
from keras.layers.convolutional import Convolution1D, Conv1D
from keras.layers.core import Flatten
from keras.optimizers import SGD
from keras.datasets import mnist
@jskDr
jskDr / cython_array_loop.ipynb
Created December 2, 2016 02:46
Cython can improve the speed with 1d numpy array in a IPython notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jskDr
jskDr / myloss.ipynb
Created November 22, 2016 02:57
Keras - User Specific Loss Function Using Backend
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jskDr
jskDr / test_notebook.ipynb
Last active November 12, 2016 04:36 — forked from cadurosar/test_notebook.ipynb
A interactive ipython notebook for: Keras plays catch - https://gist.github.com/EderSantana/c7222daa328f0e885093
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jskDr
jskDr / keras.json
Created October 29, 2016 19:18
Keras Parameter Setting for the Theano Engine
{
"floatx": "float32",
"epsilon": 1e-07,
"image_dim_ordering": "th",
"backend": "theano"
}
@jskDr
jskDr / Abbreviate Journal Names in Bibtex Database.py
Last active October 17, 2016 16:07 — forked from FilipDominec/Abbreviate Journal Names in Bibtex Database.py
Using the translation table from the Jabref program, finds and replaces all scientific journal names to their standardized abbreviated form. First argument is the file to be processed; outputs safely to 'abbreviated.bib'
#!/usr/bin/env python
#-*- coding: utf-8 -*-
# Supporting Python 3
import sys, os, re
try: bibtexdb = open(sys.argv[1]).read()
except: print("Error: specify the file to be processed!")
if not os.path.isfile('journalList.txt'):