-
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
add feature/infer demo/se resnext50 #11708
add feature/infer demo/se resnext50 #11708
Conversation
… demo/mobilenet
|
||
```sh | ||
./mobilenet_inference_demo --modeldir <model> --data <datafile> | ||
``` |
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.
add description for resnet
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.
Got it.
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.
done
@@ -14,3 +14,40 @@ | |||
# | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to set a variable for url, just pass it as the argument of inference_download_test_demo
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.
Got it
*/ | ||
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.
78行去掉
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.fraction_of_gpu_memory = 0.1; | ||
#ifdef PADDLE_WITH_CUDA | ||
config.fraction_of_gpu_memory = FLAGS_fraction_of_gpu_memory_to_use; | ||
#endif |
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.
82行需要留着么?
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.
可以不要的。
LOG(INFO) << "output: " << SummaryTensor(tensor); | ||
} | ||
|
||
TEST(demo, vis_demo) { Main(false /*use_gpu*/); } |
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.
需要再测下gpu的
@@ -14,3 +14,42 @@ | |||
# | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
能否下载到build的当前路径,不要放到thirdparty路径下
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.
直接放到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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1e-3太大了。改成1e-7吧。
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.
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. |
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.
LGTM
merged #11510 and add se-renext