[tensorflow] numpy to tf.constant 목적 : numpy 형식을 tensor 형식으로 numpy를 tf.const로 바꾸기 : tf.convert_to_tensor(X, np.float32) #X: numpy 형식또는tf.constant(X) numpy를 tf.Variable로 바꾸기 tf.Variable(X) 코드 : #============================================================import tensorflow as tf import numpy as np from sklearn import datasets mnist = datasets.fetch_mldata('MNIST original', data_home='.') X = mnist.data t = mnist.target sess = tf.S.. 더보기 이전 1 ··· 4 5 6 7 8 9 10 ··· 27 다음