Michael-Xiu / ICDAR-SROIE

ICDAR 2019 Robust Reading Challenge on Scanned Receipts OCR and Information Extraction
28 stars 20 forks source link

RunTimeError scalar type #3

Open Xiariyouhu opened 5 years ago

Xiariyouhu commented 5 years ago

RuntimeError: Expected object of scalar type Byte but got scalar type Bool for argument #2 'other' ICDAR/ICDAR-SROIE/task1_SSD/model.py", line 536, in detect_objects

15926273249 commented 4 years ago

suppress = torch.zeros((n_above_min_score)).bool().to(device) for box in range(class_decoded_locs.size(0)): if suppress[box] == 1: continue suppress = suppress | (overlap[box] > max_overlap) suppress[box] = 0 image_boxes.append(class_decoded_locs[~suppress]) image_labels.append( torch.LongTensor( (~suppress).sum().item() * [c]).to(device) ) image_scores.append(class_scores[~suppress])