Giter VIP home page Giter VIP logo

Comments (3)

naxingyu avatar naxingyu commented on May 17, 2024

Sure. Your instructions are quite straightforward. I'll take it.

X.

On 08/26/2015 09:08 AM, Daniel Povey wrote:

@naxingyu https://github.com/naxingyu, it would be great if you
could help with this because you have been working on similar code
recently. This is something I need for my work on CTC (which I am
working on currently in my personal fork of Kaldi). I'll add you to
the paper if you can help with this.

The following code currently exists in cu-matrix.h:

|// This function, adds a list of MatrixElements (scaled by alpha) to corresponding locations to
// (*this).
void AddElements(Real alpha, const std::vector<MatrixElement >& input);

// This function resizes the output to indexes.size(), and for each element of
// "indexes" it interprets it as a (row, column) index into _this, and puts
// (_this)(row, column) into the corresponding element of "output".
void Lookup(const std::vector &indexes,
std::vector *output) const;
|

What I would like is (1) to change the interface of the existing
Lookup to take a Real* pointer instead of a std::vector, for greater
flexibility, (2) add a version of Lookup that takes CuArray instead,
that would be called internally by the existing function in cases
where CUDA is being used; and (3) add a version of AddElements that is
more compatible with the Lookup interface, as follows (we can add an
alpha to its interface later if it becomes necessary).

| /// For each i, with indexes[i] = (j, k), does (*this)(j, k) += input[i]. Requires, but does
/// not check, that the vector of indexes does not contain repeated elements. 'input'
/// is the start of an array of length equal to indexes.Dim().
void AddElements(const CuArray &indexes, const Real *input);
|


Reply to this email directly or view it on GitHub
#94.

from kaldi.

naxingyu avatar naxingyu commented on May 17, 2024

Should I update all the calls to the new interface?

from kaldi.

danpovey avatar danpovey commented on May 17, 2024

Yes.

On Tue, Aug 25, 2015 at 11:04 PM, Xingyu Na [email protected]
wrote:

Should I update all the calls to the new interface?


Reply to this email directly or view it on GitHub
#94 (comment).

from kaldi.

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.