Skip to content

Instantly share code, notes, and snippets.

View nicewook's full-sized avatar

Jeong Hyunseok nicewook

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.5.2 (C:\Program Files\Anaconda3\python.exe)" project-jdk-type="Python SDK" />
</project>
@nicewook
nicewook / min-char-rnn.py
Created March 21, 2017 00:46 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@nicewook
nicewook / mdn_toy.py
Created April 13, 2017 06:54
mdn toy code
# 원문링크: http://blog.otoro.net/2015/11/24/mixture-density-networks-with-tensorflow/
##############################################################
# 라이브러리 import
##############################################################
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import math
@nicewook
nicewook / lab-11-2-mnist_deep_cnn_jhs.py
Created April 21, 2017 05:23
MNIST challenge of TFKR
# Lab 10 MNIST and Deep learning CNN
'''
모두의딥러닝 lab-11-2 기반으로 짜보았습니다.
생각한 컨셉은 다음과 같습니다.
1. training을 돌려서 accuracy가 70%가 넘으면 멈춘다
2. 예측이 틀린 train set의 label을 +10 해준다 - 별도로 분류해보겠다는 것이었습니다.
3. 모든 Weights, biases 를 초기화 한 다음 다시 training 한다
4. 이렇게 학습시킨 네트웍으로 test set을 검증한다 - 물론 검증시 10보다 큰 예측은 -10 해준다
@nicewook
nicewook / Spatial_Transformer_Example_Part1.ipynb
Created April 27, 2017 14:50 — forked from kvn219/Spatial_Transformer_Example_Part1.ipynb
Spatial Transformer Networks with Tensorflow: Part I
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nicewook
nicewook / rnn_tutorial-Copy2.ipynb
Created June 7, 2017 03:05
rnn toy code - korean comment
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
#this is for tmux session initialize set script
SESSION_NAME="spacosa"
# check if session already exist
if(tmux has-session -t $SESSION_NAME 2> /dev/null); then
echo "Session $SESSION_NAME exists"
else
echo "Session $SESSION_NAME not exist. Create one"
tmux -2 new-session -s ${SESSION_NAME} -d # -2 means 256 color
// code from Hwang Hae Yeon of My Facebook Friend
// Count light from the photo of night scenary
import numpy as np
import argparse
import cv2
def is_contour (c):
peri = cv2.arcLength(c, True)
approx = cv2.approxPolyDP(c, 0.02 * peri, True)
#!/bin/bash
c=1; d=1; mkdir -p dir_${d}
for file in *
do
if [ $c -eq 3001 ]
then
d=$(( d + 1 )); c=0; mkdir -p dir_${d}
fi
#!/bin/bash
c=0; d=0; mkdir -p data${d}
for file in ./test/*
do
if [ $c -eq 10000 ]
then
d=$(( d + 1 )); c=0; mkdir -p data${d}
fi