Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error messages #433

Open
turian opened this issue Dec 15, 2023 · 0 comments
Open

Better error messages #433

turian opened this issue Dec 15, 2023 · 0 comments

Comments

@turian
Copy link
Collaborator

turian commented Dec 15, 2023

It's natural to try plugging in a scalar when building a new synth. This leads to cryptic errors, e.g.

  File "/opt/miniconda3/lib/python3.9/site-packages/torchsynth/module.py", line 437, in ramp
    start = self.seconds_to_samples(start).unsqueeze(1)
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

It would be more friendly if there were a global thing that trapped all forwards, checked the parameters, and made sure they are all tensors with tensor.shape[0] == batch_size, otherwise an informative error message is printed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant