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

Splitting elements is incompatible with vectorization #227

Closed
Hespe opened this issue Jul 24, 2024 · 0 comments · Fixed by #229
Closed

Splitting elements is incompatible with vectorization #227

Hespe opened this issue Jul 24, 2024 · 0 comments · Fixed by #229

Comments

@Hespe
Copy link
Member

Hespe commented Jul 24, 2024

The following code currently fails on the master branch:

import torch
import cheetah

drift = cheetah.Drift(length=torch.tensor([1])).broadcast((2,))
drift.split(torch.tensor(0.1))

The stack trace points to

while remaining > 0:

with message

RuntimeError: Boolean value of Tensor with more than one value is ambiguous

The problem disappears without the call to .broadcast().

@jank324 jank324 mentioned this issue Jul 24, 2024
7 tasks
This was referenced Jul 24, 2024
@jank324 jank324 linked a pull request Jul 26, 2024 that will close this issue
14 tasks
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

Successfully merging a pull request may close this issue.

1 participant