Row 6197

Row ID: 6197 | Dataset Entry | Axioma AXP Content Repository

Content Data

This page contains data entry 6197 from the Axioma AXP content repository. The structured data below represents the complete record for this entry.

Found why because when I update W like :

W = W - lr * W.grad

W is pointing to a different tensor and that new tensor does not have any grads yet. I should have done like:

W -= lr * W.grad

Which would have updated [W.data](http://W.data), the underlying values. Also this update should be done in wirh torch.no\_grad() so this update is not considered as a part of the computational graph

FieldValue
text Found why because when I update W like : W = W - lr * W.grad W is pointing to a different tensor and that new tensor does not have any grads yet. I should have done like: W -= lr * W.grad Which would have updated [W.data](http://W.data), the underlying values. Also this update should be done in wirh torch.no\_grad() so this update is not considered as a part of the computational graph
label r/pytorch
dataType comment
communityName r/pytorch
datetime 2024-05-08
username_encoded Z0FBQUFBQm5LakwyeksxUEFEZU1hcS12TFdqRE4wYTlKVFdsQkZlOG9VV3hMeVNRakJ0NkQtNHVvakx0VGRRa1R3U1dCWW02S0trWnVlTDFnTE1kc2FZSHFqcGxsWjFUeWZROXZ5dXRGbTE3NkZKeVR5MzRYTXM9
url_encoded Z0FBQUFBQm5Lak9Hb1VacW56eVVpNE50NGNxVjFRSGUtZmpjZ1FKUW83eUtfTUE5ci1jWWVqLWdlRkpwNE9WRW1VUk5PRUJXemFGX3NhTFlyY0k1cWNFaHFPTkVFR2tqcmlUTVZqTXhiOEhVbzdVN25nZGNnUS1GMlNUVVhPbzJWZ2F3dlNlMXBxUE1QRl9BWkR2Xzd1MnNuOFhfQ3VYRXpITlV4M281bTJHS3g5dGpDM3d6eG9LWC1nRzlJV3N2aEFwazdUTkIwTGVWQ1lhVUt6VXMzdUJRYnE3Q3NNWm5CQT09

Raw Record

{
  "text": "Found why because when I update W like :\n\n    W = W - lr * W.grad\n\nW is pointing to a different tensor and that new tensor does not have any grads yet. I should have done like:\n\n    W -= lr * W.grad\n\nWhich would have updated [W.data](http://W.data), the underlying values. Also this update should be done in wirh torch.no\\_grad() so this update is not considered as a part of the computational graph",
  "label": "r/pytorch",
  "dataType": "comment",
  "communityName": "r/pytorch",
  "datetime": "2024-05-08",
  "username_encoded": "Z0FBQUFBQm5LakwyeksxUEFEZU1hcS12TFdqRE4wYTlKVFdsQkZlOG9VV3hMeVNRakJ0NkQtNHVvakx0VGRRa1R3U1dCWW02S0trWnVlTDFnTE1kc2FZSHFqcGxsWjFUeWZROXZ5dXRGbTE3NkZKeVR5MzRYTXM9",
  "url_encoded": "Z0FBQUFBQm5Lak9Hb1VacW56eVVpNE50NGNxVjFRSGUtZmpjZ1FKUW83eUtfTUE5ci1jWWVqLWdlRkpwNE9WRW1VUk5PRUJXemFGX3NhTFlyY0k1cWNFaHFPTkVFR2tqcmlUTVZqTXhiOEhVbzdVN25nZGNnUS1GMlNUVVhPbzJWZ2F3dlNlMXBxUE1QRl9BWkR2Xzd1MnNuOFhfQ3VYRXpITlV4M281bTJHS3g5dGpDM3d6eG9LWC1nRzlJV3N2aEFwazdUTkIwTGVWQ1lhVUt6VXMzdUJRYnE3Q3NNWm5CQT09"
}

Entry Information