a-PyTorch-Tutorial-to-Object-Detection icon indicating copy to clipboard operation
a-PyTorch-Tutorial-to-Object-Detection copied to clipboard

bug fix for torch.max operation

Open dodiku opened this issue 4 years ago • 1 comments

RuntimeError: Expected object of scalar type Byte but got scalar type Bool for argument #2 'other' in call to _th_max

dodiku avatar May 02 '20 03:05 dodiku

Hey dodiku, I just run the detect.py with loaded checkpoint file and got a similar error(not totally the same), and the traceback is also from the model.py file , I tried your code but the error dosen't change, so here is the error: Traceback (most recent call last): File "H:/SSD_object_detection/detect.py", line 103, in <module> detect(original_image, min_score=0.1, max_overlap=0.4, top_k=150).show() File "H:/SSD_object_detection/detect.py", line 46, in detect max_overlap=max_overlap, top_k=top_k) File "H:\SSD_object_detection\model.py", line 494, in detect_objects suppress = torch.max(suppress, overlap[box] > max_overlap) RuntimeError: Expected object of scalar type unsigned char but got scalar type bool for argument 'other' Thanks if you can spare some time to look at this comment!

gonggqing avatar Aug 27 '20 08:08 gonggqing