According to this issue, the ability to create 0-dim tensors / torch scalars was added to master. However, there were several suggestions throughout the issue of how to initialize such a tensor, but the final decision nor the commit they were added in seems to be provided. And I’m having difficulty finding documentation stating how to do it (as it’s relatively recent). Can anyone point me to the way to initialize a 0-dim tensor from a value? Thank you for your time!
In current master, you can initialize a 0-dim tensor from a value by a = torch.tensor(value)
.