Transaction: e75189315a8229780275c77a0cbd43976b289edd

Included in block 24,998,936 at 2018/08/12 09:19:54 (UTC).

Transaction overview

Loading...
Transaction info
transaction_id e75189315a8229780275c77a0cbd43976b289edd
ref_block_num 29,698
block_num24,998,936
ref_block_prefix 3,842,739,422
expiration2018/08/12T09:29:48
transaction_num 8
extensions[]
signatures 2067e1345689fffc4d4cee9639e33366fc809c79de1306818846fcb08d59cb18c01774e89d255b5f07f837de9333e73562b1c8ac028abd771a0af18403d5a1dc96
operations
comment
"parent_author":"",<br>"parent_permlink":"kr",<br>"author":"codingart",<br>"permlink":"2-7-rosenblatt-perceptron-n-2-tensorflow-softmax",<br>"title":"2-7 Rosenblatt Perceptron N = 2 TensorFlow Softmax \uba38\uc2e0 \ub7ec\ub2dd \ud655\ub960 \ubd84\uc11d",<br>"body":"![noname01.png (https:\/\/cdn.steemitimages.com\/DQmXRf7aquSJADusPcEwfV5YxJjDNB6HjEcsrSLSsRBMCwo\/noname01.png)\n\nRosenblatt \uc758 \ud37c\uc149\ud2b8\ub860\uc5d0 \uc788\uc5b4\uc11c \uc6e8\uc774\ud2b8 \ubca1\ud130 \uc5c5\ub370\uc774\ud2b8\ub97c \uc911\uc2ec\uc73c\ub85c \ud558\ub294 \uc54c\uace0\ub9ac\ub4ec\uc774 \ubb38\uc81c\uac00 \uc5c6\ub2e4\ub294 \uc810\uc740 \ud655\uc778\uc774 \ub418\uc5c8\uc73c\ub098 \uc9c0\uae08\uc758 \uba38\uc2e0\ub7ec\ub2dd \uc774\ud574\uc640\ub294 \ub9ce\uc774 \ub3d9 \ub5a8\uc5b4\uc9c4 \uba74\uc774 \uc788\ub2e4. \uba38\uc2e0 \ub7ec\ub2dd \uacb0\uacfc \ucc28\uc6d0\uc5d0\uc11c\ub294 Rosenblatt\uc774\ub098 TensorFlow\uc640 \ub9c8\ucc2c\uac00\uc9c0\ub85c \ud559\uc2b5\ud55c\ub300\ub85c \uc81c\ub300\ub85c \ub77c\ubca8 \uac12\uc774 \uc5bb\uc5b4\uc9c0\ub290\ub0d0\uc758 \ubb38\uc81c\uc774\ub2e4. \n\nRosenblatt \ud37c\uc149\ud2b8\ub860\uc758 N = 2 \ubb38\uc81c\ub3c4 \uc774\ub7ec\ud55c \uad00\uc810\uc5d0\uc11c \uc7ac\uc870\uba85\ud574 \ubcf4\uae30\ub85c \ud558\uc790. \uc9c0\ub09c\ubc88 \ub17c\uc758\uc5d0\uc11c \uc870\ub3c4\uc13c\uc11c 2\uac1c\ub85c \uc785\ub825 \ubca1\ud130 (X1,<br> X2)\ub97c \uc0dd\uc131\ud558\uc600\ub2e4.\n\n2-4 Rosenblatt\uc758 \ud37c\uc149\ud2b8\ub860 \uc54c\uace0\ub9ac\ub4ec N=1,<br> N=2\nhttps:\/\/steemit.com\/kr\/@codingart\/2-4-rosenblatt-n-1-n-2\n\n\uac01 \uc785\ub825 \ubca1\ud130 \uc131\ubd84\uc740 \uc870\ub3c4\uc13c\uc11c\uc5d0 \ucabc\uc5ec \uc8fc\ub294 \ube5b\uc758 \ubc1d\uae30\uc5d0 \ub530\ub77c \ubc1d\uc73c\uba74 B(bright) \uc5b4\ub450\uc6b0\uba74 D(dark)\uac00 \ub41c\ub2e4. \ub530\ub77c\uc11c 2\uac1c\uc758 \uc870\ub3c4\uc13c\uc11c\ub85c\ubd80\ud130 \uc5bb\uc5b4\uc9c8 \uc218 \uc788\ub294 \uc785\ub825 \ubca1\ud130\ub294 BB,<br>BD,<br>DB,<br>DD 4\uac00\uc9c0 \uacbd\uc6b0\uac00 \uc788\uc744 \uc218 \uc788\uc73c\ub098 \ub77c\ubca8 \uac12\uc740 2\uac00\uc9c0\uc5d0 \ud55c\uc815\ub41c\ub2e4. \uc544\ub798\uc640 \uac19\uc774 \ud45c\ub97c \uc608\ub97c \ub4e4\uc5b4 \ubcf4\uc790.\n\uc9c0\ub09c\ubc88 \ud45c\uc5d0\uc11c \uc22b\uc790 \ud06c\uae30\ub97c \ubcc0\uacbd\ud558\ub3c4\ub85d \ud55c\ub2e4. \uc989 BB\uc5d0\uc11c (0.7,<br> 0.6)\uc744 (1.0,<br> 1.0) \uc73c\ub85c \ubcc0\uacbd\ud558\uc790. \uc2e4\uc81c \uc870\ub3c4\uc13c\uc11c \uc2e4\ud5d8\uc744 \ud574\ubcf4\uba74 \uc13c\uc11c \ud488\uc9c8\uc774 \uade0\uc77c\ud574\uc11c \ud587\ube5b \ud558\uc5d0 \uac70\uc758 90% \uc5d0 \ub2ec\ud558\ub294 \uac12\uc744 \uc544\ub0a0\ub85c\uadf8 \ud540\uc73c\ub85c \uc77d\uc744 \uc218 \uc788\uc5c8\uc73c\uba70 100%\ub3c4 \ud604\uc2e4\uc801\uc73c\ub85c \uac00\ub2a5\ud55c\ub4ef\ud558\ub2e4. \uc544\uc6b8\ub7ec \uc5b4\ub460 \ub370\uc774\ud130\ub3c4 \uac70\uc758 (0.3,<br> 0.1)\uc5d0\uc11c (0.0,<br> 0.0) \uc73c\ub85c \uc8fc\ub3c4\ub85d \ud558\uc790.\n\n2\uac1c\uc758 \uc870\ub3c4\uc13c\uc11c\uc5d0\uc11c \uc5bb\uc5b4\uc9c8 \uc218 \uc788\ub294 \uc13c\uc11c \ub370\uc774\ud130\uc758 \ud604\uc2e4\uc131\uc744 \ud655\ubcf4\ud558\uae30 \uc704\ud574\uc11c\ub294 \uc608\ub97c \ub4e4\uba74 \ud558\ub098\ub294 \uac74\ubb3c \uc55e \ud558\ub098\ub294 \uac74\ubb3c \ub4a4\uc5d0 \uc124\uce58\ud558\uac8c \ub418\uba74 BD \ub098 DB \uc640 \uac19\uc740 \ub370\uc774\ud130\uac00 \uc5bb\uc5b4\uc9c8 \uac00\ub2a5\uc131\uc774 \uc788\ub2e4.\n\n![noname02.png (https:\/\/cdn.steemitimages.com\/DQmcGRsmiGr2sJGZrhLvSC8Sgs6rH7MNoFHEhjkuBRsY4V9\/noname02.png)\n\nBB \uc774\uac70\ub098 DD\uc774\uba74 \ub77c\ubca8 \uac12\uc744 \uac01\uac01 +1\uacfc \u20131\ub85c \ubd80\uc5ec\ud558\uba74 \ub41c\ub2e4. \uadf8\ub807\ub2e4\uba74 BD \ub610\ub294 DB \uc640 \uac19\uc774 \uc560\ub9e4\ud55c \uacbd\uc6b0\ub294 \uc5b4\ub5bb\uac8c \ucc98\ub9ac\ud560 \uac83\uc778\uac00? \ubd84\ub958 \uacb0\uacfc\ub294 \ub2e8 2\uc885\ub958 +1\uacfc \u20131\ubc16\uc5d0 \uc5c6\ub294\ub370 \uc5b4\ub5a4 \uae30\uc900\uc744 \uc801\uc6a9\ud560 \uac83\uc778\uac00?\n\n\uc774 \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574\uc11c (X1,<br> X2) \ud3c9\uba74 \uc0c1\uc5d0\uc11c \uc785\ub825 \ubca1\ud130\ub4e4\uc744 2\uc885\ub958\ub85c \ubd84\ub958\ud560 \uc218 \uc788\ub294 \uc801\uc808\ud55c classifier \uac00 \uc788\ub2e4\uba74 \ud3b8\ub9ac\ud560\ubfd0\ub354\ub7ec \uc560\ub9e4\ud55c \uc0c1\ud0dc\uc758 \uc870\ud569 BD \uc640 DB \uac00 \uacfc\uc5f0 \uc5b4\ub290 \ucabd\uc5d0 \uc18d\ud558\ub294\uc9c0 \ud559\uc2b5\ub41c \uacb0\uacfc\ub85c\ubd80\ud130 \ud14c\uc2a4\ud2b8\ub97c \uac70\uccd0 \ub77c\ubca8 \uac12\uc744 \ubd80\uc5ec \ud560 \uc218 \uc788\uc744 \uac83\uc774\ub2e4.\n\nTensorFlow Softmax \uacc4\uc0b0 \uacb0\uacfc\uc5d0 \uc758\ud558\uba74 \ucee4\ubc84 \ud398\uc774\uc9c0 \uadf8\ub9bc\uc5d0\uc11c\ucc98\ub7fc \ud655\ub960\uac12\uc774 \ub9e4\ubc88 \uacc4\uc0b0 \ub54c\ub9c8\ub2e4 \ubcc0\ub3d9\ud558\uace0 \uc788\uc73c\ub098 \ub77c\ubca8 \uac12\uc740 \uc0dd\uac01\ub300\ub85c \uc720\uc9c0\uac00 \ub41c\ub2e4. \uc5ec\ub7ec\ubc88 \uc2e4\ud589\ud574 \ubcf4\ub3c4\ub85d \ud55c\ub2e4. \ud55c\ubc88\uc529 \uc624\ub958\ub77c\uace0 \ud310\ub2e8\ub418\ub294 \uacbd\uc6b0\ub3c4 \ub098\uc62c \uc218 \uc788\ub2e4. \ud655\ub960\uc5d0 \uc758\ud55c \ud310\ub2e8\uc774\ubbc0\ub85c \uc5ec\ub7ec\ubc88 \ub098\uc628 \uacbd\uc6b0\uac00 \ub354\uc6b1 \ud655\ub960\uc801\uc73c\ub85c \ubbff\uc744\ub9cc \ud560 \uac83\uc774\ub2e4. \ud559\uc2b5 \ub370\uc774\ud130 \uc218\uac00 \uc801\uc740\uac8c \uadf8\ub7ec\ud55c \uc601\ud5a5\uc744 \ubbf8\uce58\uc9c0 \uc54a\ub098 \ud55c\ub2e4.\n(1.0)\uc5d0\uc11c (0,<br>1)\uae4c\uc9c0 \ub300\ub7b5\uc801\uc778 \ubd84\ub958\uc120(classifier)\uc744 \uadf8\uc5b4 \ubcf4\uc558\ub2e4. (0.5,<br> 0.5) \uac00 \uc120\uc5d0 \uac78\ub824 \uc788\ub294\ub370 \ubc1d\uc74c \uc601\uc5ed\uc774 \uc0dd\uac01\ubcf4\ub2e4 \uc870\uae08 \ub354 \ub113\uc740 \ub4ef\ud558\ub2e4. (0.4,<br> 0.4) \ub77c\ub4e0\uc9c0 \ubd84\ub958\uc120 \uadfc\ucc98\uc5d0\uc11c \uc778\uac04\uc740 \ubd84\ub958\uac00 \uc5b4\ub824\uc6b0\ub098 \uba38\uc2e0 \ub7ec\ub2dd\uc740 \uae30\uacc4\ud559\uc2b5\uc758 \uacb0\uacfc\uc5d0 \ub530\ub77c \ud310\ub2e8\uc744 \ub0b4\ub824 \uc900\ub2e4.\n\n\n\uc544\ub798\uc758 \ucf54\ub4dc\ub97c \ubcf5\uc0ac\ud574\uc11c \uc2e4\ud589\ud560 \uacbd\uc6b0 \ud639 indentation \uc774 \uc798\ubabb\ub418\uc5b4 \uc5d0\ub7ec\uac00 \uac80\ucd9c\ub418\uba74 2018\ub144 8\uc6d4 10\uc77c\uc758 AS \ub0b4\uc6a9\uc744 \ucc38\uc870\ud558\uae30 \ubc14\ub780\ub2e4. indentation \uc704\uce58 AS \uaf2d \ubcf4\uc2dc\uace0 \uc218\uc815\uc791\uc5c5\ud558\uc138\uc694.\n\n#softmax_classifier_4data_rosenblattN2_01\n#Softmax Classifier\nimport tensorflow as tf\ntf.set_random_seed(777) # for reproducibility\n\nx_data = [[0.0,<br> 0.0 ,<br> [1.0,<br> 1.0 \ny_data = [[1,<br> 0 ,<br>[0,<br> 1 \n\nX = tf.placeholder(\"float\",<br> [None,<br> 2 )\nY = tf.placeholder(\"float\",<br> [None,<br> 2 )\nnb_classes = 2\n\nW = tf.Variable(tf.random_normal([2,<br> nb_classes ),<br> name='weight')\nb = tf.Variable(tf.random_normal([nb_classes ),<br> name='bias')\n\n#tf.nn.softmax computes softmax activations\n#softmax = exp(logits) \/ reduce_sum(exp(logits),<br> dim)\nhypothesis = tf.nn.softmax(tf.matmul(X,<br> W) + b)\n\n#Cross entropy cost\/loss\ncost = tf.reduce_mean(-tf.reduce_sum(Y * tf.log(hypothesis),<br> axis=1))\n\noptimizer = tf.train.GradientDescentOptimizer(learning_rate=0.1).minimize(cost)\n\n#Launch graph\nwith tf.Session() as sess:\n sess.run(tf.global_variables_initializer())\n\n for step in range(4001):\n sess.run(optimizer,<br> feed_dict= X: x_data,<br> Y: y_data )\n if step % 200 == 0:\n print(step,<br> sess.run(cost,<br> feed_dict= X: x_data,<br> Y: y_data ))\n\n print('--------------')\n\n # Testing & One-hot encoding\n a = sess.run(hypothesis,<br> feed_dict= X: [[0.7,<br> 0.1 )\n print(a,<br> sess.run(tf.argmax(a,<br> 1)))\n\n print('--------------')\n\n b = sess.run(hypothesis,<br> feed_dict= X: [[0.2,<br> 0.9 )\n print(b,<br> sess.run(tf.argmax(b,<br> 1)))\n\n print('--------------')\n\n c = sess.run(hypothesis,<br> feed_dict= X: [[0.4,<br> 0.4 )\n print(c,<br> sess.run(tf.argmax(c,<br> 1)))\n\n print('--------------')\n \n d = sess.run(hypothesis,<br> feed_dict= X: [[0.5,<br> 0.5 )\n print(d,<br> sess.run(tf.argmax(d,<br> 1)))\n\n print('--------------')\n\n all = sess.run(hypothesis,<br> feed_dict= \n X: [[0.7,<br> 0.1 ,<br>[0.2,<br> 0.9 ,<br>[0.4,<br>0.4 ,<br>[0.5,<br> 0.5 )\n print(all,<br> sess.run(tf.argmax(all,<br> 1)))",<br>"json_metadata":" \"tags\":[\"kr\",<br>\"kr-new\",<br>\"manamine\",<br>\"jjangjjangman\",<br>\"kr-dev\" ,<br>\"image\":[\"https:\/\/cdn.steemitimages.com\/DQmXRf7aquSJADusPcEwfV5YxJjDNB6HjEcsrSLSsRBMCwo\/noname01.png\",<br>\"https:\/\/cdn.steemitimages.com\/DQmcGRsmiGr2sJGZrhLvSC8Sgs6rH7MNoFHEhjkuBRsY4V9\/noname02.png\" ,<br>\"links\":[\"https:\/\/steemit.com\/kr\/@codingart\/2-4-rosenblatt-n-1-n-2\" ,<br>\"app\":\"steemit\/0.1\",<br>\"format\":\"markdown\" "
* The API used to generate this page is provided by @steemchiller.