nowcasting_dataset icon indicating copy to clipboard operation
nowcasting_dataset copied to clipboard

Use NamedTensors to name dimensions

Open JackKelly opened this issue 4 years ago • 0 comments

https://pytorch.org/docs/stable/named_tensor.html

See this twitter conversation.

In particular, try extending xarray with a little "accessor" extension like dataarray.torch.to_tensor() (as suggested by Joe Hamman on Twitter!)

And see Joe's pull request, which implements xarray-to-pytorch-named-tensors.

But note that torch.stack doesn't yet support named tensors (here's a feature request)

JackKelly avatar Jun 28 '21 16:06 JackKelly