python框架和模型库_一个pytorch库,拥有最先进的架构,预训练模型和实时更新结果...

2023-10-26

PytorchInsight

This is a pytorch lib with state-of-the-art architectures, pretrained models and real-time updated results.

This repository aims to accelarate the advance of Deep Learning Research, make reproducible results and easier for doing researches, and in Pytorch.

Including Papers (to be updated):

Attention Models

SENet: Squeeze-and-excitation Networks

SKNet: Selective Kernel Networks

CBAM: Convolutional Block Attention Module

GCNet: GCNet: Non-local Networks Meet Squeeze-Excitation Networks and Beyond

BAM: Bottleneck Attention Module

SGENet: Spatial Group-wise Enhance: Enhancing Semantic Feature Learning in Convolutional Networks

SRMNet: SRM: A Style-based Recalibration Module for Convolutional Neural Networks

Non-Attention Models

OctNet: Drop an Octave: Reducing Spatial Redundancy in Convolutional Neural Networks with Octave Convolution

imagenet_tricks.py: Bag of Tricks for Image Classification with Convolutional Neural Networks

Understanding the Disharmony between Weight Normalization Family and Weight Decay: e-shifted L2 Regularizer

Generalization Bound Regularizer: A Unified Framework for Understanding Weight Decay

mixup: Beyond Empirical Risk Minimization

CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features

Trained Models and Performance Table

Single crop validation error on ImageNet-1k (center 224x224 crop from resized image with shorter side = 256).

classifiaction training settings for media and large models

Details

RandomResizedCrop, RandomHorizontalFlip; 0.1 init lr, total 100 epochs, decay at every 30 epochs; SGD with naive softmax cross entropy loss, 1e-4 weight decay, 0.9 momentum, 8 gpus, 32 images per gpu

Examples

ResNet50

Note

The newest code adds one default operation: setting all bias wd = 0, please refer to the theoretical analysis of "Generalization Bound Regularizer: A Unified Framework for Understanding Weight Decay" (to appear), thereby the training accuracy can be slightly boosted

classifiaction training settings for mobile/small models

Details

RandomResizedCrop, RandomHorizontalFlip; 0.4 init lr, total 300 epochs, 5 linear warm up epochs, cosine lr decay; SGD with softmax cross entropy loss and label smoothing 0.1, 4e-5 weight decay on conv weights, 0 weight decay on all other weights, 0.9 momentum, 8 gpus, 128 images per gpu

Examples

ShuffleNetV2

Typical Training & Testing Tips:

Small Models

ShuffleNetV2_1x

python -m torch.distributed.launch --nproc_per_node=8 imagenet_mobile.py --cos -a shufflenetv2_1x --data /path/to/imagenet1k/ \

--epochs 300 --wd 4e-5 --gamma 0.1 -c checkpoints/imagenet/shufflenetv2_1x --train-batch 128 --opt-level O0 --nowd-bn # Triaing

python -m torch.distributed.launch --nproc_per_node=2 imagenet_mobile.py -a shufflenetv2_1x --data /path/to/imagenet1k/ \

-e --resume ../pretrain/shufflenetv2_1x.pth.tar --test-batch 100 --opt-level O0 # Testing, ~69.6% top-1 Acc

Large Models

SGE-ResNet

python -W ignore imagenet.py -a sge_resnet101 --data /path/to/imagenet1k/ --epochs 100 --schedule 30 60 90 \

--gamma 0.1 -c checkpoints/imagenet/sge_resnet101 --gpu-id 0,1,2,3,4,5,6,7 # Training

python -m torch.distributed.launch --nproc_per_node=8 imagenet_fast.py -a sge_resnet101 --data /path/to/imagenet1k/ \

--epochs 100 --schedule 30 60 90 --wd 1e-4 --gamma 0.1 -c checkpoints/imagenet/sge_resnet101 --train-batch 32 \

--opt-level O0 --wd-all --label-smoothing 0. --warmup 0 # Training (faster)

python -W ignore imagenet.py -a sge_resnet101 --data /path/to/imagenet1k/ --gpu-id 0,1 -e --resume ../pretrain/sge_resnet101.pth.tar \

# Testing ~78.8% top-1 Acc

