title: How to fix “ValueError: not enough values to unpack (expected 2, got 1)”
body: <p>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.</p>
  
  <p>To be able to calculate the predicted probabilities i want to Softmax of Numpy and here does the issue begin. </p>
  
  <pre><code>F.softmax(model(input_ids, attention_mask), dim=1)
  </code></pre>
  
  <p>I got the error:</p>
  
  <pre><code>ValueError: not enough values to unpack (expected 2, got 1)
  </code></pre>
  
  <p>Does anyone know, which values are here expected? </p>
  
  <p>All works  when i try to run it with:</p>
  
  <pre><code>self.bert = BertModel.from_pretrained(PRE_TRAINED_MODEL_NAME)
  </code></pre>
  
  <p>getting the error when i switch to </p>
  
  <pre><code>self.bert = AutoModelWithLMHead.from_pretrained("bert-base-german-cased")
  </code></pre>
  
  <p>As you can probaly see, i am a noob. therefore I please ask for simple and detailed explanations (understandable for a fish :D). </p>
  
  <p><a href="https://i.stack.imgur.com/lzmuB.png" rel="noreferrer">Code 0</a></p>
  
  <p><a href="https://i.stack.imgur.com/YY80e.png" rel="noreferrer">Code 1</a></p>
  
  <p><a href="https://i.stack.imgur.com/NX62A.png" rel="noreferrer">Code 2</a></p>
  
  <p>Input_ID' and 'Attention_mask' are output values of the tokenizations process. </p>