Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU version of mc module #6

Open
RohitKeshari opened this issue Jul 27, 2021 · 1 comment
Open

CPU version of mc module #6

RohitKeshari opened this issue Jul 27, 2021 · 1 comment

Comments

@RohitKeshari
Copy link

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'
@Chen-MingChang
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants