-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
demo/mobilenet inference #11510
demo/mobilenet inference #11510
Conversation
Superjomn
commented
Jun 15, 2018
•
edited
Loading
edited
cc_test(${TARGET} SRCS "${tests_SRCS}" | ||
DEPS paddle_inference_api paddle_fluid | ||
ARGS --data="${test_dir}/data.txt" | ||
--modeldir="${test_dir}/model" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
43行和44行的引号不能加,去掉后可以跑通
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
config.param_file = FLAGS_modeldir + "/__params__"; | ||
config.prog_file = FLAGS_modeldir + "/__model__"; | ||
config.use_gpu = use_gpu; | ||
config.fraction_of_gpu_memory = 0.15; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be FLAGS_fraction_of_gpu_memory_to_use
*/ | ||
void Main(bool use_gpu) { | ||
NativeConfig config; | ||
// config.model_dir = FLAGS_modeldir; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove comment.
@@ -14,3 +14,38 @@ | |||
# | |||
|
|||
inference_api_test(simple_on_word2vec ARGS test_word2vec) | |||
|
|||
set(mobilenet_url "xxx") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this for? Did not see any usage .
And remove magic name "xxx".
|
||
inference_download_test_demo (mobilenet_inference_demo | ||
SRCS mobilenet.cc | ||
URL http://paddlemodels.bj.bcebos.com/inference-vis-demos%2Fmobilenet.tar.gz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you want use mobilenet_url
here?
DEPS paddle_inference_api paddle_fluid | ||
ARGS --data=${test_dir}/data.txt | ||
--modeldir=${test_dir}/model | ||
--fraction_of_gpu_memory_to_use=0.5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, this is a GPU flag, maybe should not be place here as a common flag.
Since I build with cpu only and it fails with ERROR: unknown command line flag 'fraction_of_gpu_memory_to_use'