We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class MyBertBasedClassifier(nn.Module): def init(self): super().init() self.bert = transformers.AutoModel.from_pretrained('bert-base-uncased') self.head = nn.Linear(768, 2)
def forward(self, **kwargs): out = model(**tokens_info)['pooler_output'] return self.head(out)
clf = MyBertBasedClassifier() clf(**tokens_info)
'''the last string returns an error: TypeError: _forward_unimplemented() got an unexpected keyword argument 'input_ids'
I double-checked an entire code and its equal to the code in the original seminar notebook. Cant understand whats wrong.'''
t understand what
The text was updated successfully, but these errors were encountered:
No branches or pull requests
class MyBertBasedClassifier(nn.Module):
def init(self):
super().init()
self.bert = transformers.AutoModel.from_pretrained('bert-base-uncased')
self.head = nn.Linear(768, 2)
clf = MyBertBasedClassifier()
clf(**tokens_info)
'''the last string returns an error:
TypeError: _forward_unimplemented() got an unexpected keyword argument 'input_ids'
I double-checked an entire code and its equal to the code in the original seminar notebook. Can
t understand what
s wrong.'''The text was updated successfully, but these errors were encountered: