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

Support variable input batch and SortaGrad for deep speech2. #75

Closed
qingqing01 opened this issue Jun 7, 2017 · 5 comments
Closed

Support variable input batch and SortaGrad for deep speech2. #75

qingqing01 opened this issue Jun 7, 2017 · 5 comments

Comments

@qingqing01
Copy link
Collaborator

No description provided.

@qingqing01
Copy link
Collaborator Author

qingqing01 commented Jun 7, 2017

  1. 对所有样本做shuffle,组batch,padding到batch内的最大width.
    对train-clean-100统计,width的分布图:

width_shuffled

  1. 对所有样本按照duration排序,组batch,padding到batch内的最大width.
    对train-clean-100统计,width的分布图:

width_sorted

由上面图对比,如果shuffle,每个batch的width都相对较大,为了计算效率,还是需要排序。

在ds2里采用的方法:
1). 每个epoc随机跳过k个样本,k属于(0, batch_size-1)
2). 1)之后组batch,batch间shuffle.

@xinghai-sun
Copy link
Contributor

Great! 能计算一下两种方式下分别的mean batch width吗?

@qingqing01
Copy link
Collaborator Author

两种方式mean batch width: 1643.77 vs 1268.81

@xinghai-sun
Copy link
Contributor

xinghai-sun commented Jun 12, 2017

有没有实测加速比呢? 上述两种方式以及原来未采用variable_sized batch,三种的大致比较。

@qingqing01
Copy link
Collaborator Author

qingqing01 commented Jun 12, 2017

@xinghai-sun 基于train-clean-100,实测一个epoc的速度,分别如下,所以现在batch shuffle的速度还是快一些。

  • 3752 sec/epoc: 所有样本的width都pad到2000
  • 3286 sec/epoc: 方式1
  • 2861 sec/epoc: 方式2

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

2 participants