I am trying to do sentiment analysis on a german tweet-data-set with the bert-base-german-cased modell which i imported over transformers from hugginface.
To be able to calculate the predicted probabilities i want to Softmax of Numpy and here does the issue begin.
F.softmax(model(input_ids, attention_mask), dim=1)
I got the error:
ValueError: not enough values to unpack (expected 2, got 1)
Does anyone know, which values are here expected?
All works when i try to run it with:
self.bert = BertModel.from_pretrained(PRE_TRAINED_MODEL_NAME)
getting the error when i switch to
self.bert = AutoModelWithLMHead.from_pretrained("bert-base-german-cased")
As you can probaly see, i am a noob. therefore I please ask for simple and detailed explanations (understandable for a fish :D).
Input_ID' and 'Attention_mask' are output values of the tokenizations process.