4 ms·
All I want is a way to statically type check tensor axes. Why can't I get a way to statically type check tensors?
by MiroF 6y ago
All I want is a way to statically type check tensor axes. Why can't I get a way to statically type check tensors?
- atorodius 6y agoThis is not statically checked but it's a step in the right direction: https://pytorch.org/docs/stable/named_tensor.html https://pytorch.org/docs/stable/named_tensor.html
- MiroF 6y agoYeah, I actually helped work on the inspo for that project https://github.com/harvardnlp/namedtensor https://github.com/harvardnlp/namedtensor . From what I've been able to tell, (no shade to the Pytorch team which has many different priorities) work has been somewhat slow going on the port. Further, this is dynamic type checking as you mentioned.
- atorodius 6y agoI see, interesting! Yeah statically checking this would be way more awesome still
- marmaduke 6y agoFuthark has size types, https://futhark-lang.org/blog/2020-03-15-futhark-0.15.1-released.html#size-types https://futhark-lang.org/blog/2020-03-15-futhark-0.15.1-rele... and it seems to be ok for DL https://elsman.com/pdf/fhpnc19.pdf https://elsman.com/pdf/fhpnc19.pdf
- BadInformatics 6y agoThere are a few efforts working in this space. As you can imagine, all of them are experimental: - Dex: https://github.com/google-research/dex-lang/ https://github.com/google-research/dex-lang/ - Hasktorch: https://github.com/hasktorch/hasktorch https://github.com/hasktorch/hasktorch - This initiative from the Python Typing-sig: https://docs.google.com/document/d/1oaG0V2ZE5BRDjd9N-Tr1N0IKGwZQcraIlZ0N8ayqVg8/ https://docs.google.com/document/d/1oaG0V2ZE5BRDjd9N-Tr1N0IK...