#7074·caffe

module 'caffe' has no attribute 'set_mode_cpu'

Author: Zvyozdo4kaCreated Nov 1, 2023Updated Sep 12, 2026

I set CPU_ONLY := 1in Makefile.config, then make clean, then make again, but I still have this Error:

    caffe.set_mode_gpu()
AttributeError: module 'caffe' has no attribute 'set_mode_gpu'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/yulduz/Projects/GitHub/3dmm_cnn/demoCode/testBatchModel.py", line 113, in <module>
    caffe.set_mode_cpu()
AttributeError: module 'caffe' has no attribute 'set_mode_cpu'