ReXNet学习笔记 --- ReXNet: Diminishing Representational Bottleneck on Convolutional Neural Network

论文:https://arxiv.org/pdf/2007.00992.pdf
代码:https://github.com/clovaai/rexnet

挺久没有看新论文了,,只有学习才能让我快乐!!

使用方法

import torch
import rexnetv1

# 定义模型,默认是最后输出维度为1000的向量(看源码)
model = rexnetv1.ReXNetV1(width_mult=2.0).cuda()
# 加载预训练模型
model.load_state_dict(torch.load('./rexnetv1_2.0x.pth'))
# 重新定义网络输出最后一层,用于102分类
    model.output = nn.Sequential(
        nn.Dropout(0.2),
        nn.Conv2d(1280, 102, 1, bias=True))
model.train()
......
model.eval()
print(model(torch.randn(1, 3, 224, 224).cuda()))

摘要

针对深度网络中存在的表达瓶颈问题,该文提出了一组用于提升模型性能的设计准则。作者认为:传统的网络架构设计范式会产生表达瓶颈问题,进而影响模型的性能。为研究表达瓶颈问题,作者研究了上万随机网络生成的特征的matric rank,同时进一步研究了网络的层通道配置方案。基于前述研究发现,作者提出了一组简单而有效的设计原则消除表达瓶颈问题。在基准网络上采用上述设计原则进行轻微调整即可取得ImageNet上的性能显著提升;此外,COCO目标检测与迁移学习的实验更进一步验证了所提方案的有效性:消除表达瓶颈问题有助于提升模型性能

介绍

对研究人员和从业人员而言,对有效的所谓轻量级网络进行建模是计算机视觉中最重要的问题之一。 先前提出的有效模型[13、41、12、48](Mobilenetv1-3,Efficientnet)试图通过关注计算效率来寻找便宜的网络设计(例如,缩小通道尺寸),从而显示出在计算成本和准确性之间有希望的取舍。

本文旨在找出上述方法所遵循的网络设计原则中缺失的、代表性的瓶颈。作为先驱者,[46]从概念上引入了通道维数极度压缩所导致的代表性瓶颈。作者认为前馈网络是一个无环图,从输入到输出的信息流会受到结构设计的阻碍,如极端压缩。在语言建模中,[55]作为一项里程碑式的工作,首次揭示了在softmax层存在的代表性瓶颈——softmax瓶颈。证明了有界矩阵秩引起的代表性瓶颈,并通过在线性软件上附加非线性扩展秩来解决。后辈[19,7]也观察到softmax层的低级别会导致代表性瓶颈,降低模型的整体性能。

在上述开创性工作的基础上更进一步,我们研究了网络整个层的代表性瓶颈。我们首先展示了一些层在编码能力有限的情况下产生的区分特征被认为是代表性的瓶颈。利用中间特征的矩阵秩分析提供了一个简单的理论支持。同时,通过随机生成的网络对代表性瓶颈进行了实证研究,验证了权值的矩阵秩与模型的性能直接相关。通过这些证据,我们提出了一套新的设计原则来提高模型的实际性能:1)扩大一层的输入通道尺寸(尺寸);2)具有适当的非线性;3)设计一个有许多扩展层的网络。

最后,我们根据设计原则提出了新的秩扩展网络模型。事实证明,对基线模型进行简单的修改可以显著提高ImageNet分类的性能。我们的模型甚至超过了那些由需要大量计算资源的神经结构搜索(NAS)找到结构的最新网络。因此,这项工作将鼓励NAS领域的研究人员采用我们简单而有效的设计原则来进一步提高性能。ImageNet分类的性能改进很好地转移到COCO数据集[25]上的目标检测和各种细粒度分类任务上,显示了我们的模型作为一个强大的特征提取器的有效性。

论文贡献是:通过数学和实证研究调查网络中发生的代表性瓶颈问题(2);改进网络架构的新设计原则(3);在ImageNet数据集[40]上的最新结果以及在COCO检测[25]和四种不同的细粒度分类上显著的转移学习结果(4)。

未完~~

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
Sure, I can help you with that! Here's how you can perform an elbow analysis to determine the optimal number of clusters for your k-means model: 1. Load the necessary libraries and data: ``` library(tidyverse) library(cluster) df <- read.csv("healthcare_data.csv", header = TRUE) ``` 2. Clean and prepare the data by selecting only the relevant columns and removing any missing values: ``` df_clean <- df %>% select(Life.Expectancy, Healthcare.Spending) %>% drop_na() ``` 3. Scale the data to ensure that both variables have equal influence on the clustering: ``` df_scaled <- scale(df_clean) ``` 4. Run the k-means algorithm for a range of cluster values (e.g. 1 to 10) and calculate the total within-cluster sum of squares (WSS) for each: ``` wss <- sapply(1:10, function(k){ kmeans(df_scaled, k, nstart = 10)$tot.withinss }) ``` 5. Plot the WSS values against the number of clusters and identify the "elbow" point where adding more clusters does not significantly reduce the WSS: ``` plot(1:10, wss, type = "b", pch = 19, frame = FALSE, xlab = "Number of clusters K", ylab = "Total within-clusters sum of squares") ``` 6. Based on the plot, select the optimal number of clusters for your k-means model. The "elbow" point is usually where the curve starts to flatten out, indicating diminishing returns from adding more clusters. Here's the complete R code for performing an elbow analysis on the healthcare spending and life expectancy data: ``` library(tidyverse) library(cluster) # Load data df <- read.csv("healthcare_data.csv", header = TRUE) # Clean and prepare data df_clean <- df %>% select(Life.Expectancy, Healthcare.Spending) %>% drop_na() df_scaled <- scale(df_clean) # Elbow analysis wss <- sapply(1:10, function(k){ kmeans(df_scaled, k, nstart = 10)$tot.withinss }) plot(1:10, wss, type = "b", pch = 19, frame = FALSE, xlab = "Number of clusters K", ylab = "Total within-clusters sum of squares") ``` I hope this helps you determine the optimal number of clusters for your k-means model!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值