Giter Club home page Giter Club logo

Comments (4)

yl4579 avatar yl4579 commented on August 12, 2024 1

image

from auxiliaryasr.

Ruinmou avatar Ruinmou commented on August 12, 2024

Why are there negative values? Shouldn't loss be positive in general?
WeChat  @Image_20220615150238
@yl4579

from auxiliaryasr.

yl4579 avatar yl4579 commented on August 12, 2024

@hai8023 This happens when a lot of blank tokens appear in the targets for CTC loss. You need to check your labels to make sure it doesn't contain the space ( ).
However, even if you don't have it, the optimal CTC loss will be negative because the blank token was added to the beginning and the end of the speech to indicate silence before and after the speech. This is intended behavior unless your audio is trimmed to have no silence at the beginning and the end of the speech. If you don't do this, the loss won't be negative, but it may not be able to recognize the silence at the beginning and the end of the speech.

Technically speaking, the padding token at the beginning and the end be <SOS> and <EOS> instead, but for voice conversion application, the input data is randomly sliced and does not form a sentence, so we abuse the notation and use to represent the silence which is what it meant to be used in CTC loss.

For more explanation, please see https://discuss.pytorch.org/t/negative-ctc-loss/79548/5

from auxiliaryasr.

Ruinmou avatar Ruinmou commented on August 12, 2024

Thank you very much for your reply

from auxiliaryasr.

Related Issues (11)

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.