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

Broadcasting issues during Backward #686

Closed
nathanielsimard opened this issue Aug 24, 2023 · 0 comments · Fixed by #702
Closed

Broadcasting issues during Backward #686

nathanielsimard opened this issue Aug 24, 2023 · 0 comments · Fixed by #702
Labels
bug Something isn't working

Comments

@nathanielsimard
Copy link
Member

When doing broadcasting during the forward pass, sometimes it can cause error during the backward pass, especially when broadcasting feature dimensions with the batch dimension. We should add automated tests that support those usecases.

Example:

let w = Tensor::<B, 1>::zeros([16]).require_grad();
let x = Tensor::<B, 1>::zeros([4]).require_grad();

let y = x.slice([0..1]) * x;
y.backward() // panic!

We should add tests for all binary operations that support broadcasting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant