Skip to content

Instantly share code, notes, and snippets.

@davidmezzetti
Last active October 20, 2021 14:09
Show Gist options
  • Save davidmezzetti/12212971c7eeaca7621f2aa545444d2d to your computer and use it in GitHub Desktop.
Save davidmezzetti/12212971c7eeaca7621f2aa545444d2d to your computer and use it in GitHub Desktop.
class SimpleEmbeddings(nn.Module):
def __init__(self, embeddings):
super().__init__()
self.embeddings = embeddings
def forward(self, input_ids=None, **kwargs):
return (self.embeddings(input_ids),)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment