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
Hello, I have a small doubt in the vid part "PyTorch and NumPy". I create a new ones tensor, then create a variable to hold numpy version of said tensor, then increment tensor using tensor = tensor + 1 there is no data shared b/w tensor and numpy_tensor. But if I use tensor += 1, the data is shared and both show the same output.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I have a small doubt in the vid part "PyTorch and NumPy". I create a new ones tensor, then create a variable to hold numpy version of said tensor, then increment tensor using
![image_2024-06-28_115621661](https://private-user-images.githubusercontent.com/119485294/344058233-73149687-380d-4190-ae9f-2852fba69967.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxNTM0NDEsIm5iZiI6MTcyMDE1MzE0MSwicGF0aCI6Ii8xMTk0ODUyOTQvMzQ0MDU4MjMzLTczMTQ5Njg3LTM4MGQtNDE5MC1hZTlmLTI4NTJmYmE2OTk2Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwNVQwNDE5MDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mOWY2N2I3NjVlYjdmYzM3NzIzYTQ2YWQ3MGY4MTMzODkxNjdjNTcwZmNmYzQ0OWI5NWIxOTZhNjVmYTM3MDc2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.nRdSbTV-of6LsEFMeWq8YbdvlBE7yLuBnQVhzKqRwF8)
tensor = tensor + 1
there is no data shared b/w tensor and numpy_tensor. But if I usetensor += 1
, the data is shared and both show the same output.Beta Was this translation helpful? Give feedback.
All reactions