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

Chore/tch 0.18.0 #2542

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix split ops with empty chunks
  • Loading branch information
laggui committed Nov 26, 2024
commit 5a78a95982cc25339ddb602cd9ef0e72da5aaa8d
2 changes: 2 additions & 0 deletions crates/burn-tch/src/ops/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ impl TchOps {
.tensor
.split(split_size as i64, dim as i64)
.into_iter()
.filter(|x| x.numel() > 0)
.map(TchTensor::new)
.collect()
}
Expand All @@ -435,6 +436,7 @@ impl TchOps {
.tensor
.split_with_sizes(split_sizes_i64, dim as i64)
.into_iter()
.filter(|x| x.numel() > 0)
.map(TchTensor::new)
.collect()
}
Expand Down