南强小屋 Design By 杰米
关于 TensorFlow
TensorFlow"htmlcode">
%matplotlib from tensorflow.examples.tutorials.mnist import input_data import matplotlib.pyplot as plt mnist = input_data.read_data_sets('MNIST_data', one_hot=True) print('Training data size: ', mnist.train.num_examples) print('Validation data size: ', mnist.validation.num_examples) print('Test data size: ', mnist.test.num_examples) img0 = mnist.train.images[0].reshape(28,28) img1 = mnist.train.images[1].reshape(28,28) img2 = mnist.train.images[2].reshape(28,28) img3 = mnist.train.images[3].reshape(28,28) fig = plt.figure(figsize=(10,10)) ax0 = fig.add_subplot(221) ax1 = fig.add_subplot(222) ax2 = fig.add_subplot(223) ax3 = fig.add_subplot(224) ax0.imshow(img0) ax1.imshow(img1) ax2.imshow(img2) ax3.imshow(img3) fig.show()
画图结果:
总结
以上所述是小编给大家介绍的tensorflow mnist 数据加载实现并画图效果,希望对大家有所帮助!
南强小屋 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
南强小屋 Design By 杰米
暂无tensorflow mnist 数据加载实现并画图效果的评论...