Open dlmuzpy opened 3 years ago
一样遇到了,不知道是不是需要最新的pytorch
一样遇到了
installation is updated.
installation is updated.
Thank you. I made it
csrc/cpu/mish_cpu.obj build\temp.win-amd64-3.8\Release\csrc/cuda/mish_cuda.obj build\temp.win-amd64-3.8\Release\csrc/cuda/mish_kernel.obj /OUT:build\lib.win-amd64-3.8\mish_cuda_C.cp38-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.8\Release\csrc/cpu_C.cp38-win_amd64.lib 正在创建库 build\temp.win-amd64-3.8\Release\csrc/cpu_C.cp38-win_amd64.lib 和对象 build\temp.win-amd64-3.8\Release\csrc/cpu_C.cp38-win_amd64.exp 正在生成代码 已完成代码的生成
model = attempt_load(weights, map_location=device) # load FP32 model
File "C:\Users\Administrator.SC-201905102106\Desktop\ScaledYOLOv4-yolov4-large\models\experimental.py", line 137, in attempt_load model.append(torch.load(w, map_location=map_location)['model'].float().fuse().eval()) # load FP32 model File "D:\Program Files\Anaconda36\envs\yolov52\lib\site-packages\torch\serialization.py", line 593, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "D:\Program Files\Anaconda36\envs\yolov52\lib\site-packages\torch\serialization.py", line 773, in _legacy_load result = unpickler.load() ModuleNotFoundError: No module named 'mc.build.lib'
还是报错
@WongKinYiu 大佬看下
ModuleNotFoundError: No module named 'mc.build.lib'
這裡就是說您沒有mc/build/lib呀
when I run: python setup.py build
Report an error: ScaledYOLOv4-yolov4-large/mc/csrc/mish_kernel.cu:3:30: fatal error: CUDAApplyUtils.cuh: No such file or directory
Do you know how to solve it?
installation is updated.
Thank you. I made it
you could try https://github.com/JunnYu/mish-cuda
@WongKinYiu 你好,导出onnx时出错:ONNX export failure: ONNX export failed: Couldn't export Python operator MishCudaFunction。这种还需要更改哪一块代码么?
這比較麻煩 得改用pytorch原生程式碼構建mish 但會比較慢也比較吃資源
class Mish(nn.Module): # https://github.com/digantamisra98/Mish
def forward(self, x):
return x * F.softplus(x).tanh()
感谢大佬工作! 我好像读不出来你的模型 python3命令行下,使用torch 1.6版本
输入: import torch model = torch.load('yolov4-p5.pt')
返回如下错误: File "/home/popzq/.conda/envs/zpy/lib/python3.7/site-packages/torch/serialization.py", line 765, in _legacy_load result = unpickler.load() ModuleNotFoundError: No module named 'mc'