글쓴이: 김정주(haje01@gmail.com)
이 문서는 텐서플로우 공식 페이지 내용을 바탕으로 만들어졌습니다.
텐서플로우(TensorFlow)는 기계 학습과 딥러닝을 위해 구글에서 만든 오픈소스 라이브러리입니다. 데이터 플로우 그래프(Data Flow Graph) 방식을 사용하였습니다.
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 && \ |
"""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@gmail.com)
이 문서는 텐서플로우 공식 페이지 내용을 바탕으로 만들어졌습니다.
텐서플로우(TensorFlow)는 기계 학습과 딥러닝을 위해 구글에서 만든 오픈소스 라이브러리입니다. 데이터 플로우 그래프(Data Flow Graph) 방식을 사용하였습니다.
글쓴이: 김정주(haje01@gmail.com)
Caffe는 강력한 딥러닝 툴이지만, 설치가 까다로워 접근하기가 쉽지 않습니다. 이에 Docker를 활용하여 실습하는 방법을 소개합니다.
설치과정은 많은 파일을 받아야 하기에 인터넷이 빠른 곳에서, 충분한 시간(2시간 이상)을 가지고 진행해야 합니다.
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.') |
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 \ |
" My .vimrc | |
syntax on | |
set ic | |
set tabstop=4 | |
set shiftwidth=4 | |
set autoindent | |
set hlsearch | |
set smartindent | |
set backspace=2 |
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] |
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 |