Code Monkey home page Code Monkey logo

Comments (5)

qingqing01 avatar qingqing01 commented on May 18, 2024 2
  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.

from models.

qingqing01 avatar qingqing01 commented on May 18, 2024 1

两种方式mean batch width: 1643.77 vs 1268.81

from models.

xinghai-sun avatar xinghai-sun commented on May 18, 2024

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

from models.

xinghai-sun avatar xinghai-sun commented on May 18, 2024

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

from models.

qingqing01 avatar qingqing01 commented on May 18, 2024

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

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

from models.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.