강의 


https://www.inflearn.com/course/%EA%B8%B0%EB%B3%B8%EC%A0%81%EC%9D%B8-%EB%A8%B8%EC%8B%A0%EB%9F%AC%EB%8B%9D-%EB%94%A5%EB%9F%AC%EB%8B%9D-%EA%B0%95%EC%A2%8C/



참고 자료 







1
2
3
4
import tensorflow as tf
hello = tf.constant("hello tensor")
sess = tf.Session()
print(sess.run(hello))
cs






1
2
3
4
5
6
7
8
9
10
11
12
import tensorflow as tf
 
node1 = tf.constant(3.0, tf.float32)
node2 = tf.constant(4.0)
node3 = tf.add(node1,node2)
 
print("node1 :",node1, "node2 : ", node2)
print(" node3 : ", node3) // ==> In[5] 의 값이 나온다.
 
sess = tf.Session()
print("sess.run(node1, node2 :)",sess.run([node1, node2]) )
print("sess.run(node3): ", sess.run(node3)) // ==> In[6]의 값이 나온다.
cs


















1
2
3
4
5
6
7
= tf.placeholder(tf.float32)
= tf.placeholder(tf.float32)
adder_node = a + b 
 
print(sess.run(adder_node, feed_dict = {a:3, b :4.5}))
print(sess.run(adder_node, feed_dict={a: [1,3], b :[2,4]}))
 
cs


1과 2를 더하고 3과 4를 더한다.



















+ Recent posts