Reshape also change the value? #303
-
so from your vidoe explanation you says that view changes the tensor value and thats what differentiate |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
In general purposes there are the same. If want independent data add .clone() or multiply by .... = reshape(...)*1 |
Beta Was this translation helpful? Give feedback.
-
Hi @UrDailyCs, @nazarPuriy is correct. For most purposes they are the same. However, this is one of the main differences (shared memory):
See this answer for more details: https://stackoverflow.com/a/54507446/7900723 |
Beta Was this translation helpful? Give feedback.
In general purposes there are the same. If want independent data add .clone() or multiply by .... = reshape(...)*1
https://stackoverflow.com/questions/49643225/whats-the-difference-between-reshape-and-view-in-pytorch