博客
关于我
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/

你可能感兴趣的文章
mysql以下日期函数正确的_mysql 日期函数
查看>>
mysql以服务方式运行
查看>>
mysql优化--索引原理
查看>>
MySQL优化配置详解
查看>>
mysql会员求积分_MySql-统计所有会员的最高前10次的积分和
查看>>
MySQL保姆级教程(SQL语法基础篇)从小白到高手的进阶指南,收藏这一篇就够了
查看>>
MySQL修改密码报错ERROR 1396 (HY000): Operation ALTER USER failed for ‘root‘@‘localhost‘
查看>>
Mysql全局优化参数
查看>>
MySQL全文索引实现简单版搜索引擎
查看>>
MySQL全面瓦解:安装部署与准备
查看>>
MySQL内存表使用技巧
查看>>
MySQL再叙(体系结构、存储引擎、索引、SQL执行过程)
查看>>
MySQL函数
查看>>
mysql函数汇总之数学函数
查看>>
mysql函数汇总之日期和时间函数
查看>>
mysql函数汇总之条件判断函数
查看>>
mysql函数汇总之系统信息函数
查看>>
MySQL函数简介
查看>>
mysql函数遍历json数组
查看>>
MySQL函数(转发)
查看>>