画像、matplotlibの可視化を読んTF

コード:

"" " 
使用TF读取图片
""" 


輸入のTFとしてtensorflow
 輸入PLTのようmatplotlib.pyplot 


image_raw = tf.gfile.FastGFile(R " C:\ユーザーは、管理者\デスクトップ\ meatwice \ meatwice \ 01newCognition \ reinforcement_learning \ new_test_tensorflow \を\ picture_set \ b023260d27ab8087b5b7d73b837094d.png '\
                      ' RB " ).read()
IMG = tf.image.decode_jpeg(image_raw)
のSESとしてtf.Session()を持つ:
    IMG1 = img.eval()
    印刷(IMG1)プリント(IMG1 .shape)
plt.figure( 1


    

plt.imshow(IMG1)
plt.show()

 

ディスプレイ:

 

おすすめ

転載: www.cnblogs.com/zrmw/p/11589503.html