赞
踩
Pycharm 编辑器下载安装:下载官网:
https://www.jetbrains.com/pycharm/download/#section=windows
安装教程与Python安装教程在一起
环境变量配置:配置教程:
https://www.cnblogs.com/huangbiquan/p/7784533.html
安装Anaconda:选择Anaconda3,安装教程具体可查看:
https://blog.csdn.net/u010210864/article/details/94580873
下载官网:https://www.anaconda.com/products/individual
按步骤4教程安装Tensorflow:
试运行CNN训练mnist数据集的代码:
# -*- coding: utf-8 -*- # 使用卷积神经网络训练mnist数据集 import gzip from tensorflow.keras.datasets import mnist from tensorflow.keras.utils import to_categorical import tensorflow as tf from tensorflow.keras.layers import Input, Dense, Conv2D, MaxPooling2D, Flatten, Reshape import numpy as np from sklearn.metrics import classification_report import datetime ''' # 装载数据集(从网上下载) (train_images, train_labels), (test_images, test_labels) = mnist.load_data() ''' # 装载数据集(本地导入) def load_data(): path = r"E:\PythonProject\CNN\MNIST_data\mnist.npz" f = np.load(path) train_images, train_labels = f['x_train'], f['y_train'] test_images, test_labels = f['x_test'], f['y_test'] f.close(
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。