BangguWu / ECANet

Code for ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks
MIT License
1.24k stars 197 forks source link

Warnings will be given when i using DDP training #67

Open cspup opened 1 year ago

cspup commented 1 year ago

I added the ECA module to my model , but when I used DDP training i got a warning: UserWarning: Grad strides do not match bucket view strides.
This may indicate grad was not created according to the gradient layout contract, or that the param's strides changed since DDP was constructed.
This is not an error, but may impair performance.
grad.sizes() = [2, 1, 3], strides() = [3, 1, 1]
bucket_view.sizes() = [2, 1, 3], strides() = [3, 3, 1]
I found that it was caused by conv1d in ECA, but i can't fix this warning. Anyone can tell me how to fix this problem?

hefangnan commented 10 months ago

Hi,Did you resolve this problem? I also encountered this problem when I use DDP.