问题描述
我正在此站点上运行此SIFT程序: https://github.com/sanchom/sjm
I am running this SIFT program at this site: https://github.com/sanchom/sjm
在我运行程序之前,所有东西都运行良好:
All the stuffs go well until I run my program:
$ python extract_caltech.py --dataset_path=[path_to_your_101_Categories_directory] \
--process_limit [num_processes_to_spawn] --sift_normalization_threshold 2.0 -- sift_discard_unnormalized \
--sift_grid_type FIXED_3X3 --sift_first_level_smoothing 0.66 --sift_fast --sift_multiscale \
--features_directory [path_for_extracted_features]
在输出中,我看到此行数千次:
In the output, I see this line thousands of times:
ERROR: unknown command line flag 'logtostderr'
我已经按照这里的建议检查了一些解决方案:
I have checked for some solutions as suggested here:
https://code. google.com/p/google-glog/issues/detail?id=17&q=glog%20gflagsBut
我要做的是在运行程序之前添加GLOG_logtostderr=1
:
What I did is to add GLOG_logtostderr=1
before I run my program:
GLOG_logtostderr=1 ./my_application
但这对我们没有用.
据我所知,其问题与Gflags和Glog之间的链接有关.但是我还没有关于如何解决它的任何想法.请帮忙.谢谢!
As far as I know, its the problem related to linking between Gflags and Glog. But i haven't got any ideas on how to solve it yet. Please help. Thanks!
推荐答案
我已经解决了我的问题.这是因为IIRC macports的glog不是用gflags构建的,而是python脚本设置了--logtostderr.因此,只需运行以下脚本即可从python脚本中删除--logtostderr:
I have solved my problem. Its because IIRC macports' glog is not built with gflags but the python script sets --logtostderr. So just remove --logtostderr from the python script by running the script:
find . -name '*.py' -exec perl -i -p -e 's/--logtostderr//' {} \;
要了解您是否受到影响,请运行
To find out if you're affected, run
ldd libglog.so
并检查libgflags是否在输出中.
and check if libgflags is in the output.
此站点建议解决方案:
这篇关于未知的命令行标志'logtostderr'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!