[Tensorflow] 1. Tensorflow의 기본 Tensor
In [1]: import numpy as np import tensorflow as tf In [2]: # Tensor 생성 [1,2,3] Out[2]: [1, 2, 3] In [3]: [[1,2,3],[4,5,6]] Out[3]: [[1, 2, 3], [4, 5, 6]] In [4]: arr= np.array([1,2,3]) arr.shape Out[4]: (3,) In [5]: arr=np.array([[1,2,3],[4,5,6]]) arr.shape Out[5]: (2, 3) In [6]: #list와 tensor는 다르다 #list1=[1,2,3] tf.constant([1,2,3]) #tf.constant(list1) Out[6]: In [9]: #Array를 tesnfor로 변경 array=..
2021. 6. 17.