cfzd / FcaNet

FcaNet: Frequency Channel Attention Networks
MIT License
508 stars 100 forks source link

Official code for FCANet? #1

Closed Senwang98 closed 3 years ago

Senwang98 commented 3 years ago

Hi, @cfzd I have paid attention to FCANet from last year, so is this official code?

cfzd commented 3 years ago

@1187697147 Yes, it is : )

Senwang98 commented 3 years ago

@cfzd, Thanks for your reply! I found that FCANet must set dct_w/h when initliaze the model, Is there any way to adapt the input size?

cfzd commented 3 years ago

@1187697147 FcaNet could support arbitrary input size. I have made a commit to fix the bug. You can try it with(you might need to delete the old cached file to make the torch hub update new code):

import torch
model = torch.hub.load('cfzd/FcaNet', 'fca50' ,pretrained=True)
x = torch.zeros(1,3,224,224)
y = model(x)
x = torch.zeros(1,3,300,300)
y = model(x)
Senwang98 commented 3 years ago

@cfzd Okay, I will try and thanks for your work!