简体   繁体   中英

how to know if Caffe2 has been successfully installed or not in ubuntu 16.04?

I am trying install caffe2 as instructed, on https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile , but when I try to run the command

python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"

it echo failure. further when I run next command

python -m caffe2.python.operator_test.relu_op_test

It gives output as - Error while finding module specification for 'caffe2.python.operator_test.relu_op_test' (ModuleNotFoundError: No module named 'caffe2.python')

While I have successfully run the other commands, Can anyone please point out the mistake/s I am committing. How do I know if i have successfully installed caffe2 ?(other than above command)

According to this post :

# To check if Caffe2 build was successful
python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"

# To check if Caffe2 GPU build was successful
# This must print a number > 0 in order to use Detectron
python -c 'from caffe2.python import workspace; print(workspace.NumCudaDevices())'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM