-
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
Benchmark including PaddlePaddle, TensorFlow and Caffe. #219
Conversation
|
||
```bash | ||
pip install tflearn | ||
``` |
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.
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.
- run.sh和run_multi.sh里面除了个数不一样,很多地方都一样,能不能写成一个.sh文件呢,或者共用下命令行函数。
- tensorflow里面单节点的py和多节点的py,看着也非常像,是不是也就只有节点数不一样,其他都一样呢。那写成一个py就够了。
|
||
Platform: | ||
|
||
- PaddlePaddle: |
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.
是不是要加一下是Paddle的哪个版本,比如就这次release版本
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, 增加的是这次release版本对应的Docker Image
- Tensorflow: gcr.io/tensorflow/tensorflow:0.11.0rc0-gpu | ||
- Caffe: | ||
|
||
Several convolutional neural networks and recurrent neural network are used to test. |
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.
recurrent neural network后面加s
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
- CPU: 12-core Intel(R) Xeon(R) CPU E5-2620 v2 @2.10GHz | ||
- GPU: Tesla K40m | ||
- cuDNN: v5.1 | ||
- system: Docker 1.12.1, all platform are tested in docker environment. |
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.
all platforms
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
|
||
### Benchmark Model | ||
|
||
AlexNet, GooleNet and a small network which refer the config of cifar10 in Caffe are used. |
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.
a small network which refer the config of cifar10 in Caffe 不是很通。是说用了caffe中那个cifar10的网络么?a small network use cifar10 in Caffe?
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
- [SmallNet](https://github.com/BVLC/caffe/blob/master/examples/cifar10/cifar10\_quick\_train\_test.prototxt) | ||
|
||
|
||
### Singe-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.
Single-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.
Done
|
||
#### LSTM in Text Classification | ||
|
||
Testing network for different hidden size, batch size with `2 lstm layer + fc` network. |
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.
Testing 2 lstm layer + fc
network with differnt hidden size and batch size
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
|
||
#### Seq2Seq | ||
|
||
The benchmark of sequence-to-sequence network will be add later. |
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.
will be added
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
|
||
#### Seq2Seq | ||
|
||
The benchmark of sequence-to-sequence network will be add later. |
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.
added
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
--log_period=10 \ | ||
--test_period=100 \ | ||
--config_args=$args \ | ||
--cudnn_dir=/home/dangqingqing/tools/cudnn-5.1/lib64 \ |
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.
cudnn_dir路径写死了,下同
if [ ! -d "train.txt" ]; then | ||
for ((i=1;i<=1024;i++)) | ||
do | ||
echo "train/n09246464/n09246464_38735.jpeg 972" >> train.txt |
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.
这行是用来做什么呢,写1024个一样的jpeg?
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.
这个是因为:
- 使用
paddle train
命令发起程序,PaddlePaddle必须依赖DataProvider才能知道数据类型和大小(dense_vector, integer_value等)。 - 配置文件中define_py_data_sources2指定DataProvider的同时,必须有train_list,而且如果文件为空的话,Init parameters done之后就结束了。
所以这里生成伪数据列表,实际在DataProvider里产生的是随机数据。
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.
修改了DataProvider, 可以使用空的文件列表,已更新。
0447e63
to
3046e2d
Compare
3046e2d
to
b1cc9da
Compare
这个只合并了PaddlePaddle的命令。 Caffe和Tensorflow没有合并,是因为这两个单机和多机发起程序的命令本身就不一样。
TensorFlow多卡的配置本身可以跑单卡, 但是单卡配置可以写的更简单、少一些逻辑。在看Tensorflow的一些教程( https://github.com/tensorflow/tensorflow/tree/master/tensorflow/models/image/cifar10 )、包括这里的配置 https://github.com/soumith/convnet-benchmarks/tree/master/tensorflow (当然这个没有多卡配置)时, 单卡配置和多卡也是分开的,单卡并没有公用多卡配置来跑单卡。 所以TensorFlow这里单卡和多卡是分开的,如果大家觉得有必要合并的,合并一下也可以。 |
|
||
All the tests in caffe use `caffe time` to execute, which is not including the parameter updating process. But the time in PaddlePaddle and TensorFlow contains it. | ||
All the experiments in caffe use `caffe time` to execute, which does not include the time of parameter updating. The time in PaddlePaddle and TensorFlow contains it. But, compared with the total time, the time of parameter updating is relatively little. |
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.
All the single-GPU experiments in caffe use caffe time
to calculate the elapsed time, which does not include the parameter updating time. However, both PaddlePaddle and TensorFlow benchmark contain this parameter updating time. As compared with the total time, this part is relatively little, we can ignore it.
@@ -102,15 +102,15 @@ We use lstm network for text classfication to test benchmark. | |||
|
|||
### Dataset | |||
- [IMDB](http://www.iro.umontreal.ca/~lisa/deep/data/imdb.pkl) | |||
- Sequence legth=100, in fact, PaddlePaddle support training with variable-length sequence. But TensorFlow need to pad, in order to compare, we also pad sequence length to 100 in PaddlePaddle. | |||
- Sequence legth is 100. In fact, PaddlePaddle supports training with variable-length sequence, but TensorFlow needs to pad, we also pad sequence length to 100 in PaddlePaddle in order to compare. |
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.
Sequence length.
In fact, PaddlePaddle supports training with variable-length sequence, but TensorFlow needs to pad. Thus, we also pad sequence length to 100 in PaddlePaddle in order to compare.
|
如果Paddle不是核心的code,那么咱也没必要非要 |
bb803ac
to
68060aa
Compare
add share_external_data interface demo
* Stand out toy example & fix bugs in child threads * Refine comments
benchmark/
file.run.sh
orrun_multi.sh
to execute.