pytorch / pytorch/audio

torcaudio.functional.rnnt_loss input_length mismatch

Open
#2,834 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
799
Avg merge
58m
Merged PRs (30d)
3

Description

🐛 Describe the bug

def loss(self,audio_feat,feat_lens,target,target_lens):
"""
audio_feat: mel_spectrogram,
feat_lens :mel_length before padding
target: target_seq
target_lens: target sequence length before padding
"""

      x,lens = self.encoder(audio_feat,feat_lens)
      y = self.decoder(target)
      joint_out = self.joint(x,y)
      loss = F.functional.rnnt_loss(logits=joint_out,targets=target,
                       logit_lengths=lens,target_lengths=target_lens,blank=self.null_id)
      return loss
Versions

I keep getting this error of input length mismatch and output length mismatch

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, version, traceback, or reproducible input is provided. Start from the shown encoder, decoder, joint, and rnnt_loss call, then reproduce the input-length and output-length mismatch with the actual tensor shapes and versions; done means identifying a confirmed cause and a regression test or clearly documented fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.