【Python机器学习】实验14 手写体卷积神经网络2

简介: 【Python机器学习】实验14 手写体卷积神经网络2

11. 读取测试集的图片预测值(神经网络的输出为10)

#导入模型
model1=torch.load('./model-cifar10.pth')
pre_result=torch.zeros(len(test_dataset),10)
for i in range(len(test_dataset)):
    pre_result[i,:]=model1(torch.reshape(test_dataset[i][0],(-1,1,28,28)))
pre_result    


tensor([[-1.8005, -0.1725,  1.4765,  ..., 13.5399, -0.6261,  3.8320],
        [ 4.3233,  7.6017, 16.5872,  ..., -0.0560,  5.2066, -7.0792],
        [-2.1821,  9.3779,  0.7749,  ...,  1.8749,  1.6951, -2.9422],
        ...,
        [-5.5755, -2.2075, -9.2250,  ..., -0.2451,  3.3703,  1.2951],
        [ 0.5491, -7.7018, -5.8288,  ..., -7.6734,  9.3946, -1.9603],
        [ 3.5516, -8.2659, -0.5965,  ..., -8.5934,  1.0133, -2.2048]],
       grad_fn=<CopySlices>)
pre_result.shape
torch.Size([10000, 10])
pre_result[:5]
tensor([[-1.8005e+00, -1.7254e-01,  1.4765e+00,  3.0824e+00, -2.5454e+00,
         -7.6911e-01, -1.2368e+01,  1.3540e+01, -6.2614e-01,  3.8320e+00],
        [ 4.3233e+00,  7.6017e+00,  1.6587e+01,  3.6477e+00, -6.6674e+00,
         -6.0579e+00, -1.5660e+00, -5.5983e-02,  5.2066e+00, -7.0792e+00],
        [-2.1821e+00,  9.3779e+00,  7.7487e-01, -3.0049e+00,  1.3374e+00,
         -1.6613e+00,  8.8544e-01,  1.8749e+00,  1.6951e+00, -2.9422e+00],
        [ 1.3456e+01, -9.9020e+00,  2.8586e+00, -2.2105e+00, -1.8515e+00,
          1.7651e-03,  4.7584e+00, -1.3772e+00, -2.2127e+00,  1.5543e+00],
        [-2.9573e+00, -2.5707e+00, -3.5142e+00, -1.7487e+00,  1.2020e+01,
         -8.8355e-01, -1.0698e+00,  6.3823e-01, -3.5542e-01,  3.6258e+00]],
       grad_fn=<SliceBackward0>)
#显示这10000张图片的标签
label_10000=[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253768,  1.4764961 , ..., 13.539932  ,
        -0.6261405 ,  3.832048  ],
       [ 4.323273  ,  7.601658  , 16.587166  , ..., -0.05598306,
         5.20656   , -7.0792093 ],
       [-2.1820781 ,  9.377863  ,  0.7748679 , ...,  1.8749483 ,
         1.6950815 , -2.9421623 ],
       ...,
       [-5.575542  , -2.2075167 , -9.225033  , ..., -0.24509335,
         3.3702612 ,  1.2950805 ],
       [ 0.5491407 , -7.7017508 , -5.8287773 , ..., -7.6733685 ,
         9.39456   , -1.9602803 ],
       [ 3.5516088 , -8.265893  , -0.59651583, ..., -8.593432  ,
         1.0132635 , -2.2048213 ]], dtype=float32)

12. 采用pandas可视化数据

import pandas as pd 
table=pd.DataFrame(zip(pre_10000,label_10000))
table

