multimodallearning / pytorch-mask-rcnn

Other
2.01k stars 557 forks source link

AttributeError: 'Variable' object has no attribute 'dtype' #74

Closed quickzhao3223 closed 5 years ago

quickzhao3223 commented 5 years ago

Hi, there. I'm working in: OS: Ubutu16.04 torch.version : 0.3.1 and nvcc: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2016 NVIDIA Corporation Built on Tue_Jan_10_13:22:03_CST_2017 Cuda compilation tools, release 8.0, V8.0.61

I try to run demo.py, but I got:

Traceback (most recent call last): File "demo.py", line 74, in results = model.detect([image]) File "/home/student/pytorch-mask-rcnn/Projects/pytorch-mask-rcnn-master/model.py", line 1603, in detect detections, mrcnn_mask = self.predict([molded_images, image_metas], mode='inference') File "/home/student/pytorch-mask-rcnn/Projects/pytorch-mask-rcnn-master/model.py", line 1669, in predict config=self.config) File "/home/student/pytorch-mask-rcnn/Projects/pytorch-mask-rcnn-master/model.py", line 385, in proposal_layer keep = utils.non_max_suppression(boxes, scores, nms_threshold) File "/home/student/pytorch-mask-rcnn/Projects/pytorch-mask-rcnn-master/utils.py", line 97, in non_max_suppression if boxes.dtype.kind != "f": File "/home/student/anaconda3/lib/python3.5/site-packages/torch/autograd/variable.py", line 67, in getattr return object.getattribute(self, name) AttributeError: 'Variable' object has no attribute 'dtype'

what's wrong,anybody can help me, thank you!

quickzhao3223 commented 5 years ago

Python 3.5.2 :: Anaconda 4.2.0 (64-bit)

quickzhao3223 commented 5 years ago

Hello, I sloved it. It's my mistake, my code was not the lastest version. When I git the lastest version of code, it works.