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
This part of the xmb is used for the learned positional encoding.
An embedding vector is associated by the network to each position of the input and this vector is then added to the corresponding word embedding during the forward pass of the network.
def forward(self, x):
x = x.view(-1, x.size(-2), x.size(-1))
e = self.embed(x)
h = e.sum(dim=2)
for block in self.h:
h = block(h)
return h
The text was updated successfully, but these errors were encountered: