GithubHelp home page GithubHelp logo

关于math.sqrt(POS) about fcanet HOT 6 CLOSED

cfzd avatar cfzd commented on August 20, 2024
关于math.sqrt(POS)

from fcanet.

Comments (6)

cfzd avatar cfzd commented on August 20, 2024

@Asthestarsfalll
这个其实是DCT基函数的定义,在文章中我们为了简化起见去掉了这些缩放因子。可能直接去掉或者求mean也可以,我们这个地方保持了和一般的DCT一样的运算。

from fcanet.

Asthestarsfalll avatar Asthestarsfalll commented on August 20, 2024

@cfzd
好的,感谢您的回答。
另外请问是否能分享论文中进行单个频率分量实验时的预训练模型和代码,我对此有些思考,想进行下对比实验。
再次感谢您。

from fcanet.

cfzd avatar cfzd commented on August 20, 2024

@Asthestarsfalll
如果想进行单个频率分量实验的话,可以简单的override以下这个函数:

FcaNet/model/layer.py

Lines 5 to 27 in aa5fb63

def get_freq_indices(method):
assert method in ['top1','top2','top4','top8','top16','top32',
'bot1','bot2','bot4','bot8','bot16','bot32',
'low1','low2','low4','low8','low16','low32']
num_freq = int(method[3:])
if 'top' in method:
all_top_indices_x = [0,0,6,0,0,1,1,4,5,1,3,0,0,0,3,2,4,6,3,5,5,2,6,5,5,3,3,4,2,2,6,1]
all_top_indices_y = [0,1,0,5,2,0,2,0,0,6,0,4,6,3,5,2,6,3,3,3,5,1,1,2,4,2,1,1,3,0,5,3]
mapper_x = all_top_indices_x[:num_freq]
mapper_y = all_top_indices_y[:num_freq]
elif 'low' in method:
all_low_indices_x = [0,0,1,1,0,2,2,1,2,0,3,4,0,1,3,0,1,2,3,4,5,0,1,2,3,4,5,6,1,2,3,4]
all_low_indices_y = [0,1,0,1,2,0,1,2,2,3,0,0,4,3,1,5,4,3,2,1,0,6,5,4,3,2,1,0,6,5,4,3]
mapper_x = all_low_indices_x[:num_freq]
mapper_y = all_low_indices_y[:num_freq]
elif 'bot' in method:
all_bot_indices_x = [6,1,3,3,2,4,1,2,4,4,5,1,4,6,2,5,6,1,6,2,2,4,3,3,5,5,6,2,5,5,3,6]
all_bot_indices_y = [6,4,4,6,6,3,1,4,4,5,6,5,2,2,5,1,4,3,5,0,3,1,1,2,4,2,1,1,5,3,3,3]
mapper_x = all_bot_indices_x[:num_freq]
mapper_y = all_bot_indices_y[:num_freq]
else:
raise NotImplementedError
return mapper_x, mapper_y

例如我只想以第0个或第9个频率做实验,那么我只需修改上述函数为:

return [0], [0] # for 0th freq
return [1], [2] # for 9th freq

关于模型的问题,因为总共有49个模型,不是特别容易分享,我可能需要打包上传到Google drive再分享给你。

PS 我们最近也遇到一个新的问题,就是现在论文中单个频率的实验可能会涉及到验证集的问题,我们已经重新跑了这个实验了(重新划分了train和val,并且不涉及原来imagenet的验证集),而且论文也会一并修改掉,我后续上传模型的也应该是这个setting下的。

from fcanet.

Asthestarsfalll avatar Asthestarsfalll commented on August 20, 2024

@cfzd
感谢,49个模型上传过于麻烦,可以只分享文中提到的100个epoch的base model吗?
祝你们实验顺利!

from fcanet.

peterzpy avatar peterzpy commented on August 20, 2024

@Asthestarsfalll

您好,我们的base model直接使用的是pytorch官方提供的预训练模型,在单个频域分量上训练时使用0.02的学习率,对整个模型finetune20个epoch。

from fcanet.

Asthestarsfalll avatar Asthestarsfalll commented on August 20, 2024

@peterzpy 好的,非常感谢!

from fcanet.

Related Issues (20)

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.