博客
关于我
pytorch可视化 resnet50特征图
阅读量:82 次
发布时间:2019-02-26

本文共 733 字,大约阅读时间需要 2 分钟。

参考:

Python可视化resnet50所有层特征图使用pytorch中预训练模型,在网络inference的过程中显示特征图的每个通道.文章目录代码input image [1,3,224,224]conv1 [1,64,112,112]bn1_relu [1,64,112,112]maxpool [1,64,56,56]layer1 [1,256,56,56]layer2 [1,512,28,28]layer3 [1,1024,14,14]layer4 [1,2048,7,7]avgpool [1,2048]fc [1,1000]代码import cv2import timeimport osimport matplotlib.pyplot as pltimport torchfrom torch import nnimport torchvision.models as modelsimport torchvision.transforms as transformsimport numpy as npsavepath='vis_resnet50/features_elephant'if not os.path.exists(savepath):    os.mkdir(savepath)def draw_features(width,height,x,savename):    tic=time.time()    fig = plt.figure(figsize=(16, 16))    fig.subplots_adjust(left=0.05, right=0.95, bottom=0.05, top=0.95, wspace

转载地址:http://taxz.baihongyu.com/

你可能感兴趣的文章
Netty:原理架构解析
查看>>
Network Dissection:Quantifying Interpretability of Deep Visual Representations(深层视觉表征的量化解释)
查看>>
Network Sniffer and Connection Analyzer
查看>>
Network 灰鸽宝典【目录】
查看>>
Networkx写入Shape文件
查看>>
NetworkX系列教程(11)-graph和其他数据格式转换
查看>>
Networkx读取军械调查-ITN综合传输网络?/读取GML文件
查看>>
network小学习
查看>>
Netwox网络工具使用详解
查看>>
Net与Flex入门
查看>>
net包之IPConn
查看>>
net发布的dll方法和类显示注释信息(字段说明信息)[图解]
查看>>
Net操作配置文件(Web.config|App.config)通用类
查看>>
NeurIPS(神经信息处理系统大会)-ChatGPT4o作答
查看>>
neuroph轻量级神经网络框架
查看>>
Neutron系列 : Neutron OVS OpenFlow 流表 和 L2 Population(7)
查看>>
NEW DATE()之参数传递
查看>>
New Relic——手机应用app开发达人的福利立即就到啦!
查看>>
new 一个button 然后dispose,最后这个button是null吗???
查看>>
next项目部署到服务器pm2进程守护
查看>>