mnist数字显示 python实现
来源:互联网 发布:mac壁纸怎么设置 编辑:程序博客网 时间:2024/06/05 02:05
# -*- coding: utf-8 -*-"""Created on Mon Dec 5 10:21:53 2016@author: haoming"""# -*- coding:utf-8 import numpy as np import struct import matplotlib.pyplot as plt filename = 'train-images.idx3-ubyte' #filename = 'C:/Users/haoming/Desktop/train-images-idx3-ubyte' binfile = open(filename,'rb')#以二进制方式打开 buf = binfile.read() index = 0 magic, numImages, numRows, numColums = struct.unpack_from('>IIII',buf,index)#读取4个32 int print (magic,' ',numImages,' ',numRows,' ',numColums )index += struct.calcsize('>IIII') im = struct.unpack_from('>784B',buf,index)#每张图是28*28=784Byte,这里只显示第一张图 index += struct.calcsize('>784B' ) im = np.array(im) im = im.reshape(28,28) print( im ) fig = plt.figure() plt.imshow(im,cmap = 'binary')#黑白显示 plt.show()
显示出来的字
0 0
- mnist数字显示 python实现
- 显示mnist手写数字
- 深度学习第三天: LeNet在Python实现Mnist手写数字.md
- 2.keras实现MNIST手写数字分类问题初次尝试(Python)
- Python代码实现简单的MNIST手写数字识别(适合初学者看)
- Python 神经网络实现MNIST分类
- Python Adaboost 实现MNIST 分类
- Tensorflow 实现 MNIST 手写数字识别
- Tensorflow框架下实现Mnist数字识别
- 神经网络实现手写数字识别(MNIST)
- 神经网络-tensorflow实现mnist手写数字识别
- TensorFlow学习---实现mnist手写数字识别
- CNN实现MNIST手写数字识别
- Python Multinomial Logistics 实现MNIST分类
- mnist数据集转成图片 Python 实现
- 深度学习- 用Torch实现MNIST手写数字识别
- 深度学习笔记5torch实现mnist手写数字识别
- TensorFlow DNN 实现MNIST数字识别(初版)
- linux+nginx安装
- 【JavaScript】 Html 引用 JavaScript
- 中科爱讯WiFi探针的功能与应用
- leetcode 215 Kth Largest Element in an Array C++
- 浏览器端的存储技术有哪些
- mnist数字显示 python实现
- .net中的数据访问层的封装
- 关于DEV中的GridControl使用之GridView
- Spring事务管理TransactionManager
- 磁盘性能测试
- Android模拟器中访问局域网地址
- UILabel标签文字过长时的显示方式
- Codeforces Beta Round #61 (Div. 2) B. Petya and Countryside (DP)
- Dialy —— 2016.12