GithubHelp home page GithubHelp logo

Comments (7)

Yonghongwei avatar Yonghongwei commented on July 24, 2024

感觉你需要先观察一下,是不是训练加速了,但是测试准确率下降了。如果是这种情况,可能是用了GC之后训练过快导致了overfitting,因为小网络太好优化了。你可以增大weight_decay, 或者尝试用一下SGD_GCC,只在卷积层使用。

from gradient-centralization.

ZangHuanyu avatar ZangHuanyu commented on July 24, 2024

感觉你需要先观察一下,是不是训练加速了,但是测试准确率下降了。如果是这种情况,可能是用了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.

ZangHuanyu avatar ZangHuanyu commented on July 24, 2024

感觉你需要先观察一下,是不是训练加速了,但是测试准确率下降了。如果是这种情况,可能是用了GC之后训练过快导致了overfitting,因为小网络太好优化了。你可以增大weight_decay, 或者尝试用一下SGD_GCC,只在卷积层使用。

哦对了,我看post的code是在imagenet数据集上implement的,weight decay是1e-4;我的数据集大概29000训练集,测试集4000,weight decay设置的5e-4,这样够吗?还是需要再设置大点?
谢谢作者的回复!

from gradient-centralization.

Yonghongwei avatar Yonghongwei commented on July 24, 2024

也可能是网络太小,还没有过参数化的缘故。SGD_GC和SGD_GCC的区别是后者只在卷积层加GC,前者卷积和FC都加GC。有时候可能是需要调调weight decay 和 lr。

from gradient-centralization.

LY54 avatar LY54 commented on July 24, 2024

@ZangHuanyu 您好,我遇到了和您一样的问题,应用SGD_GC后,测试精度基本一样,甚至还低了,weight decay设置的5e-4,您后面有做什么修改解决了这个问题吗

from gradient-centralization.

ZangHuanyu avatar ZangHuanyu commented on July 24, 2024

@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.

LY54 avatar LY54 commented on July 24, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.