FastAD icon indicating copy to clipboard operation
FastAD copied to clipboard

Supporting mat transpose.

Open kilasuelika opened this issue 3 years ago • 2 comments

mat transpose is very common in scientific computing. If we want to support that, can we write a function in reverse/core/unary.hpp to directly transpose underneath values and adjoints?

I would like to make a PR but I'm not sure if the above idea is correct.

kilasuelika avatar Jul 07 '21 08:07 kilasuelika

I'm working on a TransposeNode.

kilasuelika avatar Jul 07 '21 14:07 kilasuelika

Good point! How did I miss such an important operator. I agree transpose should be a separate node rather than a specialization of a unary node. It would be nice to have a separate file for it like transpose.hpp. I intended unary nodes to represent element-wise operations.

Feel free to make a PR also! I'll try to take a look as quickly as possible.

JamesYang007 avatar Jul 08 '21 18:07 JamesYang007