Giter VIP home page Giter VIP logo

Comments (4)

tky823 avatar tky823 commented on May 24, 2024

My CumulativeLayerNorm1d is based on official implementation. You can compare it with mine here.
If there is any possibility that I have misunderstood something, let me know in more detail.

from dnn-based_source_separation.

michelg10 avatar michelg10 commented on May 24, 2024

compared to the official implementation, your code writes cum_var=cum_squared_mean - cum_mean**2 while the official code writes cum_var = (cum_pow_sum - 2cum_meancum_sum) / entry_cnt + cum_mean.pow(2).

then cum_squared_mean should = (cum_pow_sum - 2cum_meancum_sum) / entry_cnt
In your code cum_squared_mean=cum_squared_sum/cum_num. as entry_cnt=cum_sum,
cum_squared_sum should = cum_pow_sum-2cum_meancum_sum

however cum_squared_sum is defined as torch.cumsum(step_pow_sum, dim=1) which equals cum_pow_sum in the official implementation, so you're missing 2cum_meancum_sum.

am I missing anything here? or is this omitted for a speed / accuracy tradeoff?

from dnn-based_source_separation.

tky823 avatar tky823 commented on May 24, 2024

formula
formula
formula
formula
formula
formula

In official implementation:
formula

In my repo:
formula
formula

I renamed some variables in check_layer_norm.ipynb at #101 (comment) for readability.

from dnn-based_source_separation.

michelg10 avatar michelg10 commented on May 24, 2024

My bad! thank you for clearing it up!

from dnn-based_source_separation.

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.