基于CNN的彩色图像分类
发布时间
阅读量:
阅读量
#导入数据
import tensorflow as tf
from tensorflow.keras import datasets,layers,models
import matplotlib.pyplot as plt
(train_images,train_labels),\
(test_images,test_labels) = datasets.cifar10.load_data()
AI写代码python
运行
#归一化
#将像素的值标准化至0至1的区间内
train_images,test_images = train_images/255.0,test_images/255.0
train_images.shape,test_images.shape,train_labels.shape,test_labels.shape
AI写代码python
运行
((50000, 32, 32, 3), (10000, 32, 32, 3), (50000, 1), (10000, 1))
#可视
全部评论 (0)
还没有任何评论哟~