python -m torch.distributed.launch --nproc_per_node=2 imagenet_fast.py -a sge_resnet101 --data /path/to/imagenet1k/ -e --resume \

../pretrain/sge_resnet101.pth.tar --test-batch 100 --opt-level O0 # Testing (faster) ~78.8% top-1 Acc

WS-ResNet with e-shifted L2 regularizer, e = 1e-3

python -m torch.distributed.launch --nproc_per_node=8 imagenet_fast.py -a ws_resnet50 --data /share1/public/public/imagenet1k/ \

--epochs 100 --schedule 30 60 90 --wd 1e-4 --gamma 0.1 -c checkpoints/imagenet/es1e-3_ws_resnet50 --train-batch 32 \

--opt-level O0 --label-smoothing 0. --warmup 0 --nowd-conv --mineps 1e-3 --el2

Results of "SGENet: Spatial Group-wise Enhance: Enhancing Semantic Feature Learning in Convolutional Networks"

Note the following results (old) do not set the bias wd = 0 for large models

Classification

Model

#P

GFLOPs

Top-1 Acc

Top-5 Acc

Download1

Download2

log

Detection

Model

#p

GFLOPs

Detector

Neck

AP50:95 (%)

AP50 (%)

AP75 (%)

Download

ResNet50

23.51M

88.0

Faster RCNN

FPN

37.5

59.1

40.6

SGE-ResNet50

23.51M

88.1

Faster RCNN

FPN

38.7

60.8

41.7

ResNet50

23.51M

88.0

Mask RCNN

FPN

38.6

60.0

41.9

SGE-ResNet50

23.51M

88.1

Mask RCNN

FPN

39.6

61.5

42.9

ResNet50

23.51M

88.0

Cascade RCNN

FPN

41.1

59.3

44.8

SGE-ResNet50

23.51M

88.1

Cascade RCNN

FPN

42.6

61.4

46.2

ResNet101

42.50M

167.9

Faster RCNN

FPN

39.4

60.7

43.0

SE-ResNet101

47.28M

168.3

Faster RCNN

FPN

40.4

61.9

44.2

SGE-ResNet101

42.50M

168.1

Faster RCNN

FPN

41.0

63.0

44.3

ResNet101

42.50M

167.9

Mask RCNN

FPN

40.4

61.6

44.2

SE-ResNet101

47.28M

168.3

Mask RCNN

FPN

41.5

63.0

45.3

SGE-ResNet101

42.50M

168.1

Mask RCNN

FPN

42.1

63.7

46.1

ResNet101

42.50M

167.9

Cascade RCNN

FPN

42.6

60.9

46.4

SE-ResNet101

47.28M

168.3

Cascade RCNN

FPN

43.4

62.2

47.2

SGE-ResNet101

42.50M

168.1

Cascade RCNN

FPN

44.4

63.2

48.4

Results of "Understanding the Disharmony between Weight Normalization Family and Weight Decay: e-shifted L2 Regularizer"

Note that the following models are with bias wd = 0.

Classification

Model

Top-1

Download

WS-ResNet50

76.74

WS-ResNet50(e = 1e-3)

76.86

WS-ResNet101

78.07

WS-ResNet101(e = 1e-6)

78.29

WS-ResNeXt50(e = 1e-3)

77.88

WS-ResNeXt101(e = 1e-3)

78.80

WS-DenseNet201(e = 1e-8)

77.59

WS-ShuffleNetV1(e = 1e-8)

68.09

WS-ShuffleNetV2(e = 1e-8)

69.70

WS-MobileNetV1(e = 1e-6)

73.60

Results of "Generalization Bound Regularizer: A Unified Framework for Understanding Weight Decay"

To appear

Citation

If you find our related works useful in your research, please consider citing the paper:

@inproceedings{li2019selective,

title={Selective Kernel Networks},

author={Li, Xiang and Wang, Wenhai and Hu, Xiaolin and Yang, Jian},

journal={IEEE Conference on Computer Vision and Pattern Recognition},

year={2019}

}

