첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
import matplotlib.image as img
import matplotlib.pyplot as pp
import tensorflow as tf

fileName = "d:\\sample.png"

ndarray = img.imread(fileName)
variable = tf.Variable(ndarray, name = 'x')
model = tf.global_variables_initializer()

with tf.Session() as sess:
    variable = tf.transpose(variable, perm = [1, 0, 2])
    sess.run(model)
    transposeNDArray = sess.run(variable)
    pp.imshow(transposeNDArray)
    pp.show()

 

728x90

 

[결과]

728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요