What do the underscores at the end of functions mean in pytorch?

(Brando Miranda) #1

I’ve been seeing underscores at the end of many functions in pytorch. What does this mean?

I think I read in some chat or question that it means operations are done “in place” but I wanted to make sure that was correct (and provide a way for future people to search for this question) and to clarify what “in place” meant.

(Francisco Massa) #2

This has been replied in How does one make sure that the parameters are update manually in pytorch using modules?