pytorch_YOLO_OpenVINO_demo icon indicating copy to clipboard operation
pytorch_YOLO_OpenVINO_demo copied to clipboard

CPU version of mc module

Open RohitKeshari opened this issue 2 years ago • 1 comments

Is this code also support CPU version of mc module. If yes, which one it would be?

I am having the following error

File "models/export.py", line 33, in <module>
    model = attempt_load(opt.weights, map_location=torch.device('cpu'))  # load FP32 model
  File "./models/experimental.py", line 118, in attempt_load
    model.append(torch.load(w, map_location=map_location)['model'].float().fuse().eval())  # load FP32 model
  File "/home/rokeshar/.local/lib/python3.7/site-packages/torch/serialization.py", line 608, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/home/rokeshar/.local/lib/python3.7/site-packages/torch/serialization.py", line 787, in _legacy_load
    result = unpickler.load()
ModuleNotFoundError: No module named 'mc'

RohitKeshari avatar Jul 27 '21 03:07 RohitKeshari

Did you use YoloV4, right? You can use the commands below to re-install mish into mc.

$ git clone https://github.com/thomasbrandon/mish-cuda mc $ cd mc

change all of name which is mish_cuda to mish_mish and build.

  1. mc/src/mish_cuda -> mc/src/mish_mish
  2. mc/csrc/mish_cuda.cpp -> mc/csrc/mish_mish.cpp
  3. in mc/setup.py 3.1 line 5 -> 'csrc/mish_mish.cpp' 3.2 line 11 -> name='mish_mish' 3.3 line 20 -> 'mish_mish._C'

$ python3 setup.py build rename mc/build/lib.xxx folder to mc/build/lib

Chen-MingChang avatar Jul 27 '21 08:07 Chen-MingChang