You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method tensor.reshape should not make a deep copy of the data. Either reshape should change the tensor it's called on, or it should be a function rather than a method. In numpy, the default behavior of reshape is that it returns a view (if possible, depending on the order). I think we get in trouble because we then call the tensor constructor which makes a copy. We need an option to not make a copy. Ideally, we can have two tensors with different shapes that share the same underlying data, but this needs to be clear so that the user knows when they have a view versus a copy.
The text was updated successfully, but these errors were encountered:
The method
tensor.reshape
should not make a deep copy of the data. Either reshape should change the tensor it's called on, or it should be a function rather than a method. In numpy, the default behavior of reshape is that it returns a view (if possible, depending on the order). I think we get in trouble because we then call the tensor constructor which makes a copy. We need an option to not make a copy. Ideally, we can have two tensors with different shapes that share the same underlying data, but this needs to be clear so that the user knows when they have a view versus a copy.The text was updated successfully, but these errors were encountered: