-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
when I run the code,the error came:
File "referit3d/models/referit3d_net_utils.py", line 206, in detailed_predictions_on_dataset
batch[k] = batch[k].to(device)
RuntimeError: CUDA error: invalid argument
the orignal code for this part is :
def detailed_predictions_on_dataset(model, data_loader, args, device, FOR_VISUALIZATION=True,tokenizer=None):
model.eval()
res = dict()
res['guessed_correctly'] = list()
res['confidences_probs'] = list()
res['contrasted_objects'] = list()
res['target_pos'] = list()
res['context_size'] = list()
res['guessed_correctly_among_true_class'] = list()
batch_keys = make_batch_keys(args, extras=['context_size', 'target_class_mask'])
if FOR_VISUALIZATION:
res['utterance'] = list()
res['stimulus_id'] = list()
res['object_ids'] = list()
res['target_object_id'] = list()
res['distrators_pos'] = list()
for batch in tqdm.tqdm(data_loader):
# Move data to gpu
for k in batch_keys:
if isinstance(batch[k],list):
continue
batch[k] = batch[k].to(device)
I think something wrong with the "k" in the batch[k],but I don't know how to fix it, can anybody help me ?
Metadata
Metadata
Assignees
Labels
No labels