Texonom
Texonom
/
Engineering
Engineering
/Data Engineering/Artificial Intelligence/AI Development/AI Framework/Pytorch/Pytorch Grammar/torch.Tensor/
torch Tensor.expand()
Search

torch Tensor.expand()

Creator
Creator
Seonglae Cho
Created
Created
2024 May 26 5:47
Editor
Editor
Seonglae Cho
Edited
Edited
2024 May 26 5:48
Refs
Refs
 
 
 
 
 

Memory issue

About error "more than one element of the written-to tensor refers to a single memory location."
Got it…so the +a created a tensor with a shape same as the target (3x3), while the other one relies on the expand_as().clone() to create a tensor of same shape. Thanks for the prompt help
About error "more than one element of the written-to tensor refers to a single memory location."
https://discuss.pytorch.org/t/about-error-more-than-one-element-of-the-written-to-tensor-refers-to-a-single-memory-location/85526/3
About error "more than one element of the written-to tensor refers to a single memory location."
 
 

Recommendations

Texonom
Texonom
/
Engineering
Engineering
/Data Engineering/Artificial Intelligence/AI Development/AI Framework/Pytorch/Pytorch Grammar/torch.Tensor/
torch Tensor.expand()
Copyright Seonglae Cho