BossZard / rotation-yolov5

rotation detection based on yolov5
GNU General Public License v3.0
377 stars 97 forks source link

about torch version and requirements #18

Open lzytor opened 3 years ago

lzytor commented 3 years ago

Hi,我在anachonda3中完成环境配置,尝试运行detect.py时遇到了以下问题,这些问题可能来源于torch版本或者其他的冲突 CUDA=10.0, cudnn=7.6.5, python=3.7, opencv-python=4.2.0.34 测试环境1:torch=1.6, torchvision=0.7, 其他包均从requirement.txt文件安装,运行detect.py报错: TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

测试环境2:torch=1.7, torchvision=0.8.1, 其他包均遵从U版yolov5 requirement.txt,降低opencv-python版本至4.2。i.e.标准yolov5环境,并测试通过yolov5。加装shapely。运行detect.py报错: torch.nn.modules.module.ModuleAttributeError: 'Hardswish' object has no attribute 'inplace' 根据网上说法,这个问题需将torch降低至1.6,所以该问题死循环了。

wenyishengkingkong commented 3 years ago

我也遇到了上面同样的问题,不知道该如何解答

sunbuhui commented 3 years ago

https://github.com/pytorch/pytorch/issues/46971#issuecomment-722775106

littlelight-e commented 2 years ago

同样,将torch降到1.6则显示和我的显卡版本不匹配,使用更高级别的也不能使用

sunbuhui commented 2 years ago

@littlelight-e Browse my pasted issue above, and modify PyTorch's source code.