Skip to content

Gettingt elements from tensor #2723

Discussion options

You must be logged in to vote

Since there is no const expression yet available on Rust stable, operations typically don't change the rank, so it would be equivalent to PyTorch's keep_dim=True. You can use squeeze afterward or a reshape to achieve the intended effect.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wangjiawen2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants