Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

论文阅读《Adaptive Batch Norm》 - 天辰的博客 | Tianchen's Blog #39

Open
A-suozhang opened this issue Oct 18, 2019 · 6 comments

Comments

@A-suozhang
Copy link
Owner

http://a-suozhang.xyz/2019/10/18/AdaBN/

六畳一间のドンキホーテ.

@chentianguang
Copy link

在tensorflow中怎么实现呢?

@A-suozhang
Copy link
Owner Author

A-suozhang commented Sep 10, 2020

在tensorflow中怎么实现呢?

@chentianguang
您好,我个人不是很清楚tensorflow的接口,在pytorch中的batchnorm层是有一个running_mean/var的arg可以配置的,在新domain上可以手动修改,重新积累running_mean/var;此外,pytorch的默认behaviour是在model在train mode的时候依据输入数据,用momentum值滑动平均积累running mean/var,在eval模式时,则使用之前存储的running mean/var

@chentianguang
Copy link

chentianguang commented Sep 11, 2020 via email

@chentianguang
Copy link

chentianguang commented Sep 11, 2020 via email

@A-suozhang
Copy link
Owner Author

我使用tensorflow在训练集上得到训练好的模型,然后通过这行语句 for i in range(2000): model(x_demo,training=True),#此行语句是对x_demo进行预测,x_demo为测试集上的部分数据,测试集与训练集是不同源的数据。 ,使用测试集上的部分数据多次在训练好的模型上预测,最后发现模型在测试集上的效果有所提升,请问AdaBN表达的是这个意思吗? 发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用 发件人: tianchenmailto:notifications@github.com 发送时间: 2020年9月10日 23:21 收件人: A-suozhang/A-suozhang.github.iomailto:A-suozhang.github.io@noreply.github.com 抄送: chentianguangmailto:chen17826834179@outlook.com; Commentmailto:comment@noreply.github.com 主题: Re: [A-suozhang/A-suozhang.github.io] 论文阅读《Adaptive Batch Norm》 - 天辰的博客 | Tianchen's Blog (#39) 在tensorflow中怎么实现呢? 您好,我个人不是很清楚tensorflow的接口,在pytorch中的batchnorm层是有一个running_mean/var的arg可以配置的,在新domain上可以手动修改,重新积累running_mean/var;此外,pytorch的默认behaviour是在model在train mode的时候依据输入数据,用momentum值滑动平均积累running mean/var,在eval模式时,则使用之前存储的running mean/var ― You are receiving this because you commented. Reply to this email directly, view it on GitHub<#39 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQ6FC63BZAJINBSIU6N6I2LSFDVIRANCNFSM4JCH7SVQ.

感觉大致是这个意思…就是在eval的时候在valid集合上独立积累BN的running_mean/var去做inference……(不过我自己测试的话感觉效果比较一般)

@Snail-stack
Copy link

你好,请问一下,这个adabn是怎么实现的啊?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants