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
In the init function of the PEG class, it seems that the groups parameter should be set to in_chans rather than embed_dim, since this is intended to be a depthwise convolution. Although in the current use cases in the file, in_chans and embed_dim are equal, updating this would make the code clearer and more explicit.
# PEG from https://arxiv.org/abs/2102.10882
class PosCNN(nn.Module):
def __init__(self, in_chans, embed_dim=768, s=1):
super(PosCNN, self).__init__()
self.proj = nn.Sequential(nn.Conv2d(in_chans, embed_dim, 3, s, 1, bias=True, groups=embed_dim), )
self.s = s
The text was updated successfully, but these errors were encountered:
In the init function of the PEG class, it seems that the groups parameter should be set to in_chans rather than embed_dim, since this is intended to be a depthwise convolution. Although in the current use cases in the file, in_chans and embed_dim are equal, updating this would make the code clearer and more explicit.
The text was updated successfully, but these errors were encountered: