3 ms·
the place in DL/ML where typing could be the most useful is to keep you from trying to multiply differently sized tensors together. So the irony is that the on
by throwawaymaths 3y ago
the place in DL/ML where typing could be the most useful is to keep you from trying to multiply differently sized tensors together. So the irony is that the one place where typing WOULD help DL/ML, is the place where rust is weak in its typing system (dependent types and const generics)
- dgacmu 3y agoI keep checking the progress on dfdx for this reason. It does what I (and, I assume from context, you) want: Provides static checking of tensor shapes. Which is fantastic. Not quite as much inference as I'd like but I love getting compile-time errors that I forgot to transpose before a matmul. It depends on the generic_const_exprs feature which is still, to quote, "highly experimental": https://github.com/rust-lang/rust/issues/76560 https://github.com/rust-lang/rust/issues/76560 Definitely not for production use, but it gives a flavor for where things can head in the medium term, and it's .. it's nice. You could imagine future type support allowing even more inference for some intermediate shapes, of course, but even what it has now is really nice. Like this cute little convnet example: https://github.com/coreylowman/dfdx/blob/main/examples/nightly-conv-net.rs https://github.com/coreylowman/dfdx/blob/main/examples/night...