Giter Site home page Giter Site logo

Comments (4)

yannick-couzinie avatar yannick-couzinie commented on August 28, 2024 1

Training on the TEDlium 2 Corpus I had the same problem. You can find a quick and dirty work-around using @robbiebarrat's post, by the following steps:

  • Make sure you have at least tensorflow >= 1.2. If you don't do this, you will not have the flag to ignore the error messages, as you can see in the source code for tensorflow (just change the branches at the top if you want to check).
  • Go to your virtual envs/pythons, navigate down lib then site-packages, find sugartensor open sg_loss.py and change the lines 225-226 from
    out = tf.nn.ctc_loss(opt.target.sg_to_sparse(), tensor, opt.seq_len, ctc_merge_repeated=opt.merge, time_major=False)
    to
    out = tf.nn.ctc_loss(opt.target.sg_to_sparse(), tensor, opt.seq_len, ctc_merge_repeated=opt.merge, ignore_longer_outputs_than_inputs=True, time_major=False)

Training should at least run through. I would have preferred to just add an argument to the function call, but something with sugar-tensor changing how functions work confused me, so I just did this simple thing.

Note what the documentation says about the flag, so you know what happens:

The ignore_longer_outputs_than_inputs option allows to specify the behavior of the CTCLoss when dealing with sequences that have longer outputs than inputs. If true, the CTCLoss will simply return zero gradient for those items, otherwise an InvalidArgument error is returned, stopping training.
So this really is just a workaround until somebody understands what is actually going wrong, or if something is going wrong.

Mind you though, I got another error after that one. So you might get one too. This of course doesn't fix anything, if it's not clear, but at least you can train ( if you don't run into the other error).

from speech-to-text-wavenet.

lemmonation avatar lemmonation commented on August 28, 2024

I got the same error. Have u fix this? @star633669 @buriburisuri

from speech-to-text-wavenet.

robbiebarrat avatar robbiebarrat commented on August 28, 2024

this may help - i have the same problem. My error shows

`InvalidArgumentError (see above for traceback): Not enough time for target transition sequence (required: 32, available: 31)1You can turn this error into a warning by using the flag ignore_longer_outputs_than_inputs
 [[Node: ctc/CTCLoss = CTCLoss[ctc_merge_repeated=true, ignore_longer_outputs_than_inputs=false, preprocess_collapse_repeated=false, _device="/job:localhost/replica:0/task:0/cpu:0"](ctc/Log, ctc/ToInt64, ctc/ToInt32_2, ctc/ToInt32_1)]]`

The "your can turn this error into a warning by using this flag..." seems like it might help someone - i'll update here if i figure it out.

from speech-to-text-wavenet.

dizzyname avatar dizzyname commented on August 28, 2024

i want to know how can i train my own data.
could you help me please? @star633669

from speech-to-text-wavenet.

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.