Megvii-BaseDetection / Megvii-BaseDetection/YOLOX
test error torch1.7
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
run demo.py in torch1.9 is ok?but in torch1.7,i get error as follows?
Traceback (most recent call last):
File "/data/zhangyong/mypytoch/xyb/inference_x2.py", line 332, in <module>
run()
File "/data/zhangyong/mypytoch/xyb/inference_x2.py", line 236, in run
outputs, img_info = predictor.inference(pic_path)
File "/data/zhangyong/mypytoch/xyb/inference_x2.py", line 88, in inference
outputs = self.model(img)
File "/root/anaconda3/envs/game3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/data/zhangyong/mypytoch/xyb/model/yolox/models/yolox.py", line 46, in forward
outputs = self.head(fpn_outs)
File "/root/anaconda3/envs/game3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/data/zhangyong/mypytoch/xyb/model/yolox/models/yolo_head.py", line 194, in forward
return self.decode_outputs(outputs, dtype=torch.cuda.FloatTensor)
File "/data/zhangyong/mypytoch/xyb/model/yolox/models/yolo_head.py", line 228, in decode_outputs
strides.append(torch.full((*shape, 1), stride))
RuntimeError: Providing a bool or integral fill value without setting the optional dtypeoroutarguments is currently unsupported. In PyTorch 1.7, whendtypeandoutare not set a bool fill value will return a tensor of torch.bool dtype, and an integral fill value will return a tensor of torch.long dtype.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure by running demo.py with PyTorch 1.7, then inspect model/yolox/models/yolo_head.py around line 228 in decode_outputs and compare the behavior with PyTorch 1.9. Done when the affected inference path runs under PyTorch 1.7 without the reported fill-value error and the newer version remains working.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100