0
1
0 [-1.8004757, -0.17253768, 1.4764961, 3.0824265... 7
1 [4.323273, 7.601658, 16.587166, 3.6476722, -6.... 2
2 [-2.1820781, 9.377863, 0.7748679, -3.0049446, ... 1
3 [13.455704, -9.902006, 2.8586285, -2.2104588, ... 0
4 [-2.9572597, -2.5707455, -3.5142026, -1.748683... 4
... ... ...
9995 [-2.5784128, 10.5256405, 23.895123, 8.827512, ... 2
9996 [-2.773907, 0.56169015, 1.6811254, 15.230703, ... 3
9997 [-5.575542, -2.2075167, -9.225033, -5.60418, 1... 4
9998 [0.5491407, -7.7017508, -5.8287773, 2.2394006,... 5
9999 [3.5516088, -8.265893, -0.59651583, -4.034732,... 6

10000 rows × 2 columns

table[0].values
array([array([ -1.8004757 ,  -0.17253768,   1.4764961 ,   3.0824265 ,
               -2.545419  ,  -0.76911056, -12.368087  ,  13.539932  ,
               -0.6261405 ,   3.832048  ], dtype=float32)            ,
       array([ 4.323273  ,  7.601658  , 16.587166  ,  3.6476722 , -6.6673512 ,
              -6.05786   , -1.5660243 , -0.05598306,  5.20656   , -7.0792093 ],
             dtype=float32)                                                    ,
       array([-2.1820781,  9.377863 ,  0.7748679, -3.0049446,  1.3374403,
              -1.6612737,  0.8854448,  1.8749483,  1.6950815, -2.9421623],
             dtype=float32)                                               ,
       ...,
       array([-5.575542  , -2.2075167 , -9.225033  , -5.60418   , 17.216341  ,
               2.8671436 ,  1.0113716 , -0.24509335,  3.3702612 ,  1.2950805 ],
             dtype=float32)                                                    ,
       array([ 0.5491407, -7.7017508, -5.8287773,  2.2394006, -7.533697 ,
              13.003905 ,  6.1807218, -7.6733685,  9.39456  , -1.9602803],
             dtype=float32)                                               ,
       array([ 3.5516088 , -8.265893  , -0.59651583, -4.034732  ,  1.3853229 ,
               6.1974382 , 16.321545  , -8.593432  ,  1.0132635 , -2.2048213 ],
             dtype=float32)                                                    ],
      dtype=object)
table["pred"]=[np.argmax(table[0][i]) for i in range(table.shape[0])]
table

0
1 pred
0 [-1.8004757, -0.17253768, 1.4764961, 3.0824265... 7 7
1 [4.323273, 7.601658, 16.587166, 3.6476722, -6.... 2 2
2 [-2.1820781, 9.377863, 0.7748679, -3.0049446, ... 1 1
3 [13.455704, -9.902006, 2.8586285, -2.2104588, ... 0 0
4 [-2.9572597, -2.5707455, -3.5142026, -1.748683... 4 4
... ... ... ...
9995 [-2.5784128, 10.5256405, 23.895123, 8.827512, ... 2 2
9996 [-2.773907, 0.56169015, 1.6811254, 15.230703, ... 3 3
9997 [-5.575542, -2.2075167, -9.225033, -5.60418, 1... 4 4
9998 [0.5491407, -7.7017508, -5.8287773, 2.2394006,... 5 5
9999 [3.5516088, -8.265893, -0.59651583, -4.034732,... 6 6

10000 rows × 3 columns

13. 对预测错误的样本点进行可视化

mismatch=table[table[1]!=table["pred"]]
mismatch


0 1 pred
247 [-0.28747877, 1.9184055, 8.627771, -3.1354206,... 4 2
340 [-5.550468, 1.6552217, -0.96347404, 9.110174, ... 5 3
449 [-6.0154114, -3.7659, -2.7571707, 14.220249, -... 3 5
582 [-1.4626387, 1.3258317, 10.138913, 5.996572, -... 8 2
659 [-3.1300178, 8.830592, 8.781635, 5.6512327, -3... 2 1
... ... ... ...
9768 [2.6190603, -5.539648, 3.0145228, 4.8416886, -... 2 3
9770 [7.0385275, -9.72994, 0.03886398, -0.3356622, ... 5 6
9792 [-0.84618676, -0.038114145, -4.388391, 0.12577... 4 9
9904 [1.6193992, -7.525599, 2.833153, 3.7744582, -2... 2 8
9982 [0.8662107, -7.932593, -0.3750058, 1.9749051, ... 5 6

158 rows × 3 columns

from matplotlib import pyplot as plt
plt.scatter(mismatch[1],mismatch["pred"])


<matplotlib.collections.PathCollection at 0x217dc403490>

14. 看看错误样本被预测为哪些数据

mismatch[mismatch[1]==8].sort_values("pred").index
Int64Index([4807, 2896,  582, 6625, 7220, 3871, 4123, 1878, 1319, 2179, 4601,
            4956, 3023, 9280, 8408, 6765, 4497, 1530,  947],
           dtype='int64')
table.iloc[4500,:]
0       [-4.9380565, 6.2523484, -1.2272537, 0.32682633...
1                                                       9
pred                                                    1
Name: 4500, dtype: object
idx_lst=mismatch[mismatch[1]==8].sort_values("pred").index.values
idx_lst,len(idx_lst)
(array([4807, 2896,  582, 6625, 7220, 3871, 4123, 1878, 1319, 2179, 4601,
        4956, 3023, 9280, 8408, 6765, 4497, 1530,  947], dtype=int64),
 19)
mismatch[mismatch[1]==8].sort_values("pred")
0 1 pred
4807 [5.3192024, -4.2546616, 3.6083155, 3.8956034, ... 8 0
2896 [7.4840407, -8.972937, 0.9461607, 1.6278361, -... 8 0
582 [-1.4626387, 1.3258317, 10.138913, 5.996572, -... 8 2
6625 [-5.413072, 2.7984824, 6.0430045, 2.3938487, 0... 8 2
7220 [-3.1443837, -3.4629154, 4.8560658, 12.752452,... 8 3
3871 [0.1749076, -5.8143945, 3.083826, 8.113558, -5... 8 3
4123 [-3.8682778, -2.290763, 6.1067047, 10.920237, ... 8 3
1878 [-2.8437655, -2.4290323, 3.1861248, 9.739316, ... 8 3
1319 [3.583813, -6.279593, -0.21310738, 7.2746606, ... 8 3
2179 [-0.57300043, -3.8434098, 8.02766, 12.139142, ... 8 3
4601 [-9.5640745, -2.1305811, -5.2161045, 2.3105593... 8 4
4956 [-7.5286517, -4.080871, -6.850239, -2.9094412,... 8 4
3023 [-2.6319933, -11.065216, -1.3231966, 0.0415189... 8 5
9280 [-1.9706918, -11.544259, -0.51283014, 3.955923... 8 5
8408 [1.0573181, -3.7079592, 0.34973174, -0.3489528... 8 6
6765 [2.8831, -2.6855779, 0.39529848, -1.855415, -2... 8 6
4497 [-4.830113, -0.28656, 4.911254, 4.4041815, -2.... 8 7
1530 [-4.4495664, -2.5381584, 5.4418654, 9.994939, ... 8 7
947 [-2.8835857, -8.3713045, -1.5150836, 3.1263702... 8 9
import numpy as np
img=np.stack(list(test_dataset[idx_lst[i]][0][0] for i in range(5)),axis=1).reshape(28,28*5)
plt.imshow(img)
<matplotlib.image.AxesImage at 0x217dc28e9d0>


#显示3行
import numpy as np
img30=np.stack(
    tuple(np.stack(
            tuple(test_dataset[idx_lst[i+j*5]][0][0] for i in range(5)),
        axis=1).reshape(28,28*5) for j in range(3)),axis=0).reshape(28*3,28*5)
plt.imshow(img30)
plt.axis('off')
(-0.5, 139.5, 83.5, -0.5)

arr2=table.iloc[idx_lst[:30],2].values
arr2
array([0, 0, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 9],
      dtype=int64)


目录
相关文章
|
5天前
|
机器学习/深度学习 人工智能 算法
猫狗宠物识别系统Python+TensorFlow+人工智能+深度学习+卷积网络算法
宠物识别系统使用Python和TensorFlow搭建卷积神经网络,基于37种常见猫狗数据集训练高精度模型,并保存为h5格式。通过Django框架搭建Web平台,用户上传宠物图片即可识别其名称,提供便捷的宠物识别服务。
111 55
|
1月前
|
Python
Python中的异步编程:使用asyncio和aiohttp实现高效网络请求
【10月更文挑战第34天】在Python的世界里,异步编程是提高效率的利器。本文将带你了解如何使用asyncio和aiohttp库来编写高效的网络请求代码。我们将通过一个简单的示例来展示如何利用这些工具来并发地处理多个网络请求,从而提高程序的整体性能。准备好让你的Python代码飞起来吧!
74 2
|
15天前
|
机器学习/深度学习 人工智能 算法
【宠物识别系统】Python+卷积神经网络算法+深度学习+人工智能+TensorFlow+图像识别
宠物识别系统,本系统使用Python作为主要开发语言,基于TensorFlow搭建卷积神经网络算法,并收集了37种常见的猫狗宠物种类数据集【'阿比西尼亚猫(Abyssinian)', '孟加拉猫(Bengal)', '暹罗猫(Birman)', '孟买猫(Bombay)', '英国短毛猫(British Shorthair)', '埃及猫(Egyptian Mau)', '缅因猫(Maine Coon)', '波斯猫(Persian)', '布偶猫(Ragdoll)', '俄罗斯蓝猫(Russian Blue)', '暹罗猫(Siamese)', '斯芬克斯猫(Sphynx)', '美国斗牛犬
93 29
【宠物识别系统】Python+卷积神经网络算法+深度学习+人工智能+TensorFlow+图像识别
|
15天前
|
机器学习/深度学习 人工智能 算法
深度学习入门:用Python构建你的第一个神经网络
在人工智能的海洋中,深度学习是那艘能够带你远航的船。本文将作为你的航标,引导你搭建第一个神经网络模型,让你领略深度学习的魅力。通过简单直观的语言和实例,我们将一起探索隐藏在数据背后的模式,体验从零开始创造智能系统的快感。准备好了吗?让我们启航吧!
42 3
|
20天前
|
网络安全 Python
Python网络编程小示例:生成CIDR表示的IP地址范围
本文介绍了如何使用Python生成CIDR表示的IP地址范围,通过解析CIDR字符串,将其转换为二进制形式,应用子网掩码,最终生成该CIDR块内所有可用的IP地址列表。示例代码利用了Python的`ipaddress`模块,展示了从指定CIDR表达式中提取所有IP地址的过程。
35 6
|
23天前
|
机器学习/深度学习 自然语言处理 语音技术
Python在深度学习领域的应用,重点讲解了神经网络的基础概念、基本结构、训练过程及优化技巧
本文介绍了Python在深度学习领域的应用,重点讲解了神经网络的基础概念、基本结构、训练过程及优化技巧,并通过TensorFlow和PyTorch等库展示了实现神经网络的具体示例,涵盖图像识别、语音识别等多个应用场景。
48 8
|
24天前
|
机器学习/深度学习 人工智能 自然语言处理
深度学习中的卷积神经网络(CNN): 从理论到实践
本文将深入浅出地介绍卷积神经网络(CNN)的工作原理,并带领读者通过一个简单的图像分类项目,实现从理论到代码的转变。我们将探索CNN如何识别和处理图像数据,并通过实例展示如何训练一个有效的CNN模型。无论你是深度学习领域的新手还是希望扩展你的技术栈,这篇文章都将为你提供宝贵的知识和技能。
76 7
|
22天前
|
数据采集 XML 存储
构建高效的Python网络爬虫:从入门到实践
本文旨在通过深入浅出的方式,引导读者从零开始构建一个高效的Python网络爬虫。我们将探索爬虫的基本原理、核心组件以及如何利用Python的强大库进行数据抓取和处理。文章不仅提供理论指导,还结合实战案例,让读者能够快速掌握爬虫技术,并应用于实际项目中。无论你是编程新手还是有一定基础的开发者,都能在这篇文章中找到有价值的内容。
|
25天前
|
机器学习/深度学习 人工智能 数据挖掘
打破传统:机器学习与神经网络获2024年诺贝尔物理学奖引发的思考
诺贝尔物理学奖首次授予机器学习与神经网络领域,标志该技术在物理学研究中的重要地位。本文探讨了这一决定对物理学研究的深远影响,包括数据分析、理论物理突破及未来科研方向的启示,同时分析了其对学术跨界合作与全球科研产业的影响。
48 4
|
27天前
|
机器学习/深度学习 人工智能 自然语言处理
深度学习中的卷积神经网络(CNN)及其在图像识别中的应用
本文旨在通过深入浅出的方式,为读者揭示卷积神经网络(CNN)的神秘面纱,并展示其在图像识别领域的实际应用。我们将从CNN的基本概念出发,逐步深入到网络结构、工作原理以及训练过程,最后通过一个实际的代码示例,带领读者体验CNN的强大功能。无论你是深度学习的初学者,还是希望进一步了解CNN的专业人士,这篇文章都将为你提供有价值的信息和启发。