@inproceedings{li2019spatial,

title={Spatial Group-wise Enhance: Enhancing Semantic Feature Learning in Convolutional Networks},

author={Li, Xiang and Hu, Xiaolin and Xia, Yan and Yang, Jian},

journal={arXiv preprint arXiv:1905.09646},

year={2019}

}

@inproceedings{li2019understanding,

title={Understanding the Disharmony between Weight Normalization Family and Weight Decay: e-shifted L2 Regularizer},

author={Li, Xiang and Chen, Shuo and Yang, Jian},

journal={arXiv preprint arXiv:},

year={2019}

}

@inproceedings{li2019generalization,

title={Generalization Bound Regularizer: A Unified Framework for Understanding Weight Decay},

author={Li, Xiang and Chen, Shuo and Gong, Chen and Xia, Yan and Yang, Jian},

journal={arXiv preprint arXiv:},

year={2019}

}

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

python框架和模型库_一个pytorch库,拥有最先进的架构,预训练模型和实时更新结果... 的相关文章

  • VTK教程1--------VTK在win10下的安装

    VTK的安装 本文在win10操作系统下 安装了VTK8 1 2 下文是安装顺序 事先准备三个软件 1 Visual Studio2017 community 该版本可以免费使用 2 CMake 本文使用的版本是cmake 3 13 1 w
  • XREAL 联合创始人吴克艰谈AR:下一代计算平台及其关键技术

    编者按 一种行业观点是 AR或是未来十年 三十年的革命性技术 是下一代计算平台 近半个世纪 我们总能听到苹果在AR行业的创新动作 开辟了新的硬件范式 AR VR行业为苹果不断欢呼的同时 激发了人们的好奇心 究竟 人类在戴上AR眼镜的那一瞬间
  • 【C++】内存分区&引用

    内存分区 首先我们要了解 内存区域大概分为四个区域 1 代码区 这里主要存放我们写的代码的二进表达式 即CPU可以看懂的机械指令 这个区域有两个特征 只读和共享 前者可以保证代码的不会被随意修改 后者可以保证相同代码多次阅读不需要创建多个副
  • linux-kali 2020.3.3 虚拟机 环境 下载安装

    一 所需环境配置文件下载 1 虚拟机 这次配置环境使用的vmware版本为15 5 0 虚拟机大家可以自行在相关微信公众号上搜索破解版 按照其上进行安装 如下图 如果需要也可以vm官方网站上进行下载相关软件 直接下载对应版本即可 vm官网链
  • python argument 1 must be 2-item sequence, not int

    在继续python学习的时候 发现报错了 出现错误argument 1 must be 2 item sequence not int 明明我是照着书打的 为什么会出现错误呢 import pygame import sys from se
  • 《软件测试》第十三章 软件安全测试

    软件测试 第十三章 软件安全测试 13 0 前言 13 1 战争游戏 电影 13 2 了解动机 13 3 威胁模式分析 13 4 软件安全是一项功能吗 软件漏洞是一个缺陷吗 13 5 了解缓冲区溢出 13 6 使用安全的字符串函数 13 7
  • Microsoft visual C++ 2013 redistributable (x86) setup failed

    Microsoft visual C 2013 redistributable x86 0x80070005 setup failed log 截图 下载SubInACL工具 链接 https blogs msdn microsoft co
  • css flex shrink,CSS3 flex-shrink属性用法详解

    下面本文章来给各位介绍一下CSS3 flex shrink使用方法 希望例子能帮助到各位 flex grow控制flex container有多余空间的时候怎么分配 默认值为0 即所有的flex items都不分配 flex shrink1
  • C#里面SQLite读取数据的操作

    挂载表格时候用 public static DataSet Query string SQLString using SQLiteConnection connection new SQLiteConnection connectionSt
  • BottomNavigationView+ViewPager实现页面滑动

    如图所示 在androidstudio中新建一个Bottom Navigation Activity 修改布局中的内容
  • import无法定位到输入点

    torch geometric安装 运行环境需要torch geometric 下载安装完之后 再 import torch geometric时 一直出错 安装不上 找了很多解决方法 终于找到可以解决的办法了 亲测有效 原因 最终发现因为
  • 最小重量机器设计问题

    相关问题 工作分配问题 设某一机器由n个部件组成 每一种部件都可以从m个不同的供应商处购得 设 wij 是从供应商j 处购得的部件i的重量 cij 是相应的价格 试设计一个回溯算法 给出总价格不超过d的最小重量机器设计 对于给定的机器部件重
  • .net core 并发下的线程安全问题

    抱歉 其实内容并不如题 背景 写测试demo所出现的异常 供大家学习与拍砖 net core webapi项目 做了一个授权的filter 真正的生产项目的话 JWT很棒 单个接口测试没有问题 当用前端在同一个页面调用多个接口的时候 运行服
  • Python语言学习实战-内置函数filter()的使用(附源码和实现效果)

    实现功能 filter 函数是Python的内置函数之一 用于过滤序列中的元素 它接受两个参数 一个是函数 用于判断每个元素是否符合条件 另一个是可迭代对象 包含要过滤的元素 filter 函数返回一个迭代器 其中包含所有符合条件的元素 f
  • Beam:没有模板Haskell的数据库功能!

    作为Haskell Web系列的一部分 我们检查了Persistent和Esqueleto库 这些中的第一个允许您使用特殊语法创建数据库模式 然后 您可以使用Template Haskell生成所有必要的Haskell数据类型和类型的实例
  • R语言 第2章 数据对象与数据读写(2)

    重复序列的创建 rep as factor c yizi1 yinzi2 yinzi3 3 rep 是重复函数 它可以将某一向量重复若干次 使用格式 rep x times 1 length out NA each 1 其中x是预重复的序列
  • win10无法装载iso文件_win10系统打开iso格式文件的四种方法

    许多用户在win10系统中下载一个ISO文件 经常重装系统的小伙伴都知道 iso格式是一种光盘映像的文件格式 Windows10系统自带的虚拟光驱 无需任何软件就可以直接打开ISO文件 如果没有虚拟光驱该怎么打开 接下去分享win10系统打
  • python二元函数图像在线绘制_Python:绘制两个变量的二维函数

    我的功能是 def g R r return np sqrt 2 0 R r r R 1 np sqrt R np sqrt R np sqrt 2 0 r 1 r 1 r 1 0 np sqrt R np sqrt 2 0 1 R np
  • R手册(Tidy+Transform)--缺失处理(naniar and simputation)

    文章目录 naniar 缺失数据摘要 阴影矩阵 可视化缺失值变量分布关系 simputation make imputation simpler for missing data 缺失值是指粗糙数据中由于缺少信息而造成的数据的聚类 分组 删

