coremltools
coremltools copied to clipboard
Implementation of basic linear algebra routines
Hello. While trying to invert a model via your framework I've faced an absence of inverse matrix computation support (torch.inverse). I've tried to implement it by myself (via looking your code and creating my own operator via numpy), but it fails right after custom conversion: "ValueError: Cannot add const = matrixinv(x=%test, name="x")" at matmul operation which involved inverted matrix. Since there was another issue (with use of SVD) I think it would be great if raw torch and tensorflow routines would be added or a coincise method to register a custom op would be provided.
We're already tracking support for PyTorch inverse in #958. Are there other PyTorch linear algebra routines you would like to see supported?
You also mentioned TensorFlow. What linear algebra methods would you like supported there?
I also need SVD. My particular choice is PyTorch, but I've mentioned Tensorflow just to keep some sort of "unity" with other DL frameworks :)
Ok, so you would also like support for torch.svd, is that correct?
@TobyRoseman Would coremltools put torch.linalg.svd
in implementation schedule? (torch.svd
is deprecated by PyTorch)