Open RylanSchaeffer opened 3 years ago
The problematic line appears to come from transformers.models.distilbert.modeling_distilbert.py
:
position_ids = position_ids.unsqueeze(0).expand_as(input_ids) # (bs, max_seq_length)
positions_ids
has length equal to the sequence length, but input_ids
has shape (batch size, sequence length, embedding dimension).
Following the "tutorial" in another issue (https://github.com/pytorch/captum/issues/150#issuecomment-549022512), I try the exact same sequence of function calls.
But I get the following runtime error: