Comments (7)
感觉你需要先观察一下,是不是训练加速了,但是测试准确率下降了。如果是这种情况,可能是用了GC之后训练过快导致了overfitting,因为小网络太好优化了。你可以增大weight_decay, 或者尝试用一下SGD_GCC,只在卷积层使用。
from gradient-centralization.
感觉你需要先观察一下,是不是训练加速了,但是测试准确率下降了。如果是这种情况,可能是用了GC之后训练过快导致了overfitting,因为小网络太好优化了。你可以增大weight_decay, 或者尝试用一下SGD_GCC,只在卷积层使用。
首先感谢作者这么快的回复!没有overfitting的情况出现,我的total epoch是250,很巧合的是,用SGD_GC前后,都是第57个epoch训练准确率到达90,第85个到达95,最后training accuracy同样都到达了99.7,所以好像是没有加速的,应该也不算overfitting。
还有我想问,SGD_GC和SGD_GCC有什么区别,分别在什么情况下使用?再次感谢!
from gradient-centralization.
感觉你需要先观察一下,是不是训练加速了,但是测试准确率下降了。如果是这种情况,可能是用了GC之后训练过快导致了overfitting,因为小网络太好优化了。你可以增大weight_decay, 或者尝试用一下SGD_GCC,只在卷积层使用。
哦对了,我看post的code是在imagenet数据集上implement的,weight decay是1e-4;我的数据集大概29000训练集,测试集4000,weight decay设置的5e-4,这样够吗?还是需要再设置大点?
谢谢作者的回复!
from gradient-centralization.
也可能是网络太小,还没有过参数化的缘故。SGD_GC和SGD_GCC的区别是后者只在卷积层加GC,前者卷积和FC都加GC。有时候可能是需要调调weight decay 和 lr。
from gradient-centralization.
@ZangHuanyu 您好,我遇到了和您一样的问题,应用SGD_GC后,测试精度基本一样,甚至还低了,weight decay设置的5e-4,您后面有做什么修改解决了这个问题吗
from gradient-centralization.
@ZangHuanyu 您好,我遇到了和您一样的问题,应用SGD_GC后,测试精度基本一样,甚至还低了,weight decay设置的5e-4,您后面有做什么修改解决了这个问题吗
抛开任务谈参数是没有意义的,大概讲一下我的任务和参数
我之前用的SGD,后来改用了SGD_GC,针对我的任务,基本上SGD_GC比GCC表现都好,但是比起SGD提升也不明显,比如我的任务最后准确率大概都是72%左右,用了SGD_GC提升0.1个0.2个百分点这样。打算把这个作为最后一个超参数试一下
数据集大概29000训练集,测试集4000,一个基于ResNet的改进结构,50 layers,weight decay设置的5e-4,学习率是0.1,用的是Cosine with warm restart调节学习率
准确率和参数都是仅供参考,每个任务每个数据集,参数都不一样,还是得自己实验
from gradient-centralization.
@ZangHuanyu 您好,我遇到了和您一样的问题,应用SGD_GC后,测试精度基本一样,甚至还低了,weight decay设置的5e-4,您后面有做什么修改解决了这个问题吗
抛开任务谈参数是没有意义的,大概讲一下我的任务和参数
我之前用的SGD,后来改用了SGD_GC,针对我的任务,基本上SGD_GC比GCC表现都好,但是比起SGD提升也不明显,比如我的任务最后准确率大概都是72%左右,用了SGD_GC提升0.1个0.2个百分点这样。打算把这个作为最后一个超参数试一下
数据集大概29000训练集,测试集4000,一个基于ResNet的改进结构,50 layers,weight decay设置的5e-4,学习率是0.1,用的是Cosine with warm restart调节学习率
准确率和参数都是仅供参考,每个任务每个数据集,参数都不一样,还是得自己实验
嗯嗯,好的,感谢您地回复和耐心指导
from gradient-centralization.
Related Issues (14)
- CG方法只能针对conv层和FC层做梯度中心化吗? HOT 2
- 可以直接使用在3D卷积网络里吗? HOT 1
- Question regarding GC for convolutions HOT 1
- licence
- 请问该方法在以transformer为主结构的目标检测任务中有效吗
- function grad.mean() Error HOT 1
- Does this work for Conv1d? HOT 1
- Is it ok to use GC with weight decay in style of AdamW? HOT 2
- Should i use pytorch gradient clippping with gradient centralization? HOT 2
- Consider RAdam as the successor of Adam HOT 2
- 训练非常慢 HOT 3
- 关于语义分割的问题 HOT 3
- incorrect keywords: memory_format HOT 2
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 gradient-centralization.