cfzd / FcaNet

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

channel groups? #26

Open dreamhua82 opened 2 years ago

dreamhua82 commented 2 years ago

Hi, 请问,如果通道不分组,是不是用以下代码就可以?

def get_dct_filter(self, tile_size_x, tile_size_y, mapper_x, mapper_y, channel): dct_filter = torch.zeros(channel, tile_size_x, tile_sizey) for i in range(channel): for , (u_x, v_y) in enumerate(zip(mapper_x, mapper_y)): for t_x in range(tile_size_x): for t_y in range(tile_size_y): dct_filter[i, t_x, t_y] = self.build_filter(t_x, u_x, tile_size_x) * self.build_filter( t_y, v_y, tile_size_y)

return dct_filter
cfzd commented 2 years ago

@dreamhua82 我不是很明白你的问题,能更详细一点吗?

yangwanglyb commented 1 year ago

Hi, 请问,如果通道不分组,是不是用以下代码就可以?

def get_dct_filter(self, tile_size_x, tile_size_y, mapper_x, mapper_y, channel): dct_filter = torch.zeros(channel, tile_size_x, tile_sizey) for i in range(channel): for , (u_x, v_y) in enumerate(zip(mapper_x, mapper_y)): for t_x in range(tile_size_x): for t_y in range(tile_size_y): dct_filter[i, t_x, t_y] = self.build_filter(t_x, u_x, tile_size_x) * self.build_filter( t_y, v_y, tile_size_y)

return dct_filter

不分组用top1不就可以了吗