Closed brian7685 closed 5 years ago
I encountered this as well. It seems to be a bug in line 89 of vilbert/task_utils.py
. The identifier 'TASK1' is omitted - I think it should be added there.
@rmrao Your answer has solved my problem! Thank you very much. What I want to add is, in line 29 of vilbert/task_utils.py, I think the identifier 'TASK1' is omitted.
Just an extra comment. We need to change this line as well in the validation function.
I encountered an issue in: File "/home/XXX/vilbert_beta/vilbert/vilbert.py", line 322, in forward position_ids = position_ids.unsqueeze(0).expand_as(input_ids) RuntimeError: The expanded size of the tensor (60) must match the existing size (4) at non-singleton dimension 2. Target sizes: [16, 4, 60]. Tensor sizes: [1, 4]
From the code we can see: seq_length = input_ids.size(1) position_ids = torch.arange( seq_length, dtype=torch.long, device=input_ids.device ) The input_ids is [16, 4, 60] position_ids is [4] How do we fit the 60? Thanks!