How to enable multithreading with Caffe?

前端 未结 3 1870
小蘑菇
小蘑菇 2020-12-08 11:49

I would like to compile / configure Caffe so that when I trained an artificial neural network with it, the training is multi-threaded (CPU only, no GPU). How to enable multi

3条回答
  •  失恋的感觉
    2020-12-08 12:35

    This is to just extend Franck's answer where he used sed to modify the config file. If you are having problems with that, here is another way to get the same thing done.

    The difference is that instead of changing the config file you directly change the camke flag cmake -DCPU_ONLY=1 -DBLAS=open ..

    $sudo apt update && sudo apt-get install -y libopenblas-dev
    $git clone -b 1.0 --depth 1 https://github.com/BVLC/caffe.git . && \
        pip install --upgrade pip && \
        cd python && pip install -r requirements.txt && cd .. && \
        mkdir build && cd build && \
        cmake -DCPU_ONLY=1 -DBLAS=open .. && \
        make -j"$(nproc)"
    

提交回复
热议问题