Skip to content

Instantly share code, notes, and snippets.

View haje01's full-sized avatar

Kim Jeong Ju haje01

View GitHub Profile
@haje01
haje01 / Dockerfile
Last active December 17, 2015 07:18
Dockerfile for Caffe (for AWS GPU Instace)
FROM ubuntu:14.04
# A docker container with the Nvidia kernel module and CUDA drivers installed
ENV CUDA_RUN http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.14_linux_64.run
RUN apt-get update && apt-get install -q -y \
wget \
build-essential
RUN cd /opt && \
@haje01
haje01 / input_data.py
Last active December 29, 2022 09:33
input_data.py for TensorFlow MNIST Sample
"""Functions for downloading and reading MNIST data."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gzip
import os
import numpy
from six.moves import urllib
from six.moves import xrange # pylint: disable=redefined-builtin
SOURCE_URL = 'http://yann.lecun.com/exdb/mnist/'
@haje01
haje01 / TensorFlow 시작하기.md
Last active May 3, 2024 07:30
TensorFlow 시작하기

텐서플로우 시작하기

글쓴이: 김정주(haje01@gmail.com)

이 문서는 텐서플로우 공식 페이지 내용을 바탕으로 만들어졌습니다.


소개

텐서플로우(TensorFlow)는 기계 학습과 딥러닝을 위해 구글에서 만든 오픈소스 라이브러리입니다. 데이터 플로우 그래프(Data Flow Graph) 방식을 사용하였습니다.

Docker로 Caffe 실습하기

글쓴이: 김정주(haje01@gmail.com)

Caffe는 강력한 딥러닝 툴이지만, 설치가 까다로워 접근하기가 쉽지 않습니다. 이에 Docker를 활용하여 실습하는 방법을 소개합니다.

Docker 설치

설치과정은 많은 파일을 받아야 하기에 인터넷이 빠른 곳에서, 충분한 시간(2시간 이상)을 가지고 진행해야 합니다.

@haje01
haje01 / caffe_test.diff
Created July 1, 2015 03:32
Caffe 파이썬 테스트를 위해 수정할 것
diff --git a/python/caffe/io.py b/python/caffe/io.py
index fc96266..02b2ffb 100644
--- a/python/caffe/io.py
+++ b/python/caffe/io.py
@@ -251,9 +251,13 @@ class Transformer:
ms = (1,) + ms
if len(ms) != 3:
raise ValueError('Mean shape invalid')
- if ms != self.inputs[in_][1:]:
- raise ValueError('Mean shape incompatible with input shape.')
@haje01
haje01 / Dockerfile
Last active November 6, 2015 01:24
Dockerfile for Caffe - original from https://github.com/tleyden/docker/tree/master/caffe
FROM ubuntu:14.04
ENV PYTHONPATH /opt/caffe/python
# Add caffe binaries to path
ENV PATH $PATH:/opt/caffe/.build_release/tools
# Get dependencies
RUN apt-get update && apt-get install -y \
@haje01
haje01 / .vimrc
Created May 6, 2015 01:44
.vimrc
" My .vimrc
syntax on
set ic
set tabstop=4
set shiftwidth=4
set autoindent
set hlsearch
set smartindent
set backspace=2
@haje01
haje01 / NLTK ch7-ex.ipynb
Created March 26, 2015 14:27
NLTK Book Ch7-Ex
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
cache = None
def memoize(fn):
global cache
def helper(w, ts, i):
if cache[w][i] == -1:
cache[w][i] = fn(w, ts, i)
return cache[w][i]
@haje01
haje01 / pi.py
Created February 2, 2015 11:50
원주율 외우기
def sfn1(na, o):
a, b, c = na[o-2], na[o-1], na[o]
if a == b and b == c:
return 1
df = b - a
if df == c - b:
return 2 if abs(df) == 1 else 5
elif a == c:
return 4
return 10