My lecture note for coworkers ! Though I use a lot of images from google with out any permission … It’s edited result with effort and time. so let me know if you want to use this material. PDF : tmddno1@naver.com
For an intelligent IDE, it is essential to be in the know about any external changes in files it is working with – e.g. changes made by VCS, or build tools, or code generators etc. For that reason, IntelliJ platform spins background process to monitor such changes. The method it uses is platform-specific, and on […]
1. Assume – Docker is already installed [Link] – Django & it’s project is ready [Link] – Postgres or MySQL is ready [Link] – Python3 – CentOS 7 2. Install Packages yum install uwsgi yum install nginx 3. Create Uwsgi conf file – Location : doesn’t matter , where you want.. – Name : […]
A. Install packages [python 2.7] yum install httpd yum install httpd-devel yum install python-pip pip install django yum install mod_wsgi # case of python 2.7 [python 3.X] yum install pcre-devel wget http://mirrors.koehn.com/apache//httpd/httpd-2.4.23.tar.gz tar xvzf httpd-2.4.23.tar.gz configure make install download site : https://github.com/GrahamDumpleton/mod_wsgi/releases wget https://github.com/GrahamDumpleton/mod_wsgi/archive/4.5.7.tar.gz tar xvzf 4.5.7.tar.gz cd /<extract path> ./configure –with-apxs=/usr/local/apache2/bin/apxs make install B. Create Django Project django-admin […]
If you want to remove all database migration settings and start from zero base you can use “migrate –fake”. Follow the bellow process will helps you to reset your jango database env. [delete migration file] go to your app folder then you will see folder name “migration” delete all the contents inside that folder except […]
가. 시작하기 장고에서 뷰를 개발하려고 하면 통상적으로 필요한 것이 html, js, css, img 정도가 될 것이다. 그럼 장고에서는 이러한 파일들을 어떻게 관리하고 개발하는지 세팅 부분까지만 정리하고자 한다 나. template 정의하기 [setting.py] DIRS 부분에 templates 폴더의 위치를 지정해 준다. TEMPLATES = [ { ‘BACKEND’: ‘django.template.backends.django.DjangoTemplates’, ‘DIRS’: [os.path.join(BASE_DIR, ‘tfmsaview/templates/’)], ‘APP_DIRS’: True, ‘OPTIONS’: { ‘context_processors’: [ ‘django.template.context_processors.debug’, ‘django.template.context_processors.request’, […]
niektemme/tensorflow-mnist-predict 위 의 github 를 참조하였으며, 로컬에서 파일 로드, 배열 변환, 모델 로드 및 실행까지 간단하게 코드가 잘 정리되어 있습니다. 여기까지는 기본 구조를 파악하기 위함이었으니 기존예제들을 분석하는 위주로 진행하였지만, 다음부터는 가변적인 데이터 구조와 가변적인 모델을 감안한 개발을 시작하고자 합니다. 가. 로컬 이미지 로드 및 배열로 변환 def imageprepare(argv): “”” 로컬에서 이미지를 받아서 Tensorflow 처리 가능한 […]
가. 테스트 코드 개요 본 테스트 코드는 TensorFlow 를 활용하여 CNN , max pool , drop out, softmax 를 적용하여 MNLP(손글씨 예제)를 학습 시키고 저장하는 예제이다. 테스트 코드 다운로드 나. 테스트 데이터 로딩 및 변수 선언 아래처럼 메트릭스 연산이 수행되기 때문에 위와 같이 데이터 사이즈를 잡은 것이다. x : 인풋레이어에 사용할 변수 정의 y : […]
바 . Gradient Descent (Linear Regression) R 에서 lm( y ~ x , data) 하고 coef 실행시켜주면 최적의 공식을 찾아주던 그것과 상당히 유사한 기능을 tensorflow 로 구현하였다고 보면된다. 모든 기계 학습에서의 최적화를 찾아가는 방법은 코스트를 구하고, 그 코스트가 최소가 되는 공식을 계속해서 변경하고 반복하면서 최적을 찾는 동일한 패턴을 갖는다. 아래의 예제 코드도 그 과정을 설명하는 […]
마. Clustering 이번 예제는 조금 복잡하다. K-Mean 클러스터링의 개념에 대해서 이해해야 하고, 몇몇 TensorFlow 의 Matrix 연산 메서드를 이해해야 한다. 아래는 전체 테스트 코드이다. 열심히 데이터가 따라가는 것을 체크하느라 실제 연산과는 상관없는 로그들이 포함되어 있다. # -*- coding: utf-8 -*- import tensorflow as tf import numpy as np # 랜덤하게 클러스터 데이터를 구성합니다. def create_samples(n_clusters, […]