You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! this is more of a question for the elegant work you have here but less of an issue.
So when you take cosine similarity (which is to be decreased during training) between two feature maps, you take,
loss = torch.cosine_similarity((adv_out_slice*attention).reshape(adv_out_slice.shape[0], -1),
(img_out_slice*attention).reshape(img_out_slice.shape[0], -1)).mean()
and that's to compare two flatten vectors, each of which is the flattened feature maps of size (N feature channels, width, height).
I wonder why not comparing the flattened feature maps with respect to each channel, and then take the average across channels? To me, you're comparing two vectors that are (Nwidthheight)-dimensional, which is not so straightforward to me. Thanks in advance for any intuition behind!
The text was updated successfully, but these errors were encountered:
Hi @juliuswang0728, thanks for your attention to our paper. For the issue you mentioned, we actually did not study it in depth, because we think the goals of these two calculation methods are similar.
Hi! this is more of a question for the elegant work you have here but less of an issue.
So when you take cosine similarity (which is to be decreased during training) between two feature maps, you take,
and that's to compare two flatten vectors, each of which is the flattened feature maps of size (N feature channels, width, height).
I wonder why not comparing the flattened feature maps with respect to each channel, and then take the average across channels? To me, you're comparing two vectors that are (Nwidthheight)-dimensional, which is not so straightforward to me. Thanks in advance for any intuition behind!
The text was updated successfully, but these errors were encountered: