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

evaluating at different time points per batch #17

Open
LucaCras opened this issue Feb 15, 2024 · 1 comment
Open

evaluating at different time points per batch #17

LucaCras opened this issue Feb 15, 2024 · 1 comment

Comments

@LucaCras
Copy link

Hi,

I've got a tensor of the shape batch_size x T x nr_channels and I created a cubic spline accordingly.

Let's say I have created this tensor with shape (2, 10, 1)

Now I want to query [[0], [1]] (e.g. value at t=0 for batch 0 and value at t=1 for batch 1)

I know I can query spline.evaluate(torch.tensor(0)) to get the value at t=0 for both batches, but how can I query the above such that it returns a tensor of shape (2, 1, 1) or (2, 1) as the above query returns (2, 2, 1) or even (2, 2, 1, 1).

@patrick-kidger
Copy link
Owner

I don't believe this is possible, unfortunately.

I think for this I would recommend using JAX, and in particular the interpolation routines in Diffrax as a better more featureful option.

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