Skip to content

What is update_indexed and when should we use it? #548

Answered by maljoras
Zhaoxian-Wu asked this question in Q&A
Discussion options

You must be logged in to vote

In general, this is internal code and the user should not worry about that unless you want to implement your own update functionality. Just leave it as it is, typically the use_indexed input argument is just for internal use and debugging.

That said, the functionality of the indexed update is internal C++ code that is optimized, as it avoids the "unfold" operation for the convolution internally by accessing the input tensor with indices. This uses less memory typically and is faster in certain cases (for 2D convs). However, for smaller DNNs and modern GPUs the difference is not large so either version can be used. However, for 1D and 3D convolutions are not supported by torch's unfold fun…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Zhaoxian-Wu
Comment options

Answer selected by Zhaoxian-Wu
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