基于Pytorch和Flask web框架来预测手写数字,using Flask and torch and to predict mnist
1.torch 2.torchvision 3.flask
- 1.clone本git,然后下载MNIST数据集,MNIST文件夹解压到DataSet目录下 (Download DataSet by Baidu Netdisk,The MNIST folder is extracted into the DataSet directory)
链接:https://pan.baidu.com/s/13yaI3R4Oun2UF0eoLpLfeQ 提取码:vnyc
-
2.模型搭建 Net building 进入model/model.py 进行更改你需要的model,这里使用的是LeNet5(into file"Model/model.py" then make changes to the model you need,LeNet5 here)
-
3.运行train.py训练数据集(Run train.py to train Mnist with LeNet5,)
-
3.运行elevate.py评估数据集(Run elevate.py to evaluate test of DataSet)
-
5.运行app.py,然后点击出现的链接(run app.py then click the link that appears)
https://github.com/ybsdegit/Keras_flask_mnist