-0.29412 | 0.487437 | 0.180328 | -0.29293 | 0 | 0.00149 | -0.53117 | -0.03333 | 0 |
-0.88235 | -0.14573 | 0.081967 | -0.41414 | 0 | -0.20715 | -0.76687 | -0.66667 | 1 |
-0.05882 | 0.839196 | 0.04918 | 0 | 0 | -0.30551 | -0.49274 | -0.63333 | 0 |
-0.88235 | -0.10553 | 0.081967 | -0.53535 | -0.77778 | -0.16244 | -0.924 | 0 | 1 |
0 | 0.376884 | -0.34426 | -0.29293 | -0.60284 | 0.28465 | 0.887276 | -0.6 | 0 |
-0.41177 | 0.165829 | 0.213115 | 0 | 0 | -0.23696 | -0.89496 | -0.7 | 1 |
-0.64706 | -0.21608 | -0.18033 | -0.35354 | -0.79196 | -0.07601 | -0.85483 | -0.83333 | 0 |
0.176471 | 0.155779 | 0 | 0 | 0 | 0.052161 | -0.95218 | -0.73333 | 1 |
-0.76471 | 0.979899 | 0.147541 | -0.09091 | 0.283688 | -0.09091 | -0.93168 | 0.066667 | 0 |
-0.05882 | 0.256281 | 0.57377 | 0 | 0 | 0 | -0.86849 | 0.1 | 0 |
-0.52941 | 0.105528 | 0.508197 | 0 | 0 | 0.120715 | -0.9035 | -0.7 | 1 |
0.176471 | 0.688442 | 0.213115 | 0 | 0 | 0.132638 | -0.60803 | -0.56667 | 0 |
0.176471 | 0.396985 | 0.311475 | 0 | 0 | -0.19225 | 0.163962 | 0.2 | 1 |
-0.88235 | 0.899497 | -0.01639 | -0.53535 | 1 | -0.10283 | -0.72673 | 0.266667 | 0 |
-0.17647 | 0.005025 | 0 | 0 | 0 | -0.10581 | -0.65329 | -0.63333 | 0 |
0 | 0.18593 | 0.377049 | -0.05051 | -0.45627 | 0.365127 | -0.59607 | -0.66667 | 0 |
-0.17647 | 0.075377 | 0.213115 | 0 | 0 | -0.11774 | -0.8497 | -0.66667 | 0 |
-0.88235 | 0.035176 | -0.5082 | -0.23232 | -0.80378 | 0.290611 | -0.91033 | -0.6 | 1 |
-0.88235 | 0.155779 | 0.147541 | -0.39394 | -0.77305 | 0.031297 | -0.61486 | -0.63333 | 0 |
-0.64706 | 0.266332 | 0.442623 | -0.17172 | -0.44444 | 0.171386 | -0.46541 | -0.8 | 1 |
-0.05882 | -0.00503 | 0.377049 | 0 | 0 | 0.055142 | -0.73527 | -0.03333 | 1 |
-0.17647 | 0.969849 | 0.47541 | 0 | 0 | 0.186289 | -0.68147 | -0.33333 | 0 |
0.058824 | 0.19598 | 0.311475 | -0.29293 | 0 | -0.13562 | -0.84202 | -0.73333 | 0 |
0.176471 | 0.256281 | 0.147541 | -0.47475 | -0.72813 | -0.07303 | -0.89155 | -0.33333 | 0 |
-0.17647 | 0.477387 | 0.245902 | 0 | 0 | 0.174367 | -0.84714 | -0.26667 | 0 |
-0.88235 | -0.02513 | 0.081967 | -0.69697 | -0.66903 | -0.3085 | -0.65073 | -0.96667 | 1 |
위와 같은 여러 측정값이 있을때 어떤 질병이 걸렸는지 아닌지를 학습시키는 과정이다.
마지막에 0,1 이 0이면 질병이 아니고 1이면 질병에 걸린것이다.
import tensorflow as tf
import numpy as np
# 데이터를 파일에서 가져온다.
xy = np.loadtxt('data-03-diabetes.csv', delimiter=',', dtype=np.float32)
# 처음부터 마지막 컬럼 전까지 측정값이다.
x_data = xy[:, 0:-1]
# 마지막 컬럼이 결과값이다.
y_data = xy[:, [-1]]
# 구성이 어떻게 되어있는지 출력해 준다.
print(x_data.shape, y_data.shape)
# n개의 데이터가 8개의 측정값으로 구성된다.
X = tf.placeholder(tf.float32, shape=[None, 8])
# n개 의 하나의 결과치로 구성된다.
Y = tf.placeholder(tf.float32, shape=[None, 1])
# 8개의 측정값이 있고 1개의 결과가 나온다.
W = tf.Variable(tf.random_normal([8, 1]), name='weight')
# 1개의 결과가 도출된다.
b = tf.Variable(tf.random_normal([1]), name='bias')
# 시그모이드함수로 가설을 세운다. 결과를 0,1 로만 나오게 하기위함이다.
hypothesis = tf.sigmoid(tf.matmul(X, W) + b)
# cost 를 계산한다.
cost = -tf.reduce_mean(Y * tf.log(hypothesis) + (1 - Y) * tf.log(1 - hypothesis))
# cost 를 줄이도록 학습한다.
train = tf.train.GradientDescentOptimizer(learning_rate=0.01).minimize(cost)
# 결과가 0.5 이상이면 1 아니면 0 이다.
predicted = tf.cast(hypothesis > 0.5, dtype=tf.float32)
# 계산된 결과가 결과 값과 같은지 확률을 계산한다.
accuracy = tf.reduce_mean(tf.cast(tf.equal(predicted, Y), dtype=tf.float32))
# 세션을 할당하고 초기화 한다. with 문은 묶인것? 이라고 보면됨.
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
# 10001 번의 루프를 돌면서 파일의 내용을 학습한다.
for step in range(10001):
cost_val, _ = sess.run([cost, train], feed_dict={X: x_data, Y: y_data})
# 200 번 돌때마다 화면에 step 과 cost 를 출력한다.
if step % 200 == 0:
print(step, cost_val)
# 실재로 학습된 결과로 다시 파일의 내용을 측정해보고 얼마나 정확한지 Accuracy 를 출력해본다.
h, c, a = sess.run([hypothesis, predicted, accuracy],
feed_dict={X: x_data, Y: y_data})
print("\nHypothesis: ", h, "\nCorrect (Y): ", c, "\nAccuracy: ", a)
위 내용의 출력은 Hypothesis 는 학습한 결과 로직에 파일의 내용을 대입했을때 각각에 대한 결과 값이며
Correct 는 결과값에 대한 1,0 을 나타내고 이 값이 실제 값과 얼마나 맞는지 Accuracy 로 나타내는 것입니다.
결과에서보듯이 Accuracy: ', 0.76679844) 으로 76 프로의 확률로 질병인지 아닌지를 판별 가능합니다.
결과
((759, 8), (759, 1)) (0, 0.97422194) (200, 0.73380584) (400, 0.68054277) (600, 0.65738314) (800, 0.64050609) (1000, 0.62598956) (1200, 0.61303777) (1400, 0.60139638) (1600, 0.59091467) (1800, 0.58146954) (2000, 0.57295144) (2200, 0.56526166) (2400, 0.55831152) (2600, 0.5520215) (2800, 0.54632038) (3000, 0.54114515) (3200, 0.53643954) (3400, 0.53215361) (3600, 0.52824324) (3800, 0.52466929) (4000, 0.52139693) (4200, 0.51839536) (4400, 0.51563752) (4600, 0.51309913) (4800, 0.5107587) (5000, 0.50859725) (5200, 0.50659776) (5400, 0.50474519) (5600, 0.50302613) (5800, 0.50142831) (6000, 0.49994111) (6200, 0.498555) (6400, 0.49726117) (6600, 0.49605182) (6800, 0.49492007) (7000, 0.49385962) (7200, 0.49286455) (7400, 0.4919301) (7600, 0.49105117) (7800, 0.49022377) (8000, 0.48944411) (8200, 0.48870838) (8400, 0.48801363) (8600, 0.48735696) (8800, 0.4867357) (9000, 0.48614722) (9200, 0.48558944) (9400, 0.48506039) (9600, 0.48455814) (9800, 0.48408091) (10000, 0.48362702) ('\nHypothesis: ', array([[ 0.3700318 ], [ 0.91548049], [ 0.21602735], [ 0.94834936], [ 0.08354768], [ 0.76475239], [ 0.94660914], [ 0.62400973], [ 0.24575189], [ 0.53068644], [ 0.70052218], [ 0.17214663], [ 0.16543275], [ 0.2199429 ], [ 0.71247756], [ 0.45385256], [ 0.73282206], [ 0.86161494], [ 0.81474245], [ 0.55559713], [ 0.64010382], [ 0.10689519], [ 0.68355203], [ 0.7439062 ], [ 0.36421007], [ 0.93936747], [ 0.65599263], [ 0.62544471], [ 0.65211362], [ 0.40692747], [ 0.96217412], [ 0.8779099 ], [ 0.58168429], [ 0.78780311], [ 0.37508687], [ 0.60115689], [ 0.78435332], [ 0.39770976], [ 0.53502363], [ 0.31824091], [ 0.84450388], [ 0.15713443], [ 0.41641977], [ 0.03135979], [ 0.52673358], [ 0.91592908], [ 0.70154351], [ 0.7093997 ], [ 0.94602114], [ 0.93769354], [ 0.94463712], [ 0.24789676], [ 0.32195851], [ 0.96026611], [ 0.23895976], [ 0.42620692], [ 0.06667964], [ 0.75892609], [ 0.84101737], [ 0.5098418 ], [ 0.93055457], [ 0.70813578], [ 0.65229744], [ 0.85724914], [ 0.54217255], [ 0.45803586], [ 0.96486694], [ 0.76065105], [ 0.83716953], [ 0.70461416], [ 0.25252232], [ 0.75770098], [ 0.90561688], [ 0.92974299], [ 0.85952842], [ 0.7762509 ], [ 0.42486441], [ 0.86663973], [ 0.90810114], [ 0.9136045 ], [ 0.86388415], [ 0.84419137], [ 0.36394182], [ 0.80408216], [ 0.55200076], [ 0.88440698], [ 0.52416229], [ 0.90309417], [ 0.92851454], [ 0.79115593], [ 0.82531822], [ 0.64373761], [ 0.71719068], [ 0.62347317], [ 0.90414244], [ 0.97909069], [ 0.9090113 ], [ 0.5846414 ], [ 0.16190986], [ 0.65837079], [ 0.63592726], [ 0.96599692], [ 0.67171514], [ 0.72297561], [ 0.88660306], [ 0.72767776], [ 0.93054253], [ 0.86267883], [ 0.568232 ], [ 0.32958367], [ 0.94322944], [ 0.85151732], [ 0.44822001], [ 0.39299121], [ 0.62763005], [ 0.79084569], [ 0.85894799], [ 0.93857807], [ 0.14030881], [ 0.72902209], [ 0.86476177], [ 0.61664152], [ 0.64215124], [ 0.77957445], [ 0.70592678], [ 0.8574369 ], [ 0.82025975], [ 0.54896337], [ 0.57049835], [ 0.31858006], [ 0.45877916], [ 0.75337428], [ 0.93821293], [ 0.8635385 ], [ 0.80116081], [ 0.87013012], [ 0.42006519], [ 0.81549966], [ 0.72602177], [ 0.7184816 ], [ 0.89642775], [ 0.63532913], [ 0.61051702], [ 0.67205024], [ 0.91157383], [ 0.64918935], [ 0.44098884], [ 0.93719947], [ 0.63372022], [ 0.7613014 ], [ 0.23399186], [ 0.32680222], [ 0.12558192], [ 0.23778123], [ 0.90760028], [ 0.86234099], [ 0.95348269], [ 0.12552066], [ 0.5343293 ], [ 0.80264574], [ 0.64998204], [ 0.84879887], [ 0.38238314], [ 0.79798627], [ 0.63381225], [ 0.57953382], [ 0.69325584], [ 0.88282448], [ 0.77005243], [ 0.6494112 ], [ 0.85252994], [ 0.85940075], [ 0.95391518], [ 0.2406517 ], [ 0.79474664], [ 0.27039859], [ 0.37937924], [ 0.30925179], [ 0.88998455], [ 0.68779784], [ 0.93218398], [ 0.9017601 ], [ 0.59797442], [ 0.13032866], [ 0.17434558], [ 0.52043444], [ 0.74812824], [ 0.67661554], [ 0.82810497], [ 0.66003388], [ 0.36263257], [ 0.18541756], [ 0.90922511], [ 0.41367313], [ 0.85321277], [ 0.90625882], [ 0.68145704], [ 0.68510389], [ 0.56336015], [ 0.55329156], [ 0.67773241], [ 0.95872444], [ 0.77101249], [ 0.81279922], [ 0.13762411], [ 0.33096361], [ 0.90895218], [ 0.22505347], [ 0.93034929], [ 0.27977678], [ 0.28565744], [ 0.52054799], [ 0.75011629], [ 0.2057087 ], [ 0.75803435], [ 0.74818891], [ 0.72012281], [ 0.649068 ], [ 0.11264303], [ 0.27403602], [ 0.71924561], [ 0.50751901], [ 0.92561573], [ 0.94974613], [ 0.70573455], [ 0.33144569], [ 0.01243345], [ 0.73282492], [ 0.31322715], [ 0.4551864 ], [ 0.95112997], [ 0.61192042], [ 0.95621103], [ 0.2124781 ], [ 0.13730334], [ 0.26409647], [ 0.74600202], [ 0.90616345], [ 0.8902337 ], [ 0.6388824 ], [ 0.59054673], [ 0.61427677], [ 0.1180374 ], [ 0.56492639], [ 0.12032915], [ 0.59470803], [ 0.87652451], [ 0.65327024], [ 0.70130438], [ 0.96059424], [ 0.81715578], [ 0.74806231], [ 0.70854938], [ 0.73317331], [ 0.87156576], [ 0.38832107], [ 0.48885614], [ 0.45576379], [ 0.78635192], [ 0.65694213], [ 0.67967415], [ 0.78093886], [ 0.26716092], [ 0.37469891], [ 0.47442526], [ 0.62990814], [ 0.31520733], [ 0.92032582], [ 0.76051152], [ 0.9225775 ], [ 0.56285393], [ 0.75419909], [ 0.8239823 ], [ 0.84951991], [ 0.60194135], [ 0.83998787], [ 0.3606706 ], [ 0.64815956], [ 0.73978502], [ 0.38866496], [ 0.79204822], [ 0.24882402], [ 0.5482083 ], [ 0.94952369], [ 0.81041384], [ 0.86216229], [ 0.69616514], [ 0.38970423], [ 0.62187248], [ 0.4183417 ], [ 0.47441801], [ 0.65190297], [ 0.65728629], [ 0.6830765 ], [ 0.54236895], [ 0.18214154], [ 0.70659906], [ 0.92117071], [ 0.48371741], [ 0.64411545], [ 0.79061466], [ 0.5516873 ], [ 0.78574431], [ 0.43543452], [ 0.66561157], [ 0.89265811], [ 0.66950232], [ 0.74058968], [ 0.86831808], [ 0.4409264 ], [ 0.87412518], [ 0.95516002], [ 0.31215015], [ 0.814825 ], [ 0.28057489], [ 0.78481698], [ 0.81692725], [ 0.72387695], [ 0.40729514], [ 0.77939034], [ 0.79634446], [ 0.72602904], [ 0.21197815], [ 0.8400166 ], [ 0.88320941], [ 0.43998408], [ 0.95368844], [ 0.24628602], [ 0.72565627], [ 0.95856625], [ 0.25511125], [ 0.38668022], [ 0.6652211 ], [ 0.32212332], [ 0.18379892], [ 0.86391807], [ 0.91269827], [ 0.84217131], [ 0.61256701], [ 0.61782426], [ 0.61188555], [ 0.77833873], [ 0.81998533], [ 0.94705737], [ 0.72018093], [ 0.74858665], [ 0.59124976], [ 0.92642969], [ 0.94356465], [ 0.65994716], [ 0.28874373], [ 0.63262123], [ 0.3437618 ], [ 0.78724736], [ 0.18558833], [ 0.26064605], [ 0.42378923], [ 0.66341972], [ 0.32271567], [ 0.58867538], [ 0.85246617], [ 0.64628965], [ 0.86076248], [ 0.95665103], [ 0.78148979], [ 0.03902068], [ 0.34683421], [ 0.84605324], [ 0.8765325 ], [ 0.6374535 ], [ 0.27857929], [ 0.91155159], [ 0.89422792], [ 0.29613292], [ 0.57005429], [ 0.82590932], [ 0.86692053], [ 0.83554876], [ 0.87239408], [ 0.89825457], [ 0.93942589], [ 0.6399861 ], [ 0.61046797], [ 0.55338383], [ 0.81445491], [ 0.87089962], [ 0.23334222], [ 0.79859608], [ 0.89199734], [ 0.27992699], [ 0.48323703], [ 0.83799082], [ 0.58467913], [ 0.90261441], [ 0.30262965], [ 0.83026654], [ 0.67043459], [ 0.87681431], [ 0.38466313], [ 0.69479674], [ 0.6945852 ], [ 0.79477954], [ 0.07643868], [ 0.17290844], [ 0.63485622], [ 0.8155424 ], [ 0.38170969], [ 0.81980556], [ 0.50480503], [ 0.38023195], [ 0.78097284], [ 0.42587543], [ 0.89842463], [ 0.85083252], [ 0.65622354], [ 0.91650057], [ 0.66925991], [ 0.77402496], [ 0.35418713], [ 0.32064435], [ 0.75412351], [ 0.46952865], [ 0.52253413], [ 0.90150231], [ 0.8999266 ], [ 0.91271299], [ 0.95233107], [ 0.70150965], [ 0.83610052], [ 0.38574633], [ 0.39738071], [ 0.47271663], [ 0.9415037 ], [ 0.53401273], [ 0.18898869], [ 0.93297368], [ 0.84650695], [ 0.49440587], [ 0.80312306], [ 0.00960753], [ 0.9207955 ], [ 0.80055183], [ 0.78211099], [ 0.82033581], [ 0.96801269], [ 0.60169435], [ 0.79016757], [ 0.64055496], [ 0.85740662], [ 0.23814832], [ 0.54446751], [ 0.92111409], [ 0.63316137], [ 0.76309925], [ 0.93186283], [ 0.83781093], [ 0.87973046], [ 0.44431299], [ 0.81623119], [ 0.95681429], [ 0.75897533], [ 0.65700543], [ 0.32950929], [ 0.41978225], [ 0.57137984], [ 0.63863689], [ 0.53501093], [ 0.78830326], [ 0.59427124], [ 0.75114721], [ 0.8545512 ], [ 0.79672927], [ 0.6231361 ], [ 0.50591552], [ 0.61367357], [ 0.94594318], [ 0.86947989], [ 0.23167524], [ 0.47079161], [ 0.43242708], [ 0.08282863], [ 0.88935143], [ 0.14215669], [ 0.89593852], [ 0.86194164], [ 0.83440799], [ 0.62860483], [ 0.88424885], [ 0.35417128], [ 0.77151752], [ 0.94070786], [ 0.38943192], [ 0.42330423], [ 0.88944346], [ 0.86382997], [ 0.58552653], [ 0.80563533], [ 0.79816794], [ 0.7988252 ], [ 0.35251015], [ 0.74067354], [ 0.87144709], [ 0.5967558 ], [ 0.79510927], [ 0.76162237], [ 0.8073532 ], [ 0.83968359], [ 0.94706494], [ 0.67303115], [ 0.4091976 ], [ 0.78243226], [ 0.75207752], [ 0.97216964], [ 0.79477125], [ 0.70435488], [ 0.37024301], [ 0.7241599 ], [ 0.91122055], [ 0.95512819], [ 0.92075676], [ 0.72720742], [ 0.62702626], [ 0.80907917], [ 0.42198959], [ 0.76834798], [ 0.77097958], [ 0.85370839], [ 0.6119234 ], [ 0.70903111], [ 0.85344613], [ 0.48009148], [ 0.47600701], [ 0.63377106], [ 0.73435646], [ 0.58657551], [ 0.92218083], [ 0.92802793], [ 0.24493484], [ 0.11743274], [ 0.80530161], [ 0.55715519], [ 0.22469106], [ 0.83270478], [ 0.90140408], [ 0.67879641], [ 0.94124955], [ 0.91504407], [ 0.80182153], [ 0.82581061], [ 0.68717331], [ 0.57794136], [ 0.76354223], [ 0.61091614], [ 0.14149426], [ 0.90590137], [ 0.89553386], [ 0.68140399], [ 0.91510576], [ 0.86624211], [ 0.90311909], [ 0.63437551], [ 0.74434739], [ 0.86853498], [ 0.71422499], [ 0.87389636], [ 0.92433679], [ 0.53835928], [ 0.82471567], [ 0.82216066], [ 0.45614845], [ 0.55160421], [ 0.07508863], [ 0.25541744], [ 0.84423894], [ 0.66269827], [ 0.67233992], [ 0.48981878], [ 0.93197519], [ 0.46693403], [ 0.81212068], [ 0.23049167], [ 0.8926242 ], [ 0.27195424], [ 0.79920727], [ 0.54222172], [ 0.7750569 ], [ 0.55724913], [ 0.27887404], [ 0.77221799], [ 0.93629682], [ 0.39858431], [ 0.92797887], [ 0.86264396], [ 0.85393304], [ 0.8187632 ], [ 0.42240217], [ 0.34413046], [ 0.64388883], [ 0.13661328], [ 0.95413154], [ 0.39051205], [ 0.93976825], [ 0.8957867 ], [ 0.43772212], [ 0.18767704], [ 0.63602334], [ 0.46848196], [ 0.83219928], [ 0.71974903], [ 0.98327386], [ 0.43412197], [ 0.6611377 ], [ 0.79943466], [ 0.65891474], [ 0.04487875], [ 0.76604009], [ 0.79205447], [ 0.85389841], [ 0.6441347 ], [ 0.45210445], [ 0.60599113], [ 0.90391999], [ 0.58050025], [ 0.81843752], [ 0.80364263], [ 0.88844115], [ 0.8134402 ], [ 0.56198764], [ 0.78616703], [ 0.9003914 ], [ 0.67731243], [ 0.96727574], [ 0.809111 ], [ 0.61540902], [ 0.50250506], [ 0.79200083], [ 0.8376326 ], [ 0.49874461], [ 0.69587892], [ 0.28857082], [ 0.63699603], [ 0.8366307 ], [ 0.95523489], [ 0.84366626], [ 0.77009255], [ 0.72999692], [ 0.90502757], [ 0.49800131], [ 0.9446072 ], [ 0.4642227 ], [ 0.79023659], [ 0.34313145], [ 0.05604664], [ 0.33493057], [ 0.36218202], [ 0.6980837 ], [ 0.84458369], [ 0.58753741], [ 0.76824254], [ 0.81240612], [ 0.59036416], [ 0.39017186], [ 0.88041461], [ 0.90800041], [ 0.34558284], [ 0.60365367], [ 0.20400006], [ 0.41466662], [ 0.74312049], [ 0.71328449], [ 0.89530599], [ 0.97939771], [ 0.20553096], [ 0.75263506], [ 0.57520759], [ 0.37561539], [ 0.72092003], [ 0.73230755], [ 0.89490426], [ 0.70991588], [ 0.49394774], [ 0.58987445], [ 0.17812283], [ 0.65061325], [ 0.55043185], [ 0.90546948], [ 0.59859502], [ 0.63834715], [ 0.80110824], [ 0.73684454], [ 0.37900406], [ 0.75590736], [ 0.61501664], [ 0.26063639], [ 0.58096701], [ 0.91178626], [ 0.83766162], [ 0.60308468], [ 0.80692071], [ 0.32273334], [ 0.83016229], [ 0.62737674], [ 0.78778106], [ 0.40930733], [ 0.6811735 ], [ 0.8340646 ], [ 0.15815164], [ 0.27006996], [ 0.78574777], [ 0.81408614], [ 0.76922286], [ 0.90127355], [ 0.78598487], [ 0.72430772], [ 0.76133782], [ 0.74655616], [ 0.68669134], [ 0.79273158], [ 0.50835574], [ 0.46117181], [ 0.88204658], [ 0.82784206], [ 0.66061914], [ 0.29658586], [ 0.88612473], [ 0.76964337], [ 0.82751465], [ 0.69222766], [ 0.86061233], [ 0.86218196], [ 0.73982066], [ 0.40291801], [ 0.90435588], [ 0.92673653], [ 0.29239351], [ 0.14486505], [ 0.75177014], [ 0.38205963], [ 0.73507577], [ 0.36591637], [ 0.47245231], [ 0.33215329], [ 0.79763252], [ 0.87367302], [ 0.15875711], [ 0.37841156], [ 0.54074955], [ 0.49625945], [ 0.51185215], [ 0.77610594], [ 0.16323733], [ 0.91351545], [ 0.1940887 ], [ 0.85807306], [ 0.74741662], [ 0.71906632], [ 0.8625043 ], [ 0.68273556], [ 0.88680202]], dtype=float32), '\nCorrect (Y): ', array([[ 0.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 0.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 0.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 0.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 0.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 0.], [ 0.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 0.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 0.], [ 0.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 0.], [ 1.], [ 0.], [ 0.], [ 0.], [ 1.], [ 1.], [ 0.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 0.], [ 1.], [ 0.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.], [ 1.]], dtype=float32), '\nAccuracy: ', 0.76679844)
'TensorFlow Python' 카테고리의 다른 글
(모두를 위한 딥러닝) 동물 분류 하기 (0) | 2017.11.01 |
---|---|
(모두를 위한 딥러닝) Softmax (0) | 2017.10.31 |
(모두를 위한 딥러닝) Gradient descent (0) | 2017.10.31 |
쳇봇관련 - 링크 (0) | 2017.10.28 |
NSML (0) | 2017.10.28 |