Skip to content
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

Some findings about testing MKL_DNN on laptop #5462

Closed
kuke opened this issue Nov 8, 2017 · 3 comments
Closed

Some findings about testing MKL_DNN on laptop #5462

kuke opened this issue Nov 8, 2017 · 3 comments

Comments

@kuke
Copy link
Contributor

kuke commented Nov 8, 2017

We run the mkl_dnn benchmark test in Docker container on the laptop Dell XPS 15 , and find that:

  1. The batch size of training samples is limited by the memory (8G) of the laptop, up to 48, which is smaller than the minimum batch size of the benchmark test on server.

  2. When batch size is too small (<=8), the training cost will yield nan. Maybe need to modify the test script to avoid such nan cost.

@tensor-tang
Copy link
Contributor

tensor-tang commented Nov 8, 2017

Thanks kuke

  1. I highly recommend expand the memory for benchmark, since 8G is even smaller than some GPU(12G memory).
    And for some typologies which are very deep like resnet, we can only choose very small batchsize.
    It can not show the best performance of MKL-DNN or MKLML.

  2. When change batchsize to smaller, we should change the learning rate smaller too, since vgg do not have batch norm layer, it's very easy to nan

@luotao1
Copy link
Contributor

luotao1 commented Nov 8, 2017

since 8G is even smaller than some GPU(12G memory)

我们选择内存不大的笔记本和台式机来做性能测试,主要原因是:笔记本和台式机属于民用市场:考虑到大多数学习场景,GPU都是过剩的,而且学习过程如果用GPU对学生来说也是不小的升级成本。如果MKLDNN能在当前资源下可以跑通大多数模型,对初级用户可能是个特别大的福音。

since vgg do not have batch norm layer, it's very easy to nan

如果在小的bs情况下,vgg容易出现NAN,是否可以考虑测试别的网络?

@tensor-tang
Copy link
Contributor

减小learning rate之后就不会nan了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants