I am training a bert model for question classification task, now it is a binary classifier. 0 for Descriptive question and 1 for not descriptive. While testing I am getting the following error :-
I have generated my model with the help of around 1700 questions

But when I am testing it for one question at a time and running
      outputs = model(b_input_ids, token_type_ids=None, attention_mask=b_input_masks)

It is giving me the following error
ValueError: Wrong shape for input_ids (shape torch.Size([1])) or attention_mask (shape torch.Size([1]))

b_input_ids are the padded id of the input question
b_input_masks are the attention mask of the b_input_ids

Any idea how this error can be resolved

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
<|||||>use torch.unsqueeze(0) on b_input_ids,b_input_masks so that they become of shape (batch_size(=1),dim)<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
