Comments (4)
同学你好,关于convolution stem的使用需要考虑到两点:
- convolution stem本身结构是有效的,当然现在比较好的设计是volo里面的堆叠三层conv bn relu,你这个一层效果不会特别显著
- 最根本的原因在于你新加的conv层没有预训练而是随机初始化,而vit的其他层全部都是ImageNet预训练的,导致网络输入全部错乱了,因此产生了掉点
你可以做以下实验来验证一下:
- 均不用ImageNet预训练参数,全部从头随机初始化来训练,看看加入conv之后是否有效
- 按照vit官方训练代码,加入conv之后你在ImageNet重新预训练模型,看看加入conv之后是否有效
另外额外补充一下,我们近期的工作表明,patch embed里面bn+relu是帮助vit训练的关键,conv层作用反而不是那么大,可以参考我们最近的论文:Scaled ReLU Matters for Training Vision Transformers
from transreid.
个人一点点分析
1 首先你的卷积核还是比较大的,在overlap时候可能会丢失部分感受野中比较重要的特征块,可以尝试使用的更小的卷积一块一块有的滑动处理操作更符合patch embed的特点。而且patch embed中最后的conv主要是用于通道修改操作。
2 个人觉得可以在这里可以尝试一下max Pooling 或者avg pooling替换卷积试试。
from transreid.
请问如果想在ImageNet重新预训练模型,有官方教程地址吗?感谢感谢
from transreid.
请问如果想在ImageNet重新预训练模型,有官方教程地址吗?感谢感谢
可以用timm库,很多人都用这个。
from transreid.
Related Issues (20)
- 关于学习率调整 HOT 1
- 随着训练过程模型性能变化 HOT 3
- Inference on custom data
- 注意力可视化中需要对针对Overlapping Patches做处理吗 以及可视化的哪一层 HOT 1
- 使用其他损失函数 HOT 1
- RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)` HOT 3
- RuntimeError: CUDA error: device-side assert triggered when testing trained custom data HOT 1
- 复现vehicleID结果 HOT 10
- 由特征表示可视化图像是怎么做的? HOT 5
- Vehicleid.py代码中query与gallery划分问题
- Questions about grad\param and Performance
- Weight of Trained Models Release
- Hello!! AssertionError: Error: all query identities do not appear in gallery HOT 1
- 对ViT骨干网络细微改动后性能大幅下降 HOT 2
- how to get the feature of one image? HOT 2
- 有人实现了在Occlude-reid上运行的dataloader吗,感谢[email protected]
- Patch Shuffle Operation HOT 1
- Merge different entities!!! HOT 1
- The size of tensor a (6) must match the size of tensor b (160) at non-singleton dimension 0 HOT 5
- KeyError: 'base.cls_token' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transreid.