landskape-ai / triplet-attention

Official PyTorch Implementation for "Rotate to Attend: Convolutional Triplet Attention Module." [WACV 2021]
https://openaccess.thecvf.com/content/WACV2021/html/Misra_Rotate_to_Attend_Convolutional_Triplet_Attention_Module_WACV_2021_paper.html
MIT License
406 stars 49 forks source link

torch.cat( (torch.max(x, 1)[0].unsqueeze(1), torch.mean(x, 1).unsqueeze(1)), dim=1 ) #19

Closed Niki173 closed 2 years ago

Niki173 commented 2 years ago

triplet-attention.py

Hi,Run this file and find inconsistent dimensions

I wonder if there is a problem here

torch.cat( (torch.max(x, 1)[0].unsqueeze(1), torch.mean(x, 1).unsqueeze(1)), dim=1 )

it should be torch.cat( (torch.max(x, 1).unsqueeze(1), torch.mean(x, 1).unsqueeze(1)), dim=1 )

right?

digantamisra98 commented 2 years ago

@Niki173 apologies for the delay in response, for Z-pool, we follow the same code as that given in CBAM