随机推荐

  • cloudstack GuestNetwork Ingress-Egress rule

    Egress 1 创建 egress 规则 1 向management发出api命令 createEgressFirewallRulecmd 的create 方法 最终在cloud数据库firewall rules表中插一条state Ad
  • 阿里druid-spring-boot-starter 配置,个人整理以及遇到的问题(防止之后找不到)

    简介 什么是Druid Druid是阿里巴巴开源平台上的一个项目 整个项目由数据库连接池 插件框架和SQL解析器组成 该项目主要是为了扩展JDBC的一些限制 可以让程序员实现一些特殊的需求 比如向密钥服务请求凭证 统计SQL信息 SQL性能
  • 服务器上使用screen和linux的基本操作

    临时换源 pip install torch 1 7 1 i https pypi tuna tsinghua edu cn simple some package pip install torch 1 7 1 i http pypi d
  • MATLAB入门到精通(三):常用函数及数学应用

    合集如下 MATLAB入门到精通 一 简介及数据类型 MATLAB入门到精通 二 基本语句及绘图 MATLAB入门到精通 三 常用函数及数学应用 十一 常用函数 11 1 随机数函数 11 1 1 rand 函数 rand 函数用来产生均匀
  • 创建一个React项目实现一个计算器

    使用环境react脚手架 node js create react app 文件名 配置完这些就让我们开始把 count js import React Component from react import store from redu
  • mybatis中的typeAlias

    mybatis 的 xml 文件中需要写类的全限定名 较繁琐 可以配置自动扫描包路径给类配置别名 有两种配置方式 方式一 mybatis config xml 中配置
  • AB32VG1项目之智能晾衣架

    智能晾机架项目 开发过程 前期准备 分离工程 导入工程 安装包 安装最近的rt thread 包 AB32VG1的 SDK包 RISC V GCC工具链 下载 硬件搭建 开发板上的3 3V能否可用的问题 大体的硬件规划 软件设计 控制逻辑设
  • 关于Unrecognized Windows Sockets error: 5: socket write error 错误

    最近有个需求是从A数据库读取数据导入到B数据库 demo的数据量也就几万条 但是遇到了一个非常罕见的问题 后端框架是mybatis plus spring boot 在insertBatch到数据库B时 没有立即报错 而是执行插入了几百条数
  • 小程序通过webView打开H5页面并传参(包含webView业务域名配置)、H5页面实现返回小程序并实现传参

    小程序内嵌webview实现跳转 传参 1 小程序通过webView打开H5页面并传参 2 H5接收小程序传参 H5返回小程序并实现传参 小程序接收H5传参 目录 一 小程序通过webView打开H5页面并传参 1 业务域名 2 在小程序中
  • (转)认识SAP SD销售模式之跨公司销售

    跨公司销售 销售订单的发货工厂对应的公司和销售组织对应的公司不同 比如 9801公司为销售性公司 9901为生产性的公司 当公司9801接到订单后 直接从9901公司发货 如果不通过跨公司销售 需要9801像9901公司下虚拟的采购订单 然
  • win10 下 Linux使用方法笔记

    最近想学习一下比特币源码 官方推荐是在Linux系统下学习 且推荐在win10 下的Linux系统进行编译运行 所以下面将学习过程记录一下 1 参考了这篇文章中的方法 进行安装WSL https www cnblogs com JettTa
  • agoda获取酒店数据

    最近改了改代码 正好解决了一些报错问题 更新出来 个别处会加蜜 数据库以及线程控制 from DBUtils PooledDB import PooledDB import requests import demjson import ti
  • 堆和栈的区别

    1 1内存分配方面 堆 一般由程序员分配释放 若程序员不释放 程序结束时可能由OS回收 注意它与数据结构中的堆是两回事 分配方式是类似于链表 可能用到的关键字如下 new malloc delete free等等 栈 由编译器 Compil
  • leetcode622-设计循环队列

    本题重点 1 选择合适的数据结构 2 针对选择的数据结构判断 空 和 满 这两点是不分先后次序的 在思考时应该被综合起来 事实上 无论我们选择链表还是数组 最终都能实现题中描述的 循环队列 的功能 只不过选择不同结构时 我们面临和需要解决的
  • 不是一个PDF文件或该文件已损坏

    之前用公司电脑打开PDF文档的时候 出现了这样的一种现象 就是提示格式错误 不是一个PDF文件或该文件已被损坏 有三种解决方法 1 有可能是电脑上自带的PDF阅读软件版本太低 出现了不兼容的现象 换个最新的PDF阅读器吧 我用了福昕阅读器很
  • 【死磕NIO】— 探索 SocketChannel 的核心原理

    大家好 我是大明哥 一个专注于 死磕 Java 系列创作的程序员 死磕 Java 系列为作者 chenssy 倾情打造的 Java 系列文章 深入分析 Java 相关技术核心原理及源码 死磕 Java https www cmsblogs
  • oracle不小心将表update修改了如何回滚

    oracle提供了一种闪回的方法 可以将某个时间的数据给还原回来 SELECT FROM T DIS EVENT RELATION TYPE AS OF TIMESTAMP TO TIMESTAMP 2023 08 08 15 31 00
  • python opencv 在线读取网络图片图像资源

    opencv在线读取网络图片图像资源 照例打开opencv3 3 0 python3 6官方文档 https docs opencv org master d8 dfe classcv 1 1VideoCapture html 详解 官方文
  • Adam和AdamW的区别

    Adam 与 Adamw的区别 一句话版本 Adamw 即 Adam weight decate 效果与 Adam L2正则化相同 但是计算效率更高 因为L2正则化需要在loss中加入正则项 之后再算梯度 最后在反向传播 而Adamw直接将
  • python框架和模型库_一个pytorch库,拥有最先进的架构,预训练模型和实时更新结果...

    PytorchInsight This is a pytorch lib with state of the art architectures pretrained models and real time updated results