Skip to content

Instantly share code, notes, and snippets.

View jskDr's full-sized avatar

Sungjin Kim jskDr

View GitHub Profile
@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 / 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 / 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 / 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
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 / 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.
@jskDr
jskDr / pg_james.ipynb
Created September 29, 2019 13:36
Policy Gradient with PyTorch and Python Class Structure
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jskDr
jskDr / policy_gradient_by_pytorch.ipynb
Last active October 3, 2019 14:08
Policy gradient code written by PyTorch where the number of batches is larger than one
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jskDr
jskDr / Actor-Crtic_detached_pytorch.ipynb
Last active October 3, 2019 15:04
Actor-Critic implemented by PyTorch, separated loss formulations are used for actor and critic agents.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jskDr
jskDr / Actor-Crtic_no_detached_pytorch.ipynb
Created October 3, 2019 15:11
Acotor Critic witout using detached() in PyTorch - It leads one loss function for both actor and critic networks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.