We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
f_indexer
hi, https://github.com/LaurentMazare/tch-rs/blob/main/src/tensor/index.rs#L336 any thoughts on using f_select here and propagate the error instead of select which panics ?
f_select
select
f_indexer is suppose to return Result<Tensor> but the usage of select means that it will panic instead of propagating an error.
Result<Tensor>
pub fn select(&self, dim: i64, index: i64) -> Tensor { self.f_select(dim, index).unwrap() }
why not directly have f_select there and propagate the error upwards
The purpose of having f_i is so that it allows the user to handle the indexing error, but if we panic, then there's no point in having fn f_i
f_i
fn f_i
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hi, https://github.com/LaurentMazare/tch-rs/blob/main/src/tensor/index.rs#L336 any thoughts on using
f_select
here and propagate the error instead ofselect
which panics ?f_indexer is suppose to return
Result<Tensor>
but the usage ofselect
means that it will panic instead of propagating an error.why not directly have f_select there and propagate the error upwards
The purpose of having
f_i
is so that it allows the user to handle the indexing error, but if we panic, then there's no point in havingfn f_i
The text was updated successfully, but these errors were encountered: