danet-pytorch icon indicating copy to clipboard operation
danet-pytorch copied to clipboard

torch.max(attention, dim=-1, keepdim=True)[0].expand_as(attention) - attention

Open MorrisXu-Driving opened this issue 3 years ago • 2 comments

This line may reverse the weight. when MAX - Attention, the positions with max attention weight becomes zero. I also did not find relevant information in the paper. Why add this line?

MorrisXu-Driving avatar Apr 14 '21 13:04 MorrisXu-Driving

Did you figure out the issue?

nuaawh avatar Nov 13 '22 12:11 nuaawh

I just deleted this line and do my own experiments with no anomaly spotted.

MorrisXu-Driving avatar Nov 13 '22 14:11 MorrisXu-Driving