add feature/infer demo/se resnext50#11708
Conversation
|
|
||
| ```sh | ||
| ./mobilenet_inference_demo --modeldir <model> --data <datafile> | ||
| ``` |
There was a problem hiding this comment.
add description for resnet
| inference_api_test(simple_on_word2vec ARGS test_word2vec) | ||
|
|
||
| set(DEMO_INSTALL_DIR "${THIRD_PARTY_PATH}/inference_demo") | ||
| set(mobilenet_url http://paddlemodels.bj.bcebos.com/inference-vis-demos%2Fmobilenet.tar.gz) |
There was a problem hiding this comment.
no need to set a variable for url, just pass it as the argument of inference_download_test_demo
| */ | ||
| void Main(bool use_gpu) { | ||
| NativeConfig config; | ||
| // config.model_dir = FLAGS_modeldir; |
| config.fraction_of_gpu_memory = 0.1; | ||
| #ifdef PADDLE_WITH_CUDA | ||
| config.fraction_of_gpu_memory = FLAGS_fraction_of_gpu_memory_to_use; | ||
| #endif |
| LOG(INFO) << "output: " << SummaryTensor(tensor); | ||
| } | ||
|
|
||
| TEST(demo, vis_demo) { Main(false /*use_gpu*/); } |
|
|
||
| inference_api_test(simple_on_word2vec ARGS test_word2vec) | ||
|
|
||
| set(DEMO_INSTALL_DIR "${THIRD_PARTY_PATH}/inference_demo") |
There was a problem hiding this comment.
能否下载到build的当前路径,不要放到thirdparty路径下
There was a problem hiding this comment.
直接放到build路径?还是放到别的什么路径 @Superjomn @luotao1
|
| case PaddleDType::FLOAT32: | ||
| for (size_t i = 0; i < numel; ++i) { | ||
| EXPECT_NEAR( | ||
| static_cast<float*>(output.data.data())[i], refer.data[i], 1e-3); |
There was a problem hiding this comment.
1e-7本地gpu跑了下,太小了。改为1e-6了。
|
Failed log: ocr cpu check failed mobilenet cpu data size check error: |
045b77c to
33b8ea8
Compare
|
Still have this issue: But it can pass on my local machine. @luotao1 Could you help double check on your local machine? BTW the data has been download, https://paddleci.ngrok.io/viewLog.html?tab=buildLog&logTab=tree&filter=debug&expand=all&buildId=164&_focus=2973 |
@tensor-tang I am OK on my local machine. You can add md5sum to check the success of Download. |
merged #11510 and add se-renext