mnist 转图像_解决MNIST图像分类问题

mnist 转图像

Solving the MNIST is a benchmark for machine learning models. It is also one of the first problems that you’ll encounter as you enter the realm of deep learning.

解决MNIST是机器学习模型的基准。 这也是您进入深度学习领域时会遇到的第一个问题。

In this article, we will design a neural network that uses the Python library Keras to learn to classify handwritten digits of the MNIST dataset.

在本文中,我们将设计一个使用Python库Keras的神经网络,以学习对MNIST数据集的手写数字进行分类。

The crazy thing about solving MNIST is that it isn’t resource-intensive at all. You do not need a GPU. The model we build here can be trained quickly on any modern CPU in under a minute.

解决MNIST的疯狂之处在于它根本不占用资源。 您不需要GPU 。 我们在这里建立的模型可以在一分钟内在任何现代CPU上快速进行训练。

关于MNIST数据集 (About MNIST dataset)

The MNIST dataset is a set of 60,000 training images plus 10,000 test images, assembled by the National Institute of Standards and Technology (NIST) in the 1980s. These images are encoded as NumPy arrays, and the labels are an array of digits, ranging from 0 to 9. The images and labels have a one-to-one correspondence.

MNIST数据集是一组60,000张训练图像和10,000张测试图像,由国家标准与技术研究院(NIST)在1980年代组装而成。 这些图像被编码为NumPy数组,标签是数字数组,范围从0到9。图像和标签具有一一对应的关系。

设置Keras和依赖项 (Setting up Keras and dependencies)

Assuming that you have already installed Anaconda, we shall briefly discuss installing Keras and other dependencies.

假设您已经安装了Anaconda ,我们将简要讨论安装Keras和其他依赖项。

While Anaconda bundles a lot of good stuff by default, it does not ship with Keras pre-installed. The good folks over at Anaconda Cloud, however, have a customized Keras package available here.

虽然默认情况下Anaconda捆绑了很多好东西,但它并未预装Keras。 但是,Anaconda Cloud上的好伙伴在此处有一个定制的Keras软件包。

You could install the same from the conda-forge channel using the command line.

您可以使用命令行从conda-forge频道安装相同的文件。

$ conda install --channel conda-forge keras

深度学习教学法 (Pedagogy of Deep Learning)

  1. Draw mappings of training samples and corresponding targets, i.e., load the data.

    绘制训练样本和相应目标的映射,即加载数据。
  2. Create network architecture.

    创建网络架构。
  3. Select a loss function, an optimizer, and metrics to monitor during testing and training.

    选择损失函数,优化器和指标以在测试和培训期间进行监控。
  4. Pre-process the data as required.

    根据需要对数据进行预处理。
  5. Run the network on training samples, i.e., forward pass to get predictions.

    在训练样本上运行网络,即向前传递以获得预测。

  6. Compute t
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值