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

Dimension size as expression of another dimension #24

Open
ikamensh opened this issue Jul 28, 2021 · 1 comment
Open

Dimension size as expression of another dimension #24

ikamensh opened this issue Jul 28, 2021 · 1 comment

Comments

@ikamensh
Copy link

Hi,

I'm new to using torchtyping, and my usecase is the following: I have a data structure that has tensor of size N and another one of size N - 1. Is there a way to specify this? Naive attempt of using TensorType["time" - 1] failed.

Thanks!

@patrick-kidger
Copy link
Owner

Currently the best way to specify this is just TensorType["time - 1"]. This will just define another dimension name though. So it's good for documentation purposes but won't be able to check that "time" - 1 = "time" - 1, so to speak.

Having this work is something I'd like to add; see issue #2. It should be possible to make work at a technical level; I just haven't found the time to implement it.

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

2 participants