当前位置:网站首页>Use MNIST in tensorflow 2_ 784 data set for handwritten digit recognition
Use MNIST in tensorflow 2_ 784 data set for handwritten digit recognition
2022-07-02 18:48:00 【GaoZhenwen2】
import tensorflow._api.v2.compat.v1 as tf
tf.disable_v2_behavior
tf.compat.v1.disable_eager_execution()
import numpy as np
# Statement to use TensorFlow1 edition
from scipy.io import loadmat
mnist = loadmat('G:/pythonProject/MachineLearning/2 classification /mnist-original.mat')# hold mnist_784 Data sets are downloaded separately , And then use loadmat Read
X = mnist['data'].T# This must be transposed , Because the ranks are opposite !!!!!
y = mnist['label'].T.flatten()# Expand the data
y= y.astype(np.uint8)# Change format to uint8
# And then use pandas Label y Heat code , Finally, convert the data into ndarray Format
import pandas as pd
y_pd = pd.Series(y)
y_oneHot = pd.get_dummies(y_pd)
y = np.array(y_oneHot.values)
# Okay X,y Now it can be used for training 边栏推荐
- 彻底搞懂基于Open3D的点云处理教程!
- How to clean up discarded PVs and their corresponding folders
- ESP32-C3入门教程 问题篇⑩——error: implicit declaration of function ‘esp_blufi_close‘;
- Redis(6)----对象与数据结构
- 如何优雅的写 Controller 层代码?
- 夜神模擬器+Fiddler抓包測試App
- 300+ documents! This article explains the latest progress of multimodal learning based on transformer
- Unity学习shader笔记[八十二]增强单通道颜色渲染的黑白处理
- @Component cannot get Dao layer
- 服务器php环境搭建教程,PHP服务端环境搭建图文详解
猜你喜欢

Uncover the whole link communication process of dewu customer service im

Leetcode (81) -- search rotation sort array II

Nm01 function overview and API definition of nm module independent of bus protocol

Redis(7)----数据库与过期键

再放寬!這些應届生,可直接落戶上海

The text editor hopes to mark the wrong sentences in red, and the text editor uses markdown

故障排查:kubectl报错ValidationError: unknown field \u00a0

ESP32-C3入门教程 问题篇⑩——error: implicit declaration of function ‘esp_blufi_close‘;

M2DGR:多源多场景 地面机器人SLAM数据集(ICRA 2022 )

科技公司不同人对Bug的反应 | 每日趣闻
随机推荐
哪个券商公司网上开户佣金低又安全又可靠
Uncover the whole link communication process of dewu customer service im
Pit encountered during installation of laravel frame
@Component cannot get Dao layer
ESP32-C3入门教程 问题篇⑩——error: implicit declaration of function ‘esp_blufi_close‘;
学生抖音宣传母校被吐槽“招生减章”,网友:哈哈哈哈哈哈
How to set vscode to delete the whole line shortcut key?
Nm01 function overview and API definition of nm module independent of bus protocol
ESP32-C3入门教程 问题篇⑪——esp-tls: create_ssl_handle failed, tls_io_instance->options.trusted_certs null
QT official example: QT quick controls - Gallery
Simulateur nightGod + application de test de capture de paquets Fiddler
Leetcode 面试题 17.04. 消失的数字
Leetcode interview question 16.17 Continuous sequence
Redis(6)----对象与数据结构
M2DGR:多源多场景 地面机器人SLAM数据集(ICRA 2022 )
故障排查:kubectl报错ValidationError: unknown field \u00a0
Stretchdibits function
在支付宝账户上买基金安全吗
材质UV遮罩的技巧
夜神模擬器+Fiddler抓包測試App