첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
import numpy as np
import tensorflow as tf

sourceArray = np.array([(1, 2, 3), (4, 5, 6), (7, 8, 9)], dtype = 'int32')

tensor = tf.convert_to_tensor(sourceArray, dtype = tf.int32)

with tf.Session() as sess:
    print(sess.run(tensor))
    print(sess.run(tensor[0]))
    print(sess.run(tensor[0][1]))

[결과]

[[1 2 3]
 [4 5 6]
 [7 8 9]]
[1 2 3]
2
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요