Demo entry 6642920

1

   

Submitted by anonymous on Sep 26, 2017 at 07:24
Language: Python 3. Code size: 359 Bytes.

#예제1
import tensorflow as tf # import numpy as np
a = tf.constant([ [1 , 2 ], [2 , 3 ]])
b = tf.constant([ [1 , 2 ], [2 , 3 ]])
add = tf.add(a, b)
sub = tf.subtract(a, b)
#Session 정의
sess = tf.Session()
init = tf.global_variables_initializer()
sess.run(init)
#실제 연산
add_out = sess.run(add)
sub_out = sess.run(sub)
print(add_out)
print(sub_out)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).