본문 바로가기

Dev23

CentOS 에서 PHP7 설치하기 순서 1. 기존 php 제거 2. Repo 추가 3. 설치 1. 기존 php 제거 기존 php 버전확인 [user@localhost ~]# php -v 기존 php 제거[user@localhost ~]# yum remove php-* 2. Repo 추가 CentOS 6[user@localhost ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm [root@localhost ~]# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm CentOS 7 [user@localhost ~]# rpm -Uvh https://dl.fedoraproject.org/pub/e.. 2018. 8. 18.
05. Tensor Flow 로 Classification 예제 (binary) 05. Logistic Classification 출처 : 모두를위한 머신러닝 (http://hunkim.github.io/ml/) 이론 Logistic Regression¶ In [1]: import tensorflow as tf x_data = [[1, 2], [2, 3], [3, 1], [4, 3], [5, 3], [6, 2]] y_data = [[0], [0], [0], [1], [1], [1]] # placeholder for a tensor will be fed X = tf.placeholder(tf.float32, shape=[None, 2]) # n개 일때 None Y = tf.placeholder(tf.float32, shape=[None, 1]) # X: nx2, Y: nx1 --> X.. 2018. 8. 17.
04-2. Tensor Flow 에서 csv 파일 읽기 및 queue 사용법 04-2. Loading Data from File 출처 : 모두를위한 머신러닝 (http://hunkim.github.io/ml/) Data manipulate using Numpy¶List Slicing¶Numpy Indexing In [18]: import numpy as np import pandas as pd xy = np.loadtxt('static/data-01-test-score.csv', delimiter=',', dtype=np.float32) x_data = xy[:, 0:-1] y_data = xy[:, [-1]] print(x_data) print(y_data) [[ 73. 80. 75.] [ 93. 88. 93.] [ 89. 91. 90.] [ 96. 98. 100.] [ 73... 2018. 8. 17.
04-1. Tensor Flow 변수가 여러개일때 Linear regression 04-1. Multi-variable Linear Regression 출처 : 모두를위한 머신러닝 (http://hunkim.github.io/ml/) 이론 변수가 여러개일때는 Matrix 를 이용¶ Matrix 사용 안한 코드¶ In [9]: import tensorflow as tf x1_data = [73., 93., 89., 96., 73.] x2_data = [80., 88., 91., 98., 66.] x3_data = [75., 93., 90., 100., 70.] y_data = [152., 185., 180., 196., 142.] x1 = tf.placeholder(tf.float32) x2 = tf.placeholder(tf.float32) x3 = tf.placeholder(tf.f.. 2018. 8. 17.