<jupyter_start><jupyter_text>TensorFlow로  Neural Network 만들기<jupyter_code>import tensorflow as tf

a = tf.placeholder("float")
b = tf.placeholder("float")

y = tf.multiply(a,b)

sess = tf.Session()

print (sess.run(y, feed_dict={a:3, b:3}))<jupyter_output>9.0<jupyter_text>1. MNIST 데이터 가져오기<jupyter_code>from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)<jupyter_output>Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.
Extracting MNIST_data/train-images-idx3-ubyte.gz
Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.
Extracting MNIST_data/train-labels-idx1-ubyte.gz
Successfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes.
Extracting MNIST_data/t10k-images-idx3-ubyte.gz
Successfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes.
Extracting MNIST_data/t10k-labels-idx1-ubyte.gz<jupyter_text>mnist.train.images 배열형태의 객체 mnist.train.labels   0~9 까지의 숫자, 10개의 원소로 구성된 백터 예) 2는 [0,1,0,....0]<jupyter_code>tf.convert_to_tensor(mnist.train.images).get_shape()

W = tf.Variable(tf.zeros([784,10]))
x = tf.placeholder("float",[None,784])
b = tf.Variable(tf.zeros([10]))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13443983402489626, 'fraction_numerical': 0.05228215767634855, 'mean_word_length': 6.584905660377358, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '424785', 'license': 'MIT', 'n_tokens_mistral': 559, 'n_tokens_neox': 545, 'n_words': 74, 'path': '_pages/AI/TensorFlow/src/TensorNeuralNetwork.ipynb', 'repo_name': 'shpimit/shpimit.github.io', 'size': '1